From 721637d9afd62e70f0a4350fb38c2569fe23e80b Mon Sep 17 00:00:00 2001 Message-Id: <721637d9afd62e70f0a4350fb38c2569fe23e80b.1677652927.git.efraim@flashner.co.il> From: Efraim Flashner Date: Mon, 13 Feb 2023 20:56:54 +0200 Subject: [PATCH v2] system: Update skeleton gdbinit. * gnu/system/shadow.scm (default-skeleton): Update gdbinit to search for more debug packages in guix-home and the system profile. (skeleton-directory): Move .gdbinit to .config/gdb/gdbinit. --- gnu/system/shadow.scm | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm index 445a72e2f5..2bd72d3e96 100644 --- a/gnu/system/shadow.scm +++ b/gnu/system/shadow.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2013-2020, 2022 Ludovic Courtès ;;; Copyright © 2016 Alex Griffin ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen -;;; Copyright © 2020 Efraim Flashner +;;; Copyright © 2020, 2023 Efraim Flashner ;;; Copyright © 2020 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. @@ -168,8 +168,16 @@ (define (default-skeletons) guile (use-modules (gdb)) (execute (string-append \"set debug-file-directory \" - (or (getenv \"GDB_DEBUG_FILE_DIRECTORY\") - \"~/.guix-profile/lib/debug\"))) + (string-join + (filter file-exists? + (append + (if (getenv \"GDB_DEBUG_FILE_DIRECTORY\") + (list (getenv \"GDB_DEBUG_FILE_DIRECTORY\")) + '()) + (list \"~/.guix-home/profile/lib/debug\" + \"~/.guix-profile/lib/debug\" + \"/run/current-system/profile/lib/debug\"))) + \":\"))) end # Authorize extensions found in the store, such as the @@ -228,6 +236,9 @@ (define (skeleton-directory skeletons) (when (file-exists? ".nanorc") (mkdir-p ".config/nano") (rename-file ".nanorc" ".config/nano/nanorc")) + (when (file-exists? ".gdbinit") + (mkdir-p ".config/gdb") + (rename-file ".gdbinit" ".config/gdb/gdbinit")) #t)))) (define (find-duplicates list) base-commit: f9925ad9c4b30ef7fe5fdb7b3ad93e1940d40cd3 -- Efraim Flashner אפרים פלשנר GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted