Page MenuHomePhabricator

Enable workaround for finding functions in global namespace on linux binaries on all hosts.

Authored by flackr on May 13 2015, 10:49 AM.



We require a workaround to be able to locate global and anonymous namespace functions in the dwarf symbols on linux binaries. This patch enables this code on all platforms so that we can still find these symbols when debugging from a different host platform.

Diff Detail


Event Timeline

flackr updated this revision to Diff 25710.May 13 2015, 10:49 AM
flackr retitled this revision from to Enable workaround for finding functions in global namespace on linux binaries on all hosts..
flackr updated this object.
flackr edited the test plan for this revision. (Show Details)
flackr added a reviewer: clayborg.
flackr set the repository for this revision to rL LLVM.
flackr added a subscriber: Unknown Object (MLST).
clayborg accepted this revision.May 13 2015, 10:53 AM
clayborg edited edge metadata.

Looks good.

This revision is now accepted and ready to land.May 13 2015, 10:53 AM
This revision was automatically updated to reflect the committed changes.
ted added a subscriber: ted.May 13 2015, 11:34 AM

This affects Windows and Hexagon as well, FYI. I believe this will fix bug 22177.

zturner added inline comments.

This check is only meaningful under a particular ABI. Could you check the triple or ArchSpec of the target you're looking at first, and either not do this if the triple contains MSVC (or better yet, add a correct check)?

flackr added inline comments.May 14 2015, 2:05 PM

Hey, I added a check that the object file is linux or freebsd: I tried to add a check for windows arch as well, but the arch was not correctly recognized in my tests, I was seeing i386-unknown-unknown. Let me know if you know where I might be able to find the target arch instead if not through the object file and I'm happy to add a correct Windows check as well. Thanks.

If it's not correct in the object file I think the best fix is to make it
correct in the object file. I actually had to fix a few things like that
in the past. Either way, don't worry about it. I will get around to it
eventually :) Maybe a comment saying // TODO: The arch in the object file
isn't correct for MSVC binaries on windows, so we should find a way to make
it correct.