llvmbot wrote:

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-lldb

Author: Adrian Prantl (adrian-prantl)

<details>
<summary>Changes</summary>

This adds a hint to the missing symbols error message to make it easier to 
understand what this means to users.

---
Full diff: https://github.com/llvm/llvm-project/pull/89433.diff


2 Files Affected:

- (modified) lldb/source/Expression/IRExecutionUnit.cpp (+3-1) 
- (modified) lldb/test/API/lang/cpp/constructors/TestCppConstructors.py (+2-1) 


``````````diff
diff --git a/lldb/source/Expression/IRExecutionUnit.cpp 
b/lldb/source/Expression/IRExecutionUnit.cpp
index cb9bee8733e15d..8d4e5aaf9fe7ea 100644
--- a/lldb/source/Expression/IRExecutionUnit.cpp
+++ b/lldb/source/Expression/IRExecutionUnit.cpp
@@ -431,7 +431,9 @@ void IRExecutionUnit::GetRunnableInfo(Status &error, 
lldb::addr_t &func_addr,
     }
 
     m_failed_lookups.clear();
-
+    ss.PutCString(
+        "\nHint: The expression tried to call a function missing from the "
+        "target, perhaps because it was optimized out by the compiler.");
     error.SetErrorString(ss.GetString());
 
     return;
diff --git a/lldb/test/API/lang/cpp/constructors/TestCppConstructors.py 
b/lldb/test/API/lang/cpp/constructors/TestCppConstructors.py
index 6724bfc8ed78e0..d73b2af1ca077c 100644
--- a/lldb/test/API/lang/cpp/constructors/TestCppConstructors.py
+++ b/lldb/test/API/lang/cpp/constructors/TestCppConstructors.py
@@ -47,7 +47,8 @@ def test_constructors(self):
         self.expect(
             "expr ClassWithDeletedDefaultCtor().value",
             error=True,
-            substrs=["Couldn't look up symbols:"],
+            substrs=["Couldn't look up symbols:",
+                     "function missing"],
         )
 
     @skipIfWindows  # Can't find operator new.

``````````

</details>


https://github.com/llvm/llvm-project/pull/89433
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to