guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 1892626390bac09f8942519c20cae4ace1758275
Author: Ludovic Courtès <[email protected]>
AuthorDate: Thu Feb 19 10:37:50 2026 +0100

    system: gdbinit: Fix default ‘debug-file-directory’ for user profiles.
    
    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 <[email protected]>
---
 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
 

Reply via email to