diff options
author | Greg Clayton <gclayton@apple.com> | 2011-04-20 18:52:45 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2011-04-20 18:52:45 +0000 |
commit | 3300d778ab7dfbfabcf4d89e01bc98a420488f56 (patch) | |
tree | a542b307c1df6a2d0b7c2e9119a5d7d510a0ba54 /lldb/source/Commands/CommandObjectSource.cpp | |
parent | 28d1282a0f90222c7612184d89ece04b98d64b16 (diff) | |
download | llvm-3300d778ab7dfbfabcf4d89e01bc98a420488f56.zip llvm-3300d778ab7dfbfabcf4d89e01bc98a420488f56.tar.gz llvm-3300d778ab7dfbfabcf4d89e01bc98a420488f56.tar.bz2 |
Fixed an issue where breakpoint were being displayed when using the "source list"
command when the file was implicit or found from a symbol.
llvm-svn: 129867
Diffstat (limited to 'lldb/source/Commands/CommandObjectSource.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectSource.cpp | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectSource.cpp b/lldb/source/Commands/CommandObjectSource.cpp index 2e4645e..40d35e5 100644 --- a/lldb/source/Commands/CommandObjectSource.cpp +++ b/lldb/source/Commands/CommandObjectSource.cpp @@ -417,13 +417,25 @@ public: char path_buf[PATH_MAX]; start_file.GetPath(path_buf, sizeof(path_buf)); + + if (m_options.show_bp_locs && exe_ctx.target) + { + const bool show_inlines = true; + m_breakpoint_locations.Reset (start_file, 0, show_inlines); + SearchFilter target_search_filter (exe_ctx.target->GetSP()); + target_search_filter.Search (m_breakpoint_locations); + } + else + m_breakpoint_locations.Clear(); + result.AppendMessageWithFormat("File: %s.\n", path_buf); m_interpreter.GetDebugger().GetSourceManager().DisplaySourceLinesWithLineNumbers (start_file, line_no, 0, m_options.num_lines, "", - &result.GetOutputStream()); + &result.GetOutputStream(), + GetBreakpointLocations ()); result.SetStatus (eReturnStatusSuccessFinishResult); return true; @@ -445,6 +457,20 @@ public: } else { + if (m_options.show_bp_locs && exe_ctx.target) + { + SourceManager::FileSP last_file_sp (m_interpreter.GetDebugger().GetSourceManager().GetLastFile ()); + if (last_file_sp) + { + const bool show_inlines = true; + m_breakpoint_locations.Reset (last_file_sp->GetFileSpec(), 0, show_inlines); + SearchFilter target_search_filter (exe_ctx.target->GetSP()); + target_search_filter.Search (m_breakpoint_locations); + } + } + else + m_breakpoint_locations.Clear(); + if (m_interpreter.GetDebugger().GetSourceManager().DisplaySourceLinesWithLineNumbersUsingLastFile( m_options.start_line, // Line to display 0, // Lines before line to display |