mib created this revision.
mib added a reviewer: aprantl.
mib added a project: LLDB.
Herald added a subscriber: JDevlieghere.
mib requested review of this revision.
Herald added a subscriber: lldb-commits.

This is a post-review update for D115313 <https://reviews.llvm.org/D115313>, to 
rephrase source display
warning messages for artificial locations, making them more
understandable for the end-user.


Repository:
  rG LLVM Github Monorepo

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();
           }
         }


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();
           }
         }
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
  • [Lldb-commits] [PATCH]... Med Ismail Bennani via Phabricator via lldb-commits

Reply via email to