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

Jordan Rupprecht via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 7 11:09:19 PST 2019


rupprecht added a comment.

In D57609#1389282 <https://reviews.llvm.org/D57609#1389282>, @rupprecht wrote:

> In D57609#1387458 <https://reviews.llvm.org/D57609#1387458>, @samsonov wrote:
>
> > 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
>
>
> I think the absolute path (not realpath) would suffice, then.
>
> Also, using the full path can be delayed to when checking in /usr/lib/debug.
>
> I'll restore this patch with those modifications. No idea how I'll create a test for it though -- writing to /usr/lib/debug probably doesn't work on buildbots.


Mailed D57916 <https://reviews.llvm.org/D57916>


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