1
1
Fork 1
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:
oddlama 2023-09-15 18:01:24 +02:00
parent 1a8072dcda
commit e7561e6933
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
2 changed files with 22 additions and 6 deletions

View file

@ -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 = {
target = ".gdbinit";
text = ''
set debuginfod enabled on
set auto-load safe-path /
set disassembly-flavor intel
set history save on
set print pretty on
'';
};
}