[all-commits] [llvm/llvm-project] 36f019: [llvm] [Debuginfod] LLVM debuginfod server.

Noah Shutty via All-commits all-commits at lists.llvm.org
Thu Jul 7 11:33:41 PDT 2022


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

  Changed paths:
    M llvm/test/CMakeLists.txt
    M llvm/test/lit.cfg.py
    M llvm/test/lit.site.cfg.py.in
    A llvm/test/tools/llvm-debuginfod/Inputs/main-debug.exe
    A llvm/test/tools/llvm-debuginfod/Inputs/main.exe
    A llvm/test/tools/llvm-debuginfod/llvm-debuginfod.test
    A llvm/tools/llvm-debuginfod/CMakeLists.txt
    A llvm/tools/llvm-debuginfod/llvm-debuginfod.cpp

  Log Message:
  -----------
  [llvm] [Debuginfod] LLVM debuginfod server.

This implements a debuginfod server in llvm using the `DebuginfodCollection` and `DebuginfodServer` classes. This is tested with lit tests against the debuginfod-find client.

The server scans 0 or more local directories for artifacts. It serves the debuginfod protocol over HTTP. Only the `executable` and `debuginfo` endpoints are supported (no `/source` endpoint).
The server also uses the debuginfod client as a fallback, so it can hit the local debuginfod cache or federate to other known debuginfod servers.
The client behavior is controllable through the standard environment variables (`DEBUGINFOD_URLS`, `DEBUGINFOD_CACHE_PATH`, `DEBUGINFOD_TIMEOUT`)

The server implements on-demand collection updates as follows:
If the build-id is not found by a local lookup, rescan immediately and look up the build-id again before returning 404. To protect against DoS attacks, do not rescan more frequently than once per N seconds (specified by `-m`).

Lit tests are provided which test the `llvm-debuginfod-find` client against the `llvm-debuginfod` server.

Reviewed By: mysterymath

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




More information about the All-commits mailing list