Skip to content

Commit 08163cd

Browse files
[lldb] Provide a better error message for missing symbols (#89433)
This adds a hint to the missing symbols error message to make it easier to understand what this means to users.
1 parent c8e65e1 commit 08163cd

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lldb/source/Expression/IRExecutionUnit.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,9 @@ void IRExecutionUnit::GetRunnableInfo(Status &error, lldb::addr_t &func_addr,
431431
}
432432

433433
m_failed_lookups.clear();
434-
434+
ss.PutCString(
435+
"\nHint: The expression tried to call a function that is not present "
436+
"in the target, perhaps because it was optimized out by the compiler.");
435437
error.SetErrorString(ss.GetString());
436438

437439
return;

lldb/test/API/lang/cpp/constructors/TestCppConstructors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def test_constructors(self):
4747
self.expect(
4848
"expr ClassWithDeletedDefaultCtor().value",
4949
error=True,
50-
substrs=["Couldn't look up symbols:"],
50+
substrs=["Couldn't look up symbols:", "function missing"],
5151
)
5252

5353
@skipIfWindows # Can't find operator new.

0 commit comments

Comments
 (0)