Skip to content

[lldb] Reword the "line 0" warning #116827

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions lldb/source/Target/StackFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2007,19 +2007,9 @@ bool StackFrame::GetStatus(Stream &strm, bool show_frame_info, bool show_source,
if (num_lines != 0)
have_source = true;
// TODO: Give here a one time warning if source file is missing.
if (!m_sc.line_entry.line) {
ConstString fn_name = m_sc.GetFunctionName();

if (!fn_name.IsEmpty())
strm.Printf(
"Note: this address is compiler-generated code in function "
"%s that has no source code associated with it.",
fn_name.AsCString());
else
strm.Printf("Note: this address is compiler-generated code that "
"has no source code associated with it.");
strm.EOL();
}
if (!m_sc.line_entry.line)
strm << "note: This address is not associated with a specific line "
"of code. This may be due to compiler optimizations.\n";
}
}
switch (disasm_display) {
Expand Down
4 changes: 2 additions & 2 deletions lldb/test/API/source-manager/TestSourceManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,8 @@ def test_artificial_source_location(self):
"stop reason = breakpoint",
f"{src_file}:0",
"static int foo();",
"Note: this address is compiler-generated code in function",
"that has no source code associated with it.",
"note: This address is not associated with a specific line "
"of code. This may be due to compiler optimizations.",
],
)

Expand Down
Loading