This makes setting breakpoints work with -gsimple-template-names.
Assume that callers handle false positives. For example, Module::LookupInfo::Prune removes wrong template instantiations when setting a breakpoint.
Differential D137098
[lldb] Support simplified template names when looking up functions aeubanks on Oct 31 2022, 11:20 AM. Authored by
Details This makes setting breakpoints work with -gsimple-template-names. Assume that callers handle false positives. For example, Module::LookupInfo::Prune removes wrong template instantiations when setting a breakpoint.
Diff Detail
Event TimelineComment Actions updated description with why this doesn't produce false positives with breakpoints this doesn't support regex function name lookup, not sure if we care enough about the interaction between regexes/function names under simple template names. if we do, we could instead add template parameters to the names we put in the manual index. I did take a quick look at doing that but it'd require more work Comment Actions Presumably that'd then lead to divergence between manual and automatic index - which would be bad. So if this behavior is the same between automatic and manual index with simplified template names, that's probably good. Comment Actions Why is it that the other indexes don't need an equivalent fix? Could it be that you just haven't tried those code paths? If they do need it, then it'd be good if we could make the fix in a single place. Possibly by putting the retry logic at a higher level? In addition to the divergence, the building the manual index is possibly the most performance-critical part of lldb, so doing all this extra work to reconstruct the templated names is probably a non-starter. If we wanted to support that, then we'd have to come up with a completely different way to achieve implement this functionality.
Comment Actions Other indexes as in the other manual index indexes? Or as in other higher level indexes?
Comment Actions I meant the compiler-generated indexes (implementations in AppleDWARFIndex and DebugNamesDWARFIndex). |