mirror of
https://github.com/oddlama/nix-config.git
synced 2025-10-11 07:10:39 +02:00
feat: use pwndbg as default gdb
This commit is contained in:
parent
1a8072dcda
commit
e7561e6933
2 changed files with 22 additions and 6 deletions
|
@ -4,11 +4,6 @@
|
||||||
./yubikey.nix
|
./yubikey.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
(gdb.override { enableDebuginfod = true; })
|
|
||||||
hotspot
|
|
||||||
];
|
|
||||||
|
|
||||||
environment.enableDebugInfo = true;
|
environment.enableDebugInfo = true;
|
||||||
services.nixseparatedebuginfod.enable = true;
|
services.nixseparatedebuginfod.enable = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,29 @@
|
||||||
{
|
{ pkgs, ... }: let
|
||||||
|
# pwndbg wraps a gdb binary for us, but we want debuginfod in there too.
|
||||||
|
# Also make it the default gdb.
|
||||||
|
pwndbgWithDebuginfod = (pkgs.pwndbg.override {
|
||||||
|
gdb = pkgs.gdb.override {
|
||||||
|
enableDebuginfod = true;
|
||||||
|
};
|
||||||
|
}).overrideAttrs (_finalAttrs: previousAttrs: {
|
||||||
|
installPhase = previousAttrs.installPhase + ''
|
||||||
|
ln -s $out/bin/pwndbg $out/bin/gdb
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
in {
|
||||||
|
home.packages = [
|
||||||
|
pwndbgWithDebuginfod
|
||||||
|
pkgs.hotspot
|
||||||
|
];
|
||||||
|
|
||||||
home.file.gdbinit = {
|
home.file.gdbinit = {
|
||||||
target = ".gdbinit";
|
target = ".gdbinit";
|
||||||
text = ''
|
text = ''
|
||||||
|
set debuginfod enabled on
|
||||||
set auto-load safe-path /
|
set auto-load safe-path /
|
||||||
|
set disassembly-flavor intel
|
||||||
|
set history save on
|
||||||
|
set print pretty on
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue