2022-06-16 17:23:12 +00:00
|
|
|
--- a/gdb/main.c
|
|
|
|
+++ b/gdb/main.c
|
|
|
|
@@ -708,8 +708,12 @@ captured_main_1 (struct captured_main_args *context)
|
|
|
|
if (gdb_sysroot.empty ())
|
|
|
|
gdb_sysroot = TARGET_SYSROOT_PREFIX;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
- debug_file_directory
|
2022-06-16 17:23:12 +00:00
|
|
|
- = relocate_gdb_directory (DEBUGDIR, DEBUGDIR_RELOCATABLE);
|
|
|
|
+ const char * nix_debug = getenv ("NIX_DEBUG_INFO_DIRS");
|
|
|
|
+ if (nix_debug != NULL)
|
|
|
|
+ debug_file_directory = nix_debug;
|
2020-04-24 23:36:52 +00:00
|
|
|
+ else
|
|
|
|
+ debug_file_directory
|
2022-06-16 17:23:12 +00:00
|
|
|
+ = relocate_gdb_directory (DEBUGDIR, DEBUGDIR_RELOCATABLE);
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
gdb_datadir = relocate_gdb_directory (GDB_DATADIR,
|
|
|
|
GDB_DATADIR_RELOCATABLE);
|