Author: Med Ismail Bennani Date: 2021-12-09T14:38:14-08:00 New Revision: 20db8e07f9d5e4378839602752099e0ff2f703a9
URL: https://github.com/llvm/llvm-project/commit/20db8e07f9d5e4378839602752099e0ff2f703a9 DIFF: https://github.com/llvm/llvm-project/commit/20db8e07f9d5e4378839602752099e0ff2f703a9.diff LOG: [lldb/Target] Refine source display warning for artificial locations (NFC) This is a post-review update for D115313, to rephrase source display warning messages for artificial locations, making them more understandable for the end-user. Differential Revision: https://reviews.llvm.org/D115461 Signed-off-by: Med Ismail Bennani <medismail.benn...@gmail.com> Added: Modified: lldb/source/Target/StackFrame.cpp lldb/test/API/source-manager/TestSourceManager.py Removed: ################################################################################ diff --git a/lldb/source/Target/StackFrame.cpp b/lldb/source/Target/StackFrame.cpp index 8208288e15ef7..7b4295158425e 100644 --- a/lldb/source/Target/StackFrame.cpp +++ b/lldb/source/Target/StackFrame.cpp @@ -1900,14 +1900,13 @@ bool StackFrame::GetStatus(Stream &strm, bool show_frame_info, bool show_source, ConstString fn_name = m_sc.GetFunctionName(); if (!fn_name.IsEmpty()) - strm.Printf("Warning: the current PC is an artificial location " - "in function %s.", - fn_name.AsCString()); - else strm.Printf( - "Warning: the current PC is an artificial location " - "but lldb couldn't associate it with a function in %s.", - m_sc.line_entry.file.GetFilename().GetCString()); + "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(); } } diff --git a/lldb/test/API/source-manager/TestSourceManager.py b/lldb/test/API/source-manager/TestSourceManager.py index 15af2e46c29af..888174a62f19b 100644 --- a/lldb/test/API/source-manager/TestSourceManager.py +++ b/lldb/test/API/source-manager/TestSourceManager.py @@ -276,7 +276,7 @@ def test_artificial_source_location(self): self.expect("run", RUN_SUCCEEDED, substrs=['stop reason = breakpoint', '%s:%d' % (src_file,0), - 'Warning: the current PC is an artificial ', - 'location in function ' - ]) + 'Note: this address is compiler-generated code in ' + 'function', 'that has no source code associated ' + 'with it.']) _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits