Added extensive logging of the code that is actually going
to be executed by the inferior.  This required explicit support
from RecordingMemoryManager for finding the address range
belonging to a particular function.

Also fixed a bug in DisassemblerLLVM where the disassembler
assumed there was an AddressRange available even when it was
NULL.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109209 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectExpression.cpp b/source/Commands/CommandObjectExpression.cpp
index 303ca17..af19641 100644
--- a/source/Commands/CommandObjectExpression.cpp
+++ b/source/Commands/CommandObjectExpression.cpp
@@ -321,8 +321,21 @@
             {
                 log->Printf("Function address  : 0x%llx", (uint64_t)function_address);
                 log->Printf("Structure address : 0x%llx", (uint64_t)struct_address);
-            }
                 
+                StreamString insns;
+
+                Error err = clang_expr.DisassembleFunction(insns, m_exe_ctx, "___clang_expr");
+                
+                if (!err.Success())
+                {
+                    log->Printf("Couldn't disassemble function : %s", err.AsCString("unknown error"));
+                }
+                else
+                {
+                    log->Printf("Function disassembly:\n%s", insns.GetData());
+                }
+            }
+                        
             ClangFunction::ExecutionResults execution_result = 
                 ClangFunction::ExecuteFunction (m_exe_ctx, function_address, struct_address, true, true, 10000, error_stream);