[all-commits] [llvm/llvm-project] babef9: [llvm] [Debuginfod] DebuginfodCollection and Debug...

Noah Shutty via All-commits all-commits at lists.llvm.org
Wed Jul 6 13:02:26 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: babef908cc135c05625d7b36e38b55115ec9dc1e
      https://github.com/llvm/llvm-project/commit/babef908cc135c05625d7b36e38b55115ec9dc1e
  Author: Noah Shutty <noahshutty at gmail.com>
  Date:   2022-07-06 (Wed, 06 Jul 2022)

  Changed paths:
    M llvm/include/llvm/DebugInfo/Symbolize/Symbolize.h
    M llvm/include/llvm/Debuginfod/Debuginfod.h
    M llvm/lib/DebugInfo/Symbolize/Symbolize.cpp
    M llvm/lib/Debuginfod/CMakeLists.txt
    M llvm/lib/Debuginfod/Debuginfod.cpp

  Log Message:
  -----------
  [llvm] [Debuginfod] DebuginfodCollection and DebuginfodServer for tracking local debuginfo.

This library implements the class `DebuginfodCollection`, which scans a set of directories for binaries, classifying them according to whether they contain debuginfo. This also provides the `DebuginfodServer`, an `HTTPServer` which serves debuginfod's `/debuginfo` and `/executable` endpoints. This is intended as the final new supporting library required for `llvm-debuginfod`.

As implemented here, `DebuginfodCollection` only finds ELF binaries and DWARF debuginfo. All other files are ignored. However, the class interface is format-agnostic. Generalizing to support other platforms will require refactoring of LLVM's object parsing libraries to eliminate use of `report_fatal_error` ([[ https://github.com/llvm/llvm-project/blob/main/llvm/lib/Object/WasmObjectFile.cpp#L74 | e.g. when reading WASM files ]]), so that the debuginfod daemon does not crash when it encounters a malformed file on the disk.

The `DebuginfodCollection` is tested by end-to-end tests of the debuginfod server (D114846).

Reviewed By: mysterymath

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




More information about the All-commits mailing list