Convert from the C-based LLVM Disassembler shim to the full MC Disassembler API's.

Calculate "can branch" using the MC API's rather than our hand-rolled regex'es.
As extra credit, allow setting the disassembly flavor for x86 based architectures to intel or att.

<rdar://problem/11319574>
<rdar://problem/9329275>

llvm-svn: 176392
This commit is contained in:
Jim Ingham
2013-03-02 00:26:47 +00:00
parent b1caf3c30e
commit 0f063ba6b4
26 changed files with 528 additions and 168 deletions

View File

@@ -121,6 +121,12 @@ SBFunction::GetDescription (SBStream &s)
SBInstructionList
SBFunction::GetInstructions (SBTarget target)
{
return GetInstructions (target, NULL);
}
SBInstructionList
SBFunction::GetInstructions (SBTarget target, const char *flavor)
{
SBInstructionList sb_instructions;
if (m_opaque_ptr)
@@ -139,6 +145,7 @@ SBFunction::GetInstructions (SBTarget target)
{
sb_instructions.SetDisassembler (Disassembler::DisassembleRange (module_sp->GetArchitecture(),
NULL,
flavor,
exe_ctx,
m_opaque_ptr->GetAddressRange()));
}