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 #736

Merged
merged 3 commits into from Feb 1, 2021
Merged

Add debuginfod support #736

merged 3 commits into from Feb 1, 2021

Conversation

aaronmerey
Copy link
Contributor

@aaronmerey aaronmerey commented Apr 7, 2020

Debuginfod is a lightweight web service that indexes ELF/DWARF debugging
resources by build-id and serves them over HTTP.

This patch enables dyninst to query debuginfod servers for a file's
separate debuginfo when it otherwise cannot be found.

This patch also adds a cmake option -DENABLE_DEBUGINFOD to control
whether dyninst is built with debuginfod support.

This requires having the debuginfod client library (libdebuginfod)
and header installed.

Debuginfod is distributed with elfutils, for more information see
https://sourceware.org/elfutils/Debuginfod.html

Closes #734

Debuginfod is a lightweight web service that indexes ELF/DWARF debugging
resources by build-id and serves them over HTTP.

This patch enables dyninst to query debuginfod servers for a file's
separate debuginfo when it otherwise cannot be found.

This patch also adds a cmake option -DENABLE_DEBUGINFOD to control
whether dyninst is built with debuginfod support.

This requires having the debuginfod client library (libdebuginfod)
and header installed.

Debuginfod is distributed with elfutils, for more information see
https://sourceware.org/elfutils/Debuginfod.html
@aaronmerey
Copy link
Contributor Author

aaronmerey commented Apr 22, 2020

Ping, just wondering if there's been any progress setting up a local debuginfod server to verify the patch. debuginfod should be built from elfutils 0.179. Just include the configure option '--enable-debuginfod'. This requires having libmicrohttpd, libcurl, sqlite3 and libarchive installed.

Once installed, set the DEBUGINFOD_URLS environment variable to 'http://localhost:8002' (the server listens to port 8002 by default). A debuginfod server will start up and index a mutatee's separate debuginfo with the following command:

$ debuginfod -F directory_ containing_separate_debuginfo

If this debuginfo file is stored in a location that Elf_X::findDebugFile() cannot normally locate and dyninst is built with the -DENABLE_DEBUGINFOD option added in this patch, then the file should be acquired via debuginfod_find_debuginfo() within Elf_X::findDebugFile().

@hainest
Copy link
Contributor

hainest commented Apr 24, 2020

There are only three Dyninst developers, and we're all currently fixing bugs to try to push the 10.2 release out. We greatly appreciate folks contributing code, but we just don't have the cycles to test this right now. I will try to take a look at it next week sometime, but I can't make any promises right now. I'm assuming this PR is working for you in your local environment?

@hainest hainest self-assigned this Apr 24, 2020
@aaronmerey
Copy link
Contributor Author

Not a problem. The PR is working for me locally.

@hainest hainest added this to the Release 10.3 milestone May 19, 2020
elf/src/Elf_X.C Show resolved Hide resolved
cmake/ElfUtils.cmake Outdated Show resolved Hide resolved
cmake/ElfUtils.cmake Outdated Show resolved Hide resolved
cmake/ElfUtils.cmake Outdated Show resolved Hide resolved
cmake/ElfUtils.cmake Outdated Show resolved Hide resolved
@hainest
Copy link
Contributor

hainest commented Feb 1, 2021

https://bottle.cs.wisc.edu/search?dyninst_branch=PR736&status=OK

LGTM. I ran it with and without debuginfod. We don't have any explicit test for that, but it didn't introduce any regressions. If things are working on your end, I'll merge.

@aaronmerey
Copy link
Contributor Author

Great. Things are working on my end too.

@hainest hainest merged commit a0f27a5 into dyninst:master Feb 1, 2021
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 debuginfod support to dyninst
2 participants