Skip to content

Commit

Permalink
[lldb] Provide a better error message for missing symbols (#89433)
Browse files Browse the repository at this point in the history
This adds a hint to the missing symbols error message to make it easier
to understand what this means to users.
  • Loading branch information
adrian-prantl authored Apr 19, 2024
1 parent c8e65e1 commit 08163cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lldb/source/Expression/IRExecutionUnit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 that is not present "
"in the target, perhaps because it was optimized out by the compiler.");
error.SetErrorString(ss.GetString());

return;
Expand Down
2 changes: 1 addition & 1 deletion lldb/test/API/lang/cpp/constructors/TestCppConstructors.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ 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.
Expand Down

0 comments on commit 08163cd

Please sign in to comment.