diff options
Diffstat (limited to 'nixpkgs/pkgs/development/tools/misc/gdb/debug-info-from-env.patch')
-rw-r--r-- | nixpkgs/pkgs/development/tools/misc/gdb/debug-info-from-env.patch | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/tools/misc/gdb/debug-info-from-env.patch b/nixpkgs/pkgs/development/tools/misc/gdb/debug-info-from-env.patch new file mode 100644 index 000000000000..a7eda2c7e173 --- /dev/null +++ b/nixpkgs/pkgs/development/tools/misc/gdb/debug-info-from-env.patch @@ -0,0 +1,13 @@ +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); |