[Lldb-commits] [PATCH] D12877: [LLDB] Switch to assembly view if source is moved
Mohit Bhakkad via lldb-commits
lldb-commits at lists.llvm.org
Mon Sep 14 23:55:45 PDT 2015
mohit.bhakkad created this revision.
mohit.bhakkad added a reviewer: clayborg.
mohit.bhakkad added subscribers: jaydeep, bhushan, sagar, nitesh.jain, lldb-commits.
mohit.bhakkad set the repository for this revision to rL LLVM.
Repository:
rL LLVM
http://reviews.llvm.org/D12877
Files:
source/Target/StackFrame.cpp
Index: source/Target/StackFrame.cpp
===================================================================
--- source/Target/StackFrame.cpp
+++ source/Target/StackFrame.cpp
@@ -1503,12 +1503,15 @@
have_source = true;
if (source_lines_before > 0 || source_lines_after > 0)
{
- target->GetSourceManager().DisplaySourceLinesWithLineNumbers (m_sc.line_entry.file,
+ size_t num_lines = target->GetSourceManager().DisplaySourceLinesWithLineNumbers (m_sc.line_entry.file,
m_sc.line_entry.line,
source_lines_before,
source_lines_after,
"->",
&strm);
+ /* Source might have been moved or removed. If no lines are displayed then switch to assembly view */
+ if (num_lines == 0)
+ have_source = false;
}
}
switch (disasm_display)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12877.34789.patch
Type: text/x-patch
Size: 1344 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150915/54c15dbf/attachment.bin>
More information about the lldb-commits
mailing list