Skip to content

Honor all debug directories in build ID based lookup - #1673

Merged
d-e-s-o merged 1 commit into
libbpf:mainfrom
d-e-s-o:topic/debug-dir-iter
Sep 22, 2026
Merged

d-e-s-o merged 1 commit into
libbpf:mainfrom
d-e-s-o:topic/debug-dir-iter

Conversation

@d-e-s-o

@d-e-s-o d-e-s-o commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator

DebugFileIter hard codes its build ID based candidate to /usr/lib/debug/.build-id, ignoring the debug directories it is handed entirely. A directory configured via Builder::set_debug_dirs(), hence, never has its .build-id sub-directory consulted, which contradicts the documented promise that a provided list overwrites the defaults. gdb, for comparison, appends /.build-id/ to each debug-file-directory entry.

Adjust the iterator to search .build-id/ sub-directories of all debug dirs instead.

DebugFileIter hard codes its build ID based candidate to
/usr/lib/debug/.build-id, ignoring the debug directories it is handed
entirely. A directory configured via Builder::set_debug_dirs(), hence,
never has its .build-id sub-directory consulted, which contradicts the
documented promise that a provided list overwrites the defaults. gdb,
for comparison, appends /.build-id/ to each debug-file-directory entry.

Adjust the iterator to search .build-id/ sub-directories of all debug
dirs instead.

Signed-off-by: Daniel Müller <deso@posteo.net>
@d-e-s-o
d-e-s-o enabled auto-merge (rebase) September 22, 2026 21:50
@d-e-s-o
d-e-s-o merged commit 86f6ccc into libbpf:main Sep 22, 2026
42 checks passed
@codecov

codecov Bot commented Sep 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.21%. Comparing base (0ec7742) to head (c2b6405).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1673   +/-   ##
=======================================
  Coverage   95.20%   95.21%           
=======================================
  Files          58       58           
  Lines       11305    11341   +36     
=======================================
+ Hits        10763    10798   +35     
- Misses        542      543    +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@d-e-s-o
d-e-s-o deleted the topic/debug-dir-iter branch September 22, 2026 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant