Reputation: 13
I am trying to set a breakpoint on a function but lldb gives me an error "WARNING: Unable to resolve breakpoints to any actual locations.."
Following their example over at http://lldb.llvm.org/lldb-gdb.html , I have to use breakpoint set --method xxxxxxxxx
The function where I try to set a breakpoint is called
pf::WebViewImpl::~WebViewImpl()
__ZN2pf11WebViewImplD1Ev
Which one should I use to be able to set a breakpoint?
Upvotes: 1
Views: 5021
Reputation: 15375
You can put a breakpoint on your destructor using the --method
option,
(lldb) br s -M ~WebViewImpl
You can use the --name
option with just the dtor method name too,
(lldb) br s -n ~WebViewImpl
and lldb should find it. Finally, you can pass the mangled name to breakpoint set
and that will work as well,
(lldb) br s -n _ZN2pf11WebViewImplD1Ev
Note that there's only one underscore in the mangled name - nm
(1)'s output will list a leading underscore that you need to omit.
If this method is in a shared library or framework and the process hasn't launched yet, then lldb is correct in saying "Unable to resolve breakpoint to any actual locations". Once your process starts running, the framework/solib will be loaded, lldb will evaluate all breakpoints and see that it now has a valid location.
Upvotes: 4