nixpkgs/pkgs/development/tools/misc/gdb/debug-info-from-env.patch
2018-11-16 07:31:05 +00:00

14 lines
498 B
Diff

Initialize debug-file-directory from NIX_DEBUG_INFO_DIRS, a colon-separated list
of directories with separate debugging information files.
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -551,3 +551,6 @@ captured_main_1 (struct captured_main_args *context)
- debug_file_directory = relocate_gdb_directory (DEBUGDIR,
+ debug_file_directory = getenv("NIX_DEBUG_INFO_DIRS");
+
+ if (debug_file_directory == NULL)
+ debug_file_directory = relocate_gdb_directory (DEBUGDIR,
DEBUGDIR_RELOCATABLE);