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

@@ -266,9 +266,12 @@ StackFrame::Disassemble ()
Target *target = exe_ctx.GetTargetPtr();
if (target)
{
const char *plugin_name = NULL;
const char *flavor = NULL;
Disassembler::Disassemble (target->GetDebugger(),
target->GetArchitecture(),
NULL,
plugin_name,
flavor,
exe_ctx,
0,
0,
@@ -1426,9 +1429,12 @@ StackFrame::GetStatus (Stream& strm,
AddressRange pc_range;
pc_range.GetBaseAddress() = GetFrameCodeAddress();
pc_range.SetByteSize(disasm_lines * target_arch.GetMaximumOpcodeByteSize());
const char *plugin_name = NULL;
const char *flavor = NULL;
Disassembler::Disassemble (target->GetDebugger(),
target_arch,
NULL,
plugin_name,
flavor,
exe_ctx,
pc_range,
disasm_lines,