Bug in SBTarget::BreakpointCreateByName

Hi,

we are using SBTarget::BreakpointCreateByName so set breakpoint on symbol names. This works as long as no special characters are in the symbol name. Our name mangling can produce symbols like:

[J]com.robovm.debug.server.apps.SleepLoop.startingUp()V

for which SBTarget::BreakpointCreateByName fails to resolve locations.

This happens with the latest trunk version of LLDB, it worked with a snapshot from the 29th of September.

We currently work around this issue by using SBTarget::BreakpointCreateByRegex.

Thanks,
Mario

Mario,

“-n” is trying to do things like

(lldb) break set -n foo

will break on bar::foo, etc… So it tries to parse up the name, and weird names like this can trip it up.

Greg recently fixed some bugs with the -n parsing for ObjC names which might have caused it to break on your names.

Does breakpoint setting work when you use “break set -F <NAME>” for these sorts of names. This option does an exact match against the symbol name and doesn’t try to be smart about it, it’s there as a fallback for odd names lldb fails to parse up correctly.

Jim

Hi Jim,

break set -F does indeed work with trunk. Our mangling is a tiny bit awkward (for specific reasons…), so i guess it’s not a big deal. We can get by by using the regex version for now.

Is there a C++ API equivalent to break set -F?

Thanks!
Mario

No there isn't a C++ work around. I have found your issue and I am currently fixing things for your very problem. Fix coming shortly.

Greg Clayton

Hi Jim,

break set -F does indeed work with trunk. Our mangling is a tiny bit awkward (for specific reasons…), so i guess it’s not a big deal. We can get by by using the regex version for now.

Is there a C++ API equivalent to break set -F?

Set the name_type_mask option provided to the versions of SBTarget::BreakpointCreateByName that take it to eFunctionNameTypeFull, that is exactly what the -F option to “break set” does.

Jim

auto name mode is now fixed with:

% svn commit
Sending include/lldb/Target/CPPLanguageRuntime.h
Sending source/Target/CPPLanguageRuntime.cpp
Transmitting file data ..
Committed revision 221416.