[lldb] print a notice when source list paging reaches the end of th… (#137515)

This commit is contained in:
Zax
2025-05-08 22:01:16 +08:00
committed by GitHub
parent 7eafa5bdb7
commit b5674cb7be
5 changed files with 68 additions and 4 deletions

View File

@@ -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;