diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2020-08-16 01:24:05 -0400 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2020-08-16 15:26:26 -0400 |
commit | 720a4adc91c632e097d9e064ce8e95617cf76fb0 (patch) | |
tree | aa8ae98bff4aa53f99997f96a2f560be95f62d75 /gnu/system | |
parent | 8b074a0abef78341d98ac4ca8e6f27bfcc7aa65b (diff) |
system: Modify GDB skeleton to find debug files for any profile.
Instead of hard coding the debug directory to that of the user profile, use
Guile scripting in combination with a new search path specification on GDB to
specify the debug file directories.
* gnu/packages/gdb.scm (gdb-9.1): Add a search path specification for the
GDB_DEBUG_FILE_DIRECTORY environment variable.
* gnu/system/shadow.scm (default-skeletons)[gdbinit]: Derive the value of
DEBUG-FILE-DIRECTORY via the GDB_DEBUG_FILE_DIRECTORY environment variable.
* doc/guix.texi (Installing Debugging Files): Document it.
Diffstat (limited to 'gnu/system')
-rw-r--r-- | gnu/system/shadow.scm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm index a69339bc07..8c76bc2b11 100644 --- a/gnu/system/shadow.scm +++ b/gnu/system/shadow.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com> ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il> +;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -162,7 +163,12 @@ XTerm*utf8: always XTerm*metaSendsEscape: true\n")) (gdbinit (plain-file "gdbinit" "\ # Tell GDB where to look for separate debugging files. -set debug-file-directory ~/.guix-profile/lib/debug +guile +(use-modules (gdb)) +(execute (string-append \"set debug-file-directory \" + (or (getenv \"GDB_DEBUG_FILE_DIRECTORY\") + \"~/.guix-profile/lib/debug\"))) +end # Authorize extensions found in the store, such as the # pretty-printers of libstdc++. |