[8/9] Make the default sysroot be "target:"

Message ID 20150401141246.GF655@blade.nx
State Committed
Headers

Commit Message

Gary Benson April 1, 2015, 2:12 p.m. UTC
  Pedro Alves wrote:
> On 03/20/2015 04:48 PM, Gary Benson wrote:
> > This commit makes GDB default to a sysroot of "target:".
> > One testcase needed updating as a result of this change.
> 
> That's because when the sysroot is "target:" and the filesystem is
> remote, the sysroot is stripped from the "Inferior loaded" message,
> right?  A short comment in the test would help.
> 
> OK with that change.

I reorganized this a little while adding the comment.
I'll commit this:


Cheers,
Gary
  

Comments

Pedro Alves April 1, 2015, 2:18 p.m. UTC | #1
On 04/01/2015 03:12 PM, Gary Benson wrote:
> Pedro Alves wrote:
>> On 03/20/2015 04:48 PM, Gary Benson wrote:
>>> This commit makes GDB default to a sysroot of "target:".
>>> One testcase needed updating as a result of this change.
>>
>> That's because when the sysroot is "target:" and the filesystem is
>> remote, the sysroot is stripped from the "Inferior loaded" message,
>> right?  A short comment in the test would help.
>>
>> OK with that change.
> 
> I reorganized this a little while adding the comment.
> I'll commit this:

Thanks, even better.

Thanks,
Pedro Alves
  

Patch

diff --git a/gdb/testsuite/gdb.base/break-probes.exp...
index 1591c33..23aca8f 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