Added logging:
- When we JIT an expression, we print the disassembly
  of the generated code
- When we put the structure into the target, we print
  the individual entries in the structure byte for
  byte.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109278 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Expression/ClangExpression.cpp b/source/Expression/ClangExpression.cpp
index cdb3383..c3bdd7a 100644
--- a/source/Expression/ClangExpression.cpp
+++ b/source/Expression/ClangExpression.cpp
@@ -669,10 +669,10 @@
         ret.SetErrorString("Couldn't find the target");
     }
     
-    lldb::DataBufferSP buffer_sp(new DataBufferHeap(func_range.second - func_range.first, 0));
+    lldb::DataBufferSP buffer_sp(new DataBufferHeap(func_range.second - func_remote_addr, 0));
         
     Error err;
-    exe_ctx.process->ReadMemory(func_range.first, buffer_sp->GetBytes(), buffer_sp->GetByteSize(), err);
+    exe_ctx.process->ReadMemory(func_remote_addr, buffer_sp->GetBytes(), buffer_sp->GetByteSize(), err);
     
     if (!err.Success())
     {
@@ -701,7 +701,7 @@
     
     DataExtractor extractor(buffer_sp, 
                             exe_ctx.process->GetByteOrder(),
-                            32);
+                            exe_ctx.target->GetArchitecture().GetAddressByteSize());
     
     if(log)
     {
@@ -709,7 +709,7 @@
         extractor.PutToLog (log,
                             0,
                             extractor.GetByteSize(),
-                            func_range.first,
+                            func_remote_addr,
                             16,
                             DataExtractor::TypeUInt8);
     }
@@ -725,8 +725,9 @@
          ++instruction_index)
     {
         Disassembler::Instruction *instruction = instruction_list.GetInstructionAtIndex(instruction_index);
+        Address addr(NULL, func_remote_addr + bytes_offset);
         instruction->Dump (&stream,
-                           NULL,
+                           &addr,
                            &extractor, 
                            bytes_offset, 
                            exe_ctx,