[PATCH] D57609: [DebugInfo] Don't use realpath when looking up debug binary locations.

Alexey Samsonov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 6 11:32:02 PST 2019


samsonov added a comment.

Ugh, too bad the original commit didn't provide any rationale, but here's my guess based on reading the source code:

Note that llvm-symbolizer (or another tool that uses this library) can be invoked with the relative path (e.g. cd /tmp/dir; llvm-symbolizer foo).

Then, if you can't find the .debuglink file at following locations: foo.debuglink (absolute path /tmp/dir/foo.debuglink), or .debug/foo.debuglink (absolute path /tmp/dir/.debuglink/foo.debuglink),
which can often happen if you're symbolizing the code from standard library, you have to look for this file in /usr/lib/... or /usr/libdata/... for NetBSD. That's when you need the realpath for the file in question,
so that you try to open:

/usr/lib/debug/tmp/dir/foo.debuglink

instead of

/usr/lib/debug/foo.debuglink


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57609/new/

https://reviews.llvm.org/D57609





More information about the llvm-commits mailing list