[Lldb-commits] [PATCH] D115461: [lldb/Target] Refine source display warning for artificial locations (NFC)

Med Ismail Bennani via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Dec 9 14:38:27 PST 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG20db8e07f9d5: [lldb/Target] Refine source display warning for artificial locations (NFC) (authored by mib).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115461/new/

https://reviews.llvm.org/D115461

Files:
  lldb/source/Target/StackFrame.cpp
  lldb/test/API/source-manager/TestSourceManager.py


Index: lldb/test/API/source-manager/TestSourceManager.py
===================================================================
--- lldb/test/API/source-manager/TestSourceManager.py
+++ lldb/test/API/source-manager/TestSourceManager.py
@@ -276,7 +276,7 @@
 
         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.'])
 
Index: lldb/source/Target/StackFrame.cpp
===================================================================
--- lldb/source/Target/StackFrame.cpp
+++ lldb/source/Target/StackFrame.cpp
@@ -1900,14 +1900,13 @@
             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();
           }
         }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115461.393286.patch
Type: text/x-patch
Size: 1902 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20211209/50bcab14/attachment.bin>


More information about the lldb-commits mailing list