mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
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 <ludo@gnu.org>
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user