GNU bug report logs -
#61486
[PATCH] system: Update skeleton gdbinit.
Previous Next
Reported by: Efraim Flashner <efraim <at> flashner.co.il>
Date: Mon, 13 Feb 2023 19:01:03 UTC
Severity: normal
Tags: patch
Done: Efraim Flashner <efraim <at> flashner.co.il>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 61486 <at> debbugs.gnu.org (full text, mbox):
Hi Efraim,
Efraim Flashner <efraim <at> flashner.co.il> skribis:
> * gnu/system/shadow.scm (default-skeleton): Update gdbinit to also
> search for debug packages in guix-home.
> (skeleton-directory): Move .gdbinit to .config/gdb/gdbinit.
[...]
> (use-modules (gdb))
> (execute (string-append \"set debug-file-directory \"
> (or (getenv \"GDB_DEBUG_FILE_DIRECTORY\")
> - \"~/.guix-profile/lib/debug\")))
> + \"~/.guix-profile/lib/debug\"
> + \"~/.guix-home/profile/lib/debug\")))
This won’t have the desired effect:
--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> (or #f "a" "b")
$10 = "a"
--8<---------------cut here---------------end--------------->8---
Perhaps we should check with ‘file-exists?’ which one to pick, probably
giving higher precedence to ~/.guix-home/profile since Guix Home users
might have both (I do).
> + (when (file-exists? ".gdbinit")
> + (mkdir-p ".config/gdb")
> + (rename-file ".gdbinit" ".config/gdb/gdbinit"))
I couldn’t believe it so I had to check the manual and yes, GDB does
look for ~/.config/gdb/gdbinit! Incredible.
Thanks,
Ludo’.
This bug report was last modified 2 years and 172 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.