[all-commits] [llvm/llvm-project] 00e436: [llvm-symbolizer] Support debug file lookup using ...

Petr Hosek via All-commits all-commits at lists.llvm.org
Wed Dec 4 15:08:38 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 00e436f1307f506681782d26f4d3b9e98feada5a
      https://github.com/llvm/llvm-project/commit/00e436f1307f506681782d26f4d3b9e98feada5a
  Author: Petr Hosek <phosek at google.com>
  Date:   2019-12-04 (Wed, 04 Dec 2019)

  Changed paths:
    M llvm/include/llvm/DebugInfo/Symbolize/Symbolize.h
    M llvm/lib/DebugInfo/Symbolize/Symbolize.cpp
    A llvm/test/DebugInfo/Inputs/.build-id/ab/b50d82b6bdc861.debug
    A llvm/test/DebugInfo/symbolize-build-id.test
    M llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp

  Log Message:
  -----------
  [llvm-symbolizer] Support debug file lookup using build ID

Build ID is a protocol for looking up debug files that's already
supported by various tools including debuggers. For example, when
locating debug files, gdb would check the following directories:

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

llvm-symbolizer currently consults all of these except for build ID
based one. This patch implements support for build ID lookup. The
set of debug directories to search is specified by the new option:
--debug-file-directory, whose name matches the debug-file-directory
variable used by gdb for the same purpose.

Differential Revision: https://reviews.llvm.org/D70759




More information about the All-commits mailing list