aboutsummaryrefslogtreecommitdiff
path: root/gdb/main.c
diff options
context:
space:
mode:
authorGary Benson <gbenson@redhat.com>2015-04-02 13:38:29 +0100
committerGary Benson <gbenson@redhat.com>2015-04-02 13:38:29 +0100
commitfed040c6a50399617d8265cbddc7fd21b3f134ef (patch)
tree5391063690688d21964d672de16dee01e8b8b846 /gdb/main.c
parent64c0b5de8dfd68c54060b07d54b1edf8d22fc52b (diff)
downloadbinutils-fed040c6a50399617d8265cbddc7fd21b3f134ef.zip
binutils-fed040c6a50399617d8265cbddc7fd21b3f134ef.tar.gz
binutils-fed040c6a50399617d8265cbddc7fd21b3f134ef.tar.bz2
Make the default sysroot be "target:"
This commit makes GDB default to a sysroot of "target:". One testcase needed updating as a result of this change. gdb/ChangeLog: * main.c (captured_main): Set gdb_sysroot to "target:" if not otherwise set. gdb/testsuite/ChangeLog: * gdb.base/break-probes.exp: Cope with "target:" sysroot.
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);