summaryrefslogtreecommitdiffstats
path: root/lldb/source/API
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2011-03-25 18:03:16 +0000
committerGreg Clayton <gclayton@apple.com>2011-03-25 18:03:16 +0000
commit1080edbcdd7d24ad5213749e396e23b54c1a3040 (patch)
tree25cb5d0a1e62ba603df46e3376cdf4dfeb1969ca /lldb/source/API
parent6f4c9425eb5b689a2a4bfa19531ef9ab4c5c6e5d (diff)
downloadbcm5719-llvm-1080edbcdd7d24ad5213749e396e23b54c1a3040.tar.gz
bcm5719-llvm-1080edbcdd7d24ad5213749e396e23b54c1a3040.zip
Cleaned up the Disassembler code a bit more. You can now request a disassembler
plugin by name on the command line for when there is more than one disassembler plugin. Taught the Opcode class to dump itself so that "disassembler -b" will dump the bytes correctly for each opcode type. Modified all places that were passing the opcode bytes buffer in so that the bytes could be displayed to just pass in a bool that indicates if we should dump the opcode bytes since the opcode now lives inside llvm_private::Instruction. llvm-svn: 128290
Diffstat (limited to 'lldb/source/API')
-rw-r--r--lldb/source/API/SBFunction.cpp1
-rw-r--r--lldb/source/API/SBInstruction.cpp6
-rw-r--r--lldb/source/API/SBInstructionList.cpp2
-rw-r--r--lldb/source/API/SBSymbol.cpp1
4 files changed, 6 insertions, 4 deletions
diff --git a/lldb/source/API/SBFunction.cpp b/lldb/source/API/SBFunction.cpp
index c8ce1c3874f..de9f6ae8a86 100644
--- a/lldb/source/API/SBFunction.cpp
+++ b/lldb/source/API/SBFunction.cpp
@@ -137,6 +137,7 @@ SBFunction::GetInstructions (SBTarget target)
if (module)
{
sb_instructions.SetDisassembler (Disassembler::DisassembleRange (module->GetArchitecture(),
+ NULL,
exe_ctx,
m_opaque_ptr->GetAddressRange()));
}
diff --git a/lldb/source/API/SBInstruction.cpp b/lldb/source/API/SBInstruction.cpp
index df3a7535cbb..48b2e7399ff 100644
--- a/lldb/source/API/SBInstruction.cpp
+++ b/lldb/source/API/SBInstruction.cpp
@@ -64,7 +64,7 @@ size_t
SBInstruction::GetByteSize ()
{
if (m_opaque_sp)
- return m_opaque_sp->GetByteSize();
+ return m_opaque_sp->GetOpcode().GetByteSize();
return 0;
}
@@ -89,7 +89,7 @@ SBInstruction::GetDescription (lldb::SBStream &s)
{
// Use the "ref()" instead of the "get()" accessor in case the SBStream
// didn't have a stream already created, one will get created...
- m_opaque_sp->Dump (&s.ref(), true, NULL, 0, NULL, false);
+ m_opaque_sp->Dump (&s.ref(), true, false, NULL, false);
return true;
}
return false;
@@ -104,6 +104,6 @@ SBInstruction::Print (FILE *out)
if (m_opaque_sp)
{
StreamFile out_stream (out, false);
- m_opaque_sp->Dump (&out_stream, true, NULL, 0, NULL, false);
+ m_opaque_sp->Dump (&out_stream, true, false, NULL, false);
}
}
diff --git a/lldb/source/API/SBInstructionList.cpp b/lldb/source/API/SBInstructionList.cpp
index ce70d95b0ad..37c7f874e19 100644
--- a/lldb/source/API/SBInstructionList.cpp
+++ b/lldb/source/API/SBInstructionList.cpp
@@ -98,7 +98,7 @@ SBInstructionList::GetDescription (lldb::SBStream &description)
Instruction *inst = m_opaque_sp->GetInstructionList().GetInstructionAtIndex (i).get();
if (inst == NULL)
break;
- inst->Dump (&sref, true, NULL, 0, NULL, false);
+ inst->Dump (&sref, true, false, NULL, false);
sref.EOL();
}
return true;
diff --git a/lldb/source/API/SBSymbol.cpp b/lldb/source/API/SBSymbol.cpp
index 96a5a21ebde..ef8af558c5d 100644
--- a/lldb/source/API/SBSymbol.cpp
+++ b/lldb/source/API/SBSymbol.cpp
@@ -134,6 +134,7 @@ SBSymbol::GetInstructions (SBTarget target)
if (module)
{
sb_instructions.SetDisassembler (Disassembler::DisassembleRange (module->GetArchitecture (),
+ NULL,
exe_ctx,
*symbol_range));
}
OpenPOWER on IntegriCloud