mirror of
https://github.com/intel/llvm.git
synced 2026-01-15 12:25:46 +08:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user