aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectSource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Commands/CommandObjectSource.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectSource.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lldb/source/Commands/CommandObjectSource.cpp b/lldb/source/Commands/CommandObjectSource.cpp
index c205813..8c87af5 100644
--- a/lldb/source/Commands/CommandObjectSource.cpp
+++ b/lldb/source/Commands/CommandObjectSource.cpp
@@ -1067,7 +1067,16 @@ protected:
&result.GetOutputStream(), m_options.num_lines,
m_options.reverse, GetBreakpointLocations())) {
result.SetStatus(eReturnStatusSuccessFinishResult);
+ } else {
+ if (target.GetSourceManager().AtLastLine(m_options.reverse)) {
+ result.AppendNoteWithFormatv(
+ "Reached {0} of the file, no more to page",
+ m_options.reverse ? "beginning" : "end");
+ } else {
+ result.AppendNote("No source available");
+ }
}
+
} else {
if (m_options.num_lines == 0)
m_options.num_lines = 10;