HomePhabricator

Skip symlinks to the original file when searching for debug info

Description

Skip symlinks to the original file when searching for debug info

Summary:
Symbols::LocateExecutableSymbolFile tries to locate the file in containing the debug info in a
splitdebug configuration. It tries to skip over the original file in its search path, but it was
easily fooled by symlinks. This changes the function to use llvm::sys::fs::equivalent, which can
correctly compare symlinks.

As a side effect, I had to fix one test because the address for the "abort" function resolves on
my system to "GI_abort" now. With the debug info, the libc on my system contains two symbols
associated with the address of the abort function, and lldb prefers
GI_abort, possibly because
the debug info is associated with it. It would be nice at some point to have it prefer the public
symbol name.

Reviewers: emaste, zturner

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D7836

Details

Committed
labathFeb 25 2015, 2:44 AM
Differential Revision
D7836: Skip symlinks to the original file when searching for debug info
Parents
rL230475: Whitespace.
Branches
Unknown
Tags
Unknown