aboutsummaryrefslogtreecommitdiff
path: root/gdb
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
parent64c0b5de8dfd68c54060b07d54b1edf8d22fc52b (diff)
downloadgdb-fed040c6a50399617d8265cbddc7fd21b3f134ef.zip
gdb-fed040c6a50399617d8265cbddc7fd21b3f134ef.tar.gz
gdb-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')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/main.c6
-rw-r--r--gdb/testsuite/ChangeLog4
-rw-r--r--gdb/testsuite/gdb.base/break-probes.exp4
4 files changed, 19 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 27c6828..dd27cd8 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2015-04-02 Gary Benson <gbenson@redhat.com>
+ * main.c (captured_main): Set gdb_sysroot to "target:"
+ if not otherwise set.
+
+2015-04-02 Gary Benson <gbenson@redhat.com>
+
* exec.c (exec_file_attach): Support "target:" filenames.
2015-04-02 Gary Benson <gbenson@redhat.com>
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);
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 0b6bbca..491743f 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2015-04-02 Gary Benson <gbenson@redhat.com>
+
+ * gdb.base/break-probes.exp: Cope with "target:" sysroot.
+
2015-04-01 Sasha Smundak <asmundak@google.com>
* gdb.python/py-unwind-maint.c: New file.
diff --git a/gdb/testsuite/gdb.base/break-probes.exp b/gdb/testsuite/gdb.base/break-probes.exp
index 1591c33..00ca458 100644
--- a/gdb/testsuite/gdb.base/break-probes.exp
+++ b/gdb/testsuite/gdb.base/break-probes.exp
@@ -66,6 +66,10 @@ if { $using_probes } {
}
}
+ # GDB strips "target:" from the start of filenames
+ # when operating on the local filesystem
+ regsub "^target:" "$sysroot" "(target:)?" sysroot
+
# Run til it loads our library
set test "run til our library loads"
set not_loaded_library 1