aboutsummaryrefslogtreecommitdiff
path: root/gdb/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/main.c')
-rw-r--r--gdb/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/main.c b/gdb/main.c
index 72b8714..8f276b4 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -548,6 +548,12 @@ captured_main (void *data)
gdb_sysroot = relocate_gdb_directory (TARGET_SYSTEM_ROOT,
TARGET_SYSTEM_ROOT_RELOCATABLE);
+ if (gdb_sysroot == NULL || *gdb_sysroot == '\0')
+ {
+ xfree (gdb_sysroot);
+ gdb_sysroot = xstrdup (TARGET_SYSROOT_PREFIX);
+ }
+
debug_file_directory = relocate_gdb_directory (DEBUGDIR,
DEBUGDIR_RELOCATABLE);