diff --git a/lldb/source/Target/StackFrame.cpp b/lldb/source/Target/StackFrame.cpp index 1bca9786fb7c..ca02de15295c 100644 --- a/lldb/source/Target/StackFrame.cpp +++ b/lldb/source/Target/StackFrame.cpp @@ -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) { diff --git a/lldb/test/API/source-manager/TestSourceManager.py b/lldb/test/API/source-manager/TestSourceManager.py index 7071f094e20f..7d9ce86cdc35 100644 --- a/lldb/test/API/source-manager/TestSourceManager.py +++ b/lldb/test/API/source-manager/TestSourceManager.py @@ -336,8 +336,8 @@ class SourceManagerTestCase(TestBase): "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.", ], )