nixpkgs/pkgs/development/tools/misc/gdb/debug-info-from-env.patch

14 lines
498 B
Diff
Raw Normal View History

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