From 1892626390bac09f8942519c20cae4ace1758275 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 19 Feb 2026 10:37:50 +0100 Subject: [PATCH] =?UTF-8?q?system:=20gdbinit:=20Fix=20default=20=E2=80=98d?= =?UTF-8?q?ebug-file-directory=E2=80=99=20for=20user=20profiles.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes a bug whereby ‘file-exists?’ would be called on tilde-prefixed directory names before tilde expansion has taken place. As a result, ~/.guix-profile and ~/.guix-home/profile would never be included in ‘debug-file-directory’. * gnu/system/shadow.scm (%default-gdbinit): Remove call to ‘file-exists?’. Change-Id: I3a6bf1fec6bfbf208679d030dd6b380b9c6a4789 Signed-off-by: Ludovic Courtès --- gnu/system/shadow.scm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm index 6cb1a23253..aa7aec782f 100644 --- a/gnu/system/shadow.scm +++ b/gnu/system/shadow.scm @@ -216,14 +216,14 @@ guile (use-modules (gdb)) (execute (string-append \"set debug-file-directory \" (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\"))) + (append + (if (getenv \"GDB_DEBUG_FILE_DIRECTORY\") + (list (getenv \"GDB_DEBUG_FILE_DIRECTORY\")) + '()) + ;; Note: GDB performs tilde expansion. + (list \"~/.guix-home/profile/lib/debug\" + \"~/.guix-profile/lib/debug\" + \"/run/current-system/profile/lib/debug\")) \":\"))) end