diff options
author | Alan Hayward <alan.hayward@arm.com> | 2019-04-08 16:02:55 +0100 |
---|---|---|
committer | Alan Hayward <alan.hayward@arm.com> | 2019-04-12 11:37:24 +0100 |
commit | e5a1a79a4e0ee33292d45b10a759eb41f7358b7c (patch) | |
tree | a9e38668d1ea376f44ae3a9225fad69d8619d450 /gdb/testsuite/lib | |
parent | 62253a61473764b0d084b01eff06a93fb38bb2e3 (diff) | |
download | gdb-e5a1a79a4e0ee33292d45b10a759eb41f7358b7c.zip gdb-e5a1a79a4e0ee33292d45b10a759eb41f7358b7c.tar.gz gdb-e5a1a79a4e0ee33292d45b10a759eb41f7358b7c.tar.bz2 |
Testsuite: Add gdbserver sysroot test
The local board file ensures that the sysroot is always set to load
files from the local filesystem.
Add a gdbserver test to explicitly test the sysroot set to both the
remote target and the local filesystem.
gdb/testsuite/ChangeLog:
* gdb.server/sysroot.c: New test.
* gdb.server/sysroot.exp: New file.
* lib/gdbserver-support.exp (gdb_target_cmd): Add additional text
matching param.
Diffstat (limited to 'gdb/testsuite/lib')
-rw-r--r-- | gdb/testsuite/lib/gdbserver-support.exp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/gdb/testsuite/lib/gdbserver-support.exp b/gdb/testsuite/lib/gdbserver-support.exp index dbd885a..2cb64f7 100644 --- a/gdb/testsuite/lib/gdbserver-support.exp +++ b/gdb/testsuite/lib/gdbserver-support.exp @@ -42,9 +42,11 @@ # # gdb_target_cmd -# Send gdb the "target" command +# Send gdb the "target" command. Returns 0 on success, 1 on failure. +# If specified, then ADDITIONAL_TEXT must match the text that comes after +# the connection message in order for the procedure to succeed. # -proc gdb_target_cmd { targetname serialport } { +proc gdb_target_cmd { targetname serialport {additional_text ""} } { global gdb_prompt set serialport_re [string_to_regexp $serialport] @@ -61,23 +63,23 @@ proc gdb_target_cmd { targetname serialport } { -re "Couldn't establish connection to remote.*$gdb_prompt $" { verbose "Connection failed" } - -re "Remote MIPS debugging.*$gdb_prompt" { + -re "Remote MIPS debugging.*$additional_text.*$gdb_prompt" { verbose "Set target to $targetname" return 0 } - -re "Remote debugging using .*$serialport_re.*$gdb_prompt $" { + -re "Remote debugging using .*$serialport_re.*$additional_text.*$gdb_prompt $" { verbose "Set target to $targetname" return 0 } - -re "Remote debugging using stdio.*$gdb_prompt $" { + -re "Remote debugging using stdio.*$additional_text.*$gdb_prompt $" { verbose "Set target to $targetname" return 0 } - -re "Remote target $targetname connected to.*$gdb_prompt $" { + -re "Remote target $targetname connected to.*$additional_text.*$gdb_prompt $" { verbose "Set target to $targetname" return 0 } - -re "Connected to.*$gdb_prompt $" { + -re "Connected to.*$additional_text.*$gdb_prompt $" { verbose "Set target to $targetname" return 0 } |