Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

LLDB failed to lookup method names in NativePDB plugin #51558

Open Quuxplusone opened 2 years ago

Quuxplusone commented 2 years ago
Bugzilla Link PR52591
Status NEW
Importance P enhancement
Reported by Zequan Wu (zequanwu@google.com)
Reported on 2021-11-23 10:46:04 -0800
Last modified on 2021-11-23 12:08:52 -0800
Version unspecified
Hardware PC All
CC jdevlieghere@apple.com, labath@google.com, llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
The following lldb commands fail to lookup/set breakpoint on given method names:
`image lookup -n A::foo()`
`b A::foo()`

The problem is that lldb passes the function base name(e.g. "foo()") to
Plugins' FindFunctions, and NativePDB plugin can only lookup functions by their
full names.

Is there a way to only pass functions' full names to FindFunctions?
Quuxplusone commented 2 years ago

It doesn't work that way right now, but in general, I think it would be reasonable to make the full string available to the symbol file plugins, as they might have a better/faster way of looking up the relevant data.

However, that won't really solve the problem of the pdb plugin not respecting the FindFunctions interface. Users expect to be able to set breakpoints on partial function names ("breakpoint set -n foo" should work).

I don't know what would be involved in that, but it would be great if that use case worked.