Added the ability to get the disassembly instructions from the function and
symbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115734 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Expression/ClangExpressionParser.cpp b/source/Expression/ClangExpressionParser.cpp
index 194a90d..60b0f7a 100644
--- a/source/Expression/ClangExpressionParser.cpp
+++ b/source/Expression/ClangExpressionParser.cpp
@@ -668,9 +668,9 @@
DataExtractor::TypeUInt8);
}
- disassembler->DecodeInstructions(extractor, 0, UINT32_MAX);
+ disassembler->DecodeInstructions (Address (NULL, func_remote_addr), extractor, 0, UINT32_MAX);
- Disassembler::InstructionList &instruction_list = disassembler->GetInstructionList();
+ InstructionList &instruction_list = disassembler->GetInstructionList();
uint32_t bytes_offset = 0;
@@ -678,13 +678,12 @@
instruction_index < num_instructions;
++instruction_index)
{
- Disassembler::Instruction *instruction = instruction_list.GetInstructionAtIndex(instruction_index);
- Address addr(NULL, func_remote_addr + bytes_offset);
+ Instruction *instruction = instruction_list.GetInstructionAtIndex(instruction_index).get();
instruction->Dump (&stream,
- &addr,
+ true,
&extractor,
bytes_offset,
- exe_ctx,
+ &exe_ctx,
true);
stream.PutChar('\n');
bytes_offset += instruction->GetByteSize();