gdb: 8.3.1 -> 9.1

See https://www.gnu.org/software/gdb/download/ANNOUNCEMENT for release
information
This commit is contained in:
Lancelot SIX
2020-03-06 07:04:07 +01:00
committed by Frederik Rietdijk
parent bb0d036002
commit 4e08586690
4 changed files with 33 additions and 16 deletions
@@ -1,15 +1,24 @@
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
@@ -556,3 +556,8 @@ captured_main_1 (struct captured_main_args *context)
diff -ur a/gdb/main.c b/gdb/main.c
--- a/gdb/main.c 2020-02-08 13:50:14.000000000 +0100
+++ b/gdb/main.c 2020-02-24 10:02:07.731806739 +0100
@@ -567,9 +567,17 @@
gdb_sysroot = xstrdup (TARGET_SYSROOT_PREFIX);
}
- debug_file_directory = relocate_gdb_directory (DEBUGDIR,
+ debug_file_directory = getenv("NIX_DEBUG_INFO_DIRS");
+
- debug_file_directory
- = xstrdup (relocate_gdb_directory (DEBUGDIR,
- DEBUGDIR_RELOCATABLE).c_str ());
+ debug_file_directory = getenv ("NIX_DEBUG_INFO_DIRS");
+ if (debug_file_directory != NULL)
+ debug_file_directory = xstrdup(debug_file_directory);
+ // This might be updated later using
+ // $ set debug-file-directory /to/some/path
+ // which will use xfree. We must then have a xmallocated
+ // copy of the string that can be xfeed later.
+ debug_file_directory = xstrdup (debug_file_directory);
+ else
+ debug_file_directory = relocate_gdb_directory (DEBUGDIR,
DEBUGDIR_RELOCATABLE);
+ debug_file_directory
+ = xstrdup (relocate_gdb_directory (DEBUGDIR,
+ DEBUGDIR_RELOCATABLE).c_str ());
gdb_datadir = relocate_gdb_directory (GDB_DATADIR,
GDB_DATADIR_RELOCATABLE);