diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2020-08-16 01:24:05 -0400 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2020-08-16 15:26:26 -0400 |
commit | 720a4adc91c632e097d9e064ce8e95617cf76fb0 (patch) | |
tree | aa8ae98bff4aa53f99997f96a2f560be95f62d75 /doc | |
parent | 8b074a0abef78341d98ac4ca8e6f27bfcc7aa65b (diff) | |
download | guix-720a4adc91c632e097d9e064ce8e95617cf76fb0.tar.gz |
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.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/guix.texi | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index 7beb2c3f27..09229172b5 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -29919,6 +29919,20 @@ GDB}): From there on, GDB will pick up debugging information from the @file{.debug} files under @file{~/.guix-profile/lib/debug}. +Below is an alternative GDB script which is useful when working with +other profiles. It takes advantage of the optional Guile integration in +GDB. This snippet is included by default on Guix System in the +@file{~/.gdbinit} file. + +@example +guile +(use-modules (gdb)) +(execute (string-append "set debug-file-directory " + (or (getenv "GDB_DEBUG_FILE_DIRECTORY") + "~/.guix-profile/lib/debug"))) +end +@end example + In addition, you will most likely want GDB to be able to show the source code being debugged. To do that, you will have to unpack the source code of the package of interest (obtained with @code{guix build |