[lldb-dev] [Bug 17903] New: Standalone debug file search path does not match GDB

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Nov 12 17:45:51 PST 2013


http://llvm.org/bugs/show_bug.cgi?id=17903

            Bug ID: 17903
           Summary: Standalone debug file search path does not match GDB
           Product: lldb
           Version: unspecified
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at cs.uiuc.edu
          Reporter: emaste at freebsd.org
    Classification: Unclassified

See e.g. https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html

For an example file /usr/bin/ls with a debuglink file of ls.debug, the search
paths should be, in order:

    /usr/lib/debug/.build-id/ab/cdef1234.debug
    /usr/bin/ls.debug
    /usr/bin/.debug/ls.debug
    /usr/lib/debug/usr/bin/ls.debug

On FreeBSD, we use by default the 4th case from the GDB example above - /bin/ls
has debug info in /usr/lib/debug/bin/ls.debug.

Adding some debug logging to Symbols::LocateExecutableSymbolFile shows the
following paths being tried:
Directory /bin
Trying file /bin/ls.debug
Trying file /bin/.debug/ls.debug
Trying file /bin/.build-id/F4/DD1447000000000000000000000000.debug
Trying file /bin/bin/ls
Directory /data/emaste/src/llvm/build
Trying file /data/emaste/src/llvm/build/ls.debug
Trying file /data/emaste/src/llvm/build/.debug/ls.debug
Trying file
/data/emaste/src/llvm/build/.build-id/F4/DD1447000000000000000000000000.debug
Trying file /data/emaste/src/llvm/build/bin/ls
Directory /usr/lib/debug
Trying file /usr/lib/debug/ls.debug
Trying file /usr/lib/debug/.debug/ls.debug
Trying file /usr/lib/debug/.build-id/F4/DD1447000000000000000000000000.debug
Trying file /usr/lib/debug/bin/ls


The current set of LLDB search paths is, for each of dirname in <module_dir>,
<current dir>, and /usr/lib/debug:

        files.push_back (dirname + "/" + symbol_filename);                      
        files.push_back (dirname + "/.debug/" + symbol_filename);               
        files.push_back (dirname + "/.build-id/" + uuid_str);                   
        files.push_back (dirname + module_filename);                            

This ends up including extra paths not in GDB (e.g.
/usr/bin/.build-id/<uuid_str>), and excluding paths that are (e.g.
/usr/lib/debug/usr/bin/ls.debug).  The paths are also in a different order,
compared to GDB.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20131113/52de0140/attachment.html>


More information about the lldb-dev mailing list