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

libcdb.unstrip_libc: debug symbols are fetched only if not present #2374

Merged
merged 2 commits into from
Mar 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@ The table below shows which release corresponds to each branch, and what date th
## 4.14.0 (`dev`)

- [#2356][2356] Add local libc database provider for libcdb
- [#2374][2374] libcdb.unstrip_libc: debug symbols are fetched only if not present

[2356]: https://github.com/Gallopsled/pwntools/pull/2356
[2374]: https://github.com/Gallopsled/pwntools/pull/2374

## 4.13.0 (`beta`)

Expand Down
4 changes: 4 additions & 0 deletions pwnlib/libcdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,10 @@ def unstrip_libc(filename):
log.warn_once('Given libc does not have a buildid. Cannot look for debuginfo to unstrip.')
return False

if libc.debuginfo:
log.debug('Given libc already contains debug information. Skipping unstrip.')
return True

log.debug('Trying debuginfod servers: %r', DEBUGINFOD_SERVERS)

for server_url in DEBUGINFOD_SERVERS:
Expand Down
Loading