This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 8/9] Make the default sysroot be "target:"
- From: Gary Benson <gbenson at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 20 Mar 2015 16:48:06 +0000
- Subject: [PATCH 8/9] Make the default sysroot be "target:"
- Authentication-results: sourceware.org; auth=none
- References: <1426870087-32654-1-git-send-email-gbenson at redhat dot com>
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.
---
gdb/ChangeLog | 5 +++++
gdb/main.c | 6 ++++++
gdb/testsuite/ChangeLog | 4 ++++
gdb/testsuite/gdb.base/break-probes.exp | 2 +-
4 files changed, 16 insertions(+), 1 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);
diff --git a/gdb/testsuite/gdb.base/break-probes.exp b/gdb/testsuite/gdb.base/break-probes.exp
index 1591c33..d4d756f 100644
--- a/gdb/testsuite/gdb.base/break-probes.exp
+++ b/gdb/testsuite/gdb.base/break-probes.exp
@@ -72,7 +72,7 @@ if { $using_probes } {
while { $not_loaded_library } {
set not_loaded_library 0
gdb_test_multiple "c" $test {
- -re "Inferior loaded $sysroot$binfile_lib\\M.*$gdb_prompt $" {
+ -re "Inferior loaded ($sysroot)?$binfile_lib\\M.*$gdb_prompt $" {
pass $test
}
-re "Stopped due to shared library event\\M.*$gdb_prompt $" {
--
1.7.1