<div dir="ltr"><div>On Fri, Jul 5, 2013 at 3:54 PM, Michael Sartain <span dir="ltr"><<a href="mailto:mikesart@gmail.com" target="_blank">mikesart@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr">When I explicitly run the "disassemble -m -n printf" command I don't get source even though we've obviously got source and I'm stepping through it. Example is way down below.</div></blockquote>
</div><div><br></div><div>This patch fixes the issue and I believe is similar to what DisplaySourceLinesWithLineNumbers() in SBSourceManager.cpp does.</div><div><br></div><div>Please let me know if this is ok to check in (or not...) Thanks.</div>
<div> -Mike</div><div><br></div><div><font face="courier new, monospace">mikesart@mikesart-rad:~/data/src/llvm.svn/llvm/tools/lldb$ svn diff source/Core/Disassembler.cpp</font></div><div><font face="courier new, monospace">Index: source/Core/Disassembler.cpp</font></div>
<div><font face="courier new, monospace">===================================================================</font></div><div><font face="courier new, monospace">--- source/Core/Disassembler.cpp (revision 185589)</font></div>
<div><font face="courier new, monospace">+++ source/Core/Disassembler.cpp (working copy)</font></div><div><font face="courier new, monospace">@@ -402,6 +402,9 @@</font></div><div><font face="courier new, monospace"> ExecutionContextScope *exe_scope = exe_ctx.GetBestExecutionContextScope();</font></div>
<div><font face="courier new, monospace"> StackFrame *frame = exe_ctx.GetFramePtr();</font></div><div><font face="courier new, monospace"> </font></div><div><font face="courier new, monospace">+ TargetSP target_sp (exe_ctx.GetTargetSP());</font></div>
<div><font face="courier new, monospace">+ SourceManager &source_manager = target_sp ? target_sp->GetSourceManager() : debugger.GetSourceManager();</font></div><div><font face="courier new, monospace">+</font></div>
<div><font face="courier new, monospace"> if (frame)</font></div><div><font face="courier new, monospace"> pc_addr_ptr = &frame->GetFrameCodeAddress();</font></div><div><font face="courier new, monospace"> const uint32_t scope = eSymbolContextLineEntry | eSymbolContextFunction | eSymbolContextSymbol;</font></div>
<div><font face="courier new, monospace">@@ -438,12 +441,12 @@</font></div><div><font face="courier new, monospace"> </font></div><div><font face="courier new, monospace"> if (sc.comp_unit && sc.line_entry.IsValid())</font></div>
<div><font face="courier new, monospace"> {</font></div><div><font face="courier new, monospace">- debugger.GetSourceManager().DisplaySourceLinesWithLineNumbers (sc.line_entry.file,</font></div>
<div><font face="courier new, monospace">- sc.line_entry.line,</font></div><div><font face="courier new, monospace">- num_mixed_context_lines,</font></div>
<div><font face="courier new, monospace">- num_mixed_context_lines,</font></div><div><font face="courier new, monospace">- ((inst_is_at_pc && (options & eOptionMarkPCSourceLine)) ? "->" : ""),</font></div>
<div><font face="courier new, monospace">- &strm);</font></div><div><font face="courier new, monospace">+ source_manager.DisplaySourceLinesWithLineNumbers (sc.line_entry.file,</font></div>
<div><font face="courier new, monospace">+ sc.line_entry.line,</font></div><div><font face="courier new, monospace">+ num_mixed_context_lines,</font></div>
<div><font face="courier new, monospace">+ num_mixed_context_lines,</font></div><div><font face="courier new, monospace">+ ((inst_is_at_pc && (options & eOptionMarkPCSourceLine)) ? "->" : ""),</font></div>
<div><font face="courier new, monospace">+ &strm);</font></div><div><font face="courier new, monospace"> }</font></div>
<div><font face="courier new, monospace"> }</font></div><div><font face="courier new, monospace"> }</font></div><div class="gmail_extra"><br></div></div>