This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 8/9] 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.
---
 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]