From 720a4adc91c632e097d9e064ce8e95617cf76fb0 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Sun, 16 Aug 2020 01:24:05 -0400 Subject: 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. --- gnu/packages/gdb.scm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gnu/packages') diff --git a/gnu/packages/gdb.scm b/gnu/packages/gdb.scm index 830121751f..11e0bb3e76 100644 --- a/gnu/packages/gdb.scm +++ b/gnu/packages/gdb.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2020 Marius Bakke ;;; Copyright © 2020 Vincent Legoll ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen +;;; Copyright © 2020 Maxim Cournoyer ;;; ;;; This file is part of GNU Guix. ;;; @@ -117,6 +118,12 @@ ("dejagnu" ,dejagnu) ("pkg-config" ,pkg-config) ,@(if (hurd-target?) `(("mig" ,mig)) '()))) + ;; TODO: Add support for the GDB_DEBUG_FILE_DIRECTORY environment variable + ;; in GDB itself instead of relying on some glue code in the Guix-provided + ;; .gdbinit file. + (native-search-paths (list (search-path-specification + (variable "GDB_DEBUG_FILE_DIRECTORY") + (files '("lib/debug"))))) (home-page "https://www.gnu.org/software/gdb/") (synopsis "The GNU debugger") (description -- cgit v1.2.3