home: add gdb

This commit is contained in:
Bruno BELANYI 2021-08-20 20:03:30 +02:00
parent 087794433e
commit bc6761bdc9
3 changed files with 40 additions and 0 deletions

View file

@ -10,6 +10,7 @@
./firefox ./firefox
./flameshot.nix ./flameshot.nix
./gammastep.nix ./gammastep.nix
./gdb
./git ./git
./gpg.nix ./gpg.nix
./gtk.nix ./gtk.nix

17
home/gdb/default.nix Normal file
View file

@ -0,0 +1,17 @@
{ config, lib, pkgs, ... }:
let
cfg = config.my.home.gdb;
in
{
options.my.home.gdb = with lib; {
enable = my.mkDisableOption "gdb configuration";
};
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [
gdb
];
xdg.configFile."gdb/gdbinit".source = ./gdbinit;
};
}

22
home/gdb/gdbinit Normal file
View file

@ -0,0 +1,22 @@
# Keep a history of all commands in each directory
set history save on
# Enable those pretty-printers
enable pretty-printer
# Pretty formatting of structures
set print pretty on
# Show derived type based on VTable
set print object on
# Show static members
set print static-members on
# Show VTable
set print vtbl on
# Demangle types
set print demangle on
# Read python scrips in the load path
set auto-load python-scripts
# Allow autoloading project-local .gdbinit files
add-auto-load-safe-path ~/git/