Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add debuginfod support #3954

Merged
merged 15 commits into from
Nov 6, 2023
Merged

Add debuginfod support #3954

merged 15 commits into from
Nov 6, 2023

Conversation

imbillow
Copy link
Contributor

@imbillow imbillow commented Nov 3, 2023

Add rz_bin_dwarf_from_debuginfod

Your checklist for this pull request

  • I've read the guidelines for contributing to this repository
  • I made sure to follow the project's coding style
  • I've documented or updated the documentation of every function and struct this PR changes. If not so I've explained why.
  • I've added tests that prove my fix is effective or that my feature works (if possible)
  • I've updated the rizin book with the relevant information (if needed)

Detailed description

...

Test plan

...

Closing issues

closes #1285

Copy link
Member

@XVilka XVilka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also need to think about how to test this automatically without relying too much on external services. By running a debuginfod mock server of our own?

@imbillow
Copy link
Contributor Author

imbillow commented Nov 4, 2023

We also need to think about how to test this automatically without relying too much on external services. By running a debuginfod mock server of our own?

We can run a local private server when run CI.
https://sourceware.org/elfutils/Debuginfod.html

private servers
To run your own server, identify the directories containing raw build files, or RPM packages, or DEB packages, or any combination, plus any desired upstream federated servers. Launch debuginfod into the background, or use systemd.
% export DEBUGINFOD_URLS=https://foo.bar/   # list of federated upstream servers, if any
% debuginfod [-F $files] [-R $rpms] [-U $debs] &
Then, configure clients to talk to this server:
% export DEBUGINFOD_URLS=http://localhost:8002/

@imbillow imbillow force-pushed the dwarf-debuginfod branch 2 times, most recently from c2b5fa0 to 471b503 Compare November 4, 2023 12:24
@imbillow imbillow marked this pull request as ready for review November 4, 2023 12:24
@imbillow imbillow requested a review from XVilka November 4, 2023 12:48
Copy link
Member

@XVilka XVilka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good. We need to make sure debuginfod is present on the CI for this test though, or maybe run it only on Linux systems, just like debugging tests.

librz/bin/dwarf/dwarf.c Show resolved Hide resolved
Copy link
Member

@XVilka XVilka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. @wargio @ret2libc, take a look, too, please.

@XVilka

This comment was marked as resolved.

XVilka

This comment was marked as resolved.

@XVilka

This comment was marked as resolved.

@XVilka XVilka merged commit 4440004 into dev Nov 6, 2023
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for loading debug information from debuginfod
2 participants