This is an archive of the discontinued LLVM Phabricator instance.

Lookup function using full name if one with mangled name is not found.
ClosedPublic

Authored by sivachandra on Sep 3 2015, 3:47 PM.

Diff Detail

Event Timeline

sivachandra updated this revision to Diff 33984.Sep 3 2015, 3:47 PM
sivachandra retitled this revision from to Lookup function using full name if one with mangled name is not found..
sivachandra updated this object.
sivachandra added reviewers: clayborg, spyffe.
sivachandra added a subscriber: lldb-commits.
clayborg accepted this revision.Sep 3 2015, 3:52 PM
clayborg edited edge metadata.
This revision is now accepted and ready to land.Sep 3 2015, 3:52 PM

I worry a bit about performance here, but we should find any regressions and address them if we run into any.

spyffe edited edge metadata.Sep 3 2015, 3:56 PM

What is up with the name such that we have to look for its demangled version? Can you provide an example where this search would be required?

About performance regression, I am not sure if it really does cause any; For those cases where looking up a function with mangled name actually works, the new lookup should not trigger. For those where it does not work, additional lookup could now make it work.

About cases where in looking up with full (demangled) name helps, the two test cases from which the expectedFailure decorators were removed are examples. Essentially, the issue is that the mangled name used by the inferior compiler is different from the mangled name as generated by LLDB (via Clang). However, since both the manglings resolve to the same demangled name, looking up a function using the demangled name works. Another example is std::vector<int>::size(); GCC does not generate complete DWARF for the this method, and hence LLDB (via Clang) generates a different mangled name as compared to what is present in the SymTab.

sivachandra closed this revision.Sep 3 2015, 4:28 PM