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

Detect debug-file-directory for gdb installed by Nix #1169

Open
tesuji opened this issue Jan 31, 2025 · 0 comments
Open

Detect debug-file-directory for gdb installed by Nix #1169

tesuji opened this issue Jan 31, 2025 · 0 comments

Comments

@tesuji
Copy link
Contributor

tesuji commented Jan 31, 2025

Type of feature request

Debuginfo

Misc

No response

Summary Description

pwndbg detects or has the default of debug-file-directory as /nix/store/k51rfv38p65jbhw906vpl85yg1vd7xqn-gdb-15.2/lib/debug:/usr/lib/debug. Meanwhile gef and raw gdb has the default /nix/store/k51rfv38p65jbhw906vpl85yg1vd7xqn-gdb-15.2/lib/debug.

Implementation idea/suggestion

It might be possible to detect if /usr/lib/debug exist. If yes, then add that path with set debug-file-directory <path> command.

Existing alternatives?

N/A.

Additional information

gef➤  help set debug-file-directory
Set the directories where separate debug symbols are searched for.
Separate debug symbols are first searched for in the same
directory as the binary, then in the `.debug' subdirectory,
and lastly at the path of the directory of the binary with
each global debug-file-directory component prepended.
gef➤  version
GEF: (Standalone)
Blob Hash(/home/hacker/.gef.py): 3cf857c4a9a80e4cf0d1a1345cd672b9631341e0
SHA256(/home/hacker/.gef.py): af072d7fe7e66a08dcf0a78f8c5d39ed04fef670837d7c5384e288ea656bd239
GDB: 15.2
GDB-Python: 3.12
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

No branches or pull requests

1 participant