summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Sartain <mikesart@valvesoftware.com>2013-07-08 17:56:02 +0000
committerMichael Sartain <mikesart@valvesoftware.com>2013-07-08 17:56:02 +0000
commit4b2967ff9f6ffeb41b3965d396f469d3e95ee74e (patch)
tree1d12bc5e175a62008add1f291a48c0caef337aa2
parentce1960f936daa3e9d7c329e1487ff31c2060b469 (diff)
downloadbcm5719-llvm-4b2967ff9f6ffeb41b3965d396f469d3e95ee74e.tar.gz
bcm5719-llvm-4b2967ff9f6ffeb41b3965d396f469d3e95ee74e.zip
Use target DisplaySource if available so we can get mixed source and assembly.
This fixes "disassemble -m -n __printf". llvm-svn: 185845
-rw-r--r--lldb/source/Core/Disassembler.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/lldb/source/Core/Disassembler.cpp b/lldb/source/Core/Disassembler.cpp
index 0f5ed872745..fd0cae6a135 100644
--- a/lldb/source/Core/Disassembler.cpp
+++ b/lldb/source/Core/Disassembler.cpp
@@ -402,6 +402,9 @@ Disassembler::PrintInstructions
ExecutionContextScope *exe_scope = exe_ctx.GetBestExecutionContextScope();
StackFrame *frame = exe_ctx.GetFramePtr();
+ TargetSP target_sp (exe_ctx.GetTargetSP());
+ SourceManager &source_manager = target_sp ? target_sp->GetSourceManager() : debugger.GetSourceManager();
+
if (frame)
pc_addr_ptr = &frame->GetFrameCodeAddress();
const uint32_t scope = eSymbolContextLineEntry | eSymbolContextFunction | eSymbolContextSymbol;
@@ -438,12 +441,12 @@ Disassembler::PrintInstructions
if (sc.comp_unit && sc.line_entry.IsValid())
{
- debugger.GetSourceManager().DisplaySourceLinesWithLineNumbers (sc.line_entry.file,
- sc.line_entry.line,
- num_mixed_context_lines,
- num_mixed_context_lines,
- ((inst_is_at_pc && (options & eOptionMarkPCSourceLine)) ? "->" : ""),
- &strm);
+ source_manager.DisplaySourceLinesWithLineNumbers (sc.line_entry.file,
+ sc.line_entry.line,
+ num_mixed_context_lines,
+ num_mixed_context_lines,
+ ((inst_is_at_pc && (options & eOptionMarkPCSourceLine)) ? "->" : ""),
+ &strm);
}
}
}
OpenPOWER on IntegriCloud