-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
Open
Labels
0.kind: bugSomething is brokenSomething is broken
Description
Nixpkgs version
- Unstable (25.05)
Describe the bug
What is broken
Using gdb in ghidra is broken with ghidra.withExtensions:
programs.ghidra = {
enable = true;
package = pkgs.ghidra.withExtensions (_: []); // pkgs.ghidra here works
};Trying to invoke the debugger from ghidra:
Python Exception <class 'ModuleNotFoundError'>: No module named 'ghidragdb'
Error occurred in Python: No module named 'ghidragdb'
The target architecture is set to "i386:x86-64".
The target endianness is set automatically (currently little endian).
Reading symbols from /home/sliedes/nv/ghidra/nvidia-debugdump_570.124.04...
warning: Loadable section ".interp" outside of ELF segments
in /home/sliedes/nv/ghidra/nvidia-debugdump_570.124.04
(No debugging symbols found in /home/sliedes/nv/ghidra/nvidia-debugdump_570.124.
04)
Undefined command: "ghidra". Try "help".
Undefined command: "ghidra". Try "help".
Undefined command: "ghidra". Try "help".
Starting program: /home/sliedes/nv/ghidra/nvidia-debugdump_570.124.04
Program stopped.
0x00007ffff7fe27c0 in _start ()
from /nix/store/cmpyglinc9xl9pr4ymx8akl286ygl64x-glibc-2.40-66/lib/ld-linux-x
86-64.so.2
(gdb) python
>import sys
>print(sys.path)
>
>quit
['/nix/store/lfnn09lwxaaj8yivb390pz295fz8y98x-gdb-16.2/share/gdb/python', '/nix/store/w4anw5l6hsv6i110ypva57ij6
hrmpph1-ghidra-with-extensions-11.3.1/lib/ghidra/Ghidra/Debug/Debugger-rmi-trace/pypkg/src', '/nix/store/w4anw5
l6hsv6i110ypva57ij6hrmpph1-ghidra-with-extensions-11.3.1/lib/ghidra/Ghidra/Debug/Debugger-agent-gdb/pypkg/src',
'/nix/store/m8d2ydd0klbinccnxfsympnmpkqkfa6y-ghidra-11.3.1/lib/ghidra/Ghidra/Debug/Debugger-agent-gdb/data/deb
ugger-launchers', '/nix/store/wz0j2zi02rvnjiz37nn28h3gfdq61svz-python3-3.12.9/lib/python312.zip', '/nix/store/w
z0j2zi02rvnjiz37nn28h3gfdq61svz-python3-3.12.9/lib/python3.12', '/nix/store/wz0j2zi02rvnjiz37nn28h3gfdq61svz-py
thon3-3.12.9/lib/python3.12/lib-dynload', '/nix/store/wz0j2zi02rvnjiz37nn28h3gfdq61svz-python3-3.12.9/lib/pytho
n3.12/site-packages', '/nix/store/wz0j2zi02rvnjiz37nn28h3gfdq61svz-python3-3.12.9/lib/python3.12/site-packages'
, '/nix/store/6hn8pj7w6ym8pc894kjjs6v17br1bjp7-python3.12-psutil-6.1.1/lib/python3.12/site-packages', '/nix/sto
re/hccwkp5dmscx346gy31gn2000qv7k3xq-python3.12-protobuf-5.29.3/lib/python3.12/site-packages']
Notice that the Python paths point to ghidra-with-extensions, but that package does not contain gdbghidra.
What works
If I use just pkgs.ghidra, it works:
Reading symbols from /home/sliedes/nv/ghidra/nvidia-debugdump_570.124.04...
warning: Loadable section ".interp" outside of ELF segments
in /home/sliedes/nv/ghidra/nvidia-debugdump_570.124.04
(No debugging symbols found in /home/sliedes/nv/ghidra/nvidia-debugdump_570.124.
04)
Connected to Ghidra 11.3.1 at 127.0.0.1:44047
Starting program: /home/sliedes/nv/ghidra/nvidia-debugdump_570.124.04
Program stopped.
0x00007ffff7fe27c0 in _start ()
from /nix/store/cmpyglinc9xl9pr4ymx8akl286ygl64x-glibc-2.40-66/lib/ld-linux-x86-64.so.2
(gdb) import sys
Undefined command: "import". Try "help".
(gdb) python
>import sys
>sys.path
>quit
(gdb) python
>print(sys.path)
>quit
['/nix/store/lfnn09lwxaaj8yivb390pz295fz8y98x-gdb-16.2/share/gdb/python', '/nix/store/m8d2ydd0klbinccnxfsympnmp
kqkfa6y-ghidra-11.3.1/lib/ghidra/Ghidra/Debug/Debugger-rmi-trace/pypkg/src', '/nix/store/m8d2ydd0klbinccnxfsymp
nmpkqkfa6y-ghidra-11.3.1/lib/ghidra/Ghidra/Debug/Debugger-agent-gdb/pypkg/src', '/nix/store/m8d2ydd0klbinccnxfs
ympnmpkqkfa6y-ghidra-11.3.1/lib/ghidra/Ghidra/Debug/Debugger-agent-gdb/data/debugger-launchers', '/nix/store/wz
0j2zi02rvnjiz37nn28h3gfdq61svz-python3-3.12.9/lib/python312.zip', '/nix/store/wz0j2zi02rvnjiz37nn28h3gfdq61svz-
python3-3.12.9/lib/python3.12', '/nix/store/wz0j2zi02rvnjiz37nn28h3gfdq61svz-python3-3.12.9/lib/python3.12/lib-
dynload', '/nix/store/wz0j2zi02rvnjiz37nn28h3gfdq61svz-python3-3.12.9/lib/python3.12/site-packages', '/nix/stor
e/wz0j2zi02rvnjiz37nn28h3gfdq61svz-python3-3.12.9/lib/python3.12/site-packages', '/nix/store/6hn8pj7w6ym8pc894k
jjs6v17br1bjp7-python3.12-psutil-6.1.1/lib/python3.12/site-packages', '/nix/store/hccwkp5dmscx346gy31gn2000qv7k
3xq-python3.12-protobuf-5.29.3/lib/python3.12/site-packages']
(gdb)
Steps to reproduce
Install ghidra.withExtensions with an empty extensions list.
Expected behaviour
gdb works
Screenshots
No response
Relevant log output
Additional context
No response
System metadata
- system:
"x86_64-linux" - host os:
Linux 6.12.19, NixOS, 25.05 (Warbler), 25.05.20250319.a84ebe2 - multi-user?:
yes - sandbox:
yes - version:
nix-env (Nix) 2.24.12 - channels(root):
"nixos" - nixpkgs:
/nix/store/1728d3jg85mkz2w2cvk6vi74i30fn6x7-source
Notify maintainers
I believe @GovanifY introduced the gdb functionality in #375831?
Other maintainers: @roblabla @vringar @ck3d @Mic92
Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)
I assert that this issue is relevant for Nixpkgs
- I assert that this is a bug and not a support request.
- I assert that this is not a duplicate of an existing issue.
- I assert that I have read the NixOS Code of Conduct and agree to abide by it.
Is this issue important to you?
Add a 👍 reaction to issues you find important.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
0.kind: bugSomething is brokenSomething is broken