mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-21 18:39:34 +08:00
Make gdb.gdb/selftest.exp use '-i $inferior_spawn_id'
gdb/testsuite/ChangeLog: 2015-07-29 Pedro Alves <palves@redhat.com> * gdb.gdb/selftest.exp (test_with_self): Update comment. Use send_inferior and $inferior_spawn_id.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2015-07-29 Pedro Alves <palves@redhat.com>
|
||||||
|
|
||||||
|
* gdb.gdb/selftest.exp (test_with_self): Update comment. Use
|
||||||
|
send_inferior and $inferior_spawn_id.
|
||||||
|
|
||||||
2015-07-29 Pedro Alves <palves@redhat.com>
|
2015-07-29 Pedro Alves <palves@redhat.com>
|
||||||
|
|
||||||
* gdb.gdb/complaints.exp (test_initial_complaints)
|
* gdb.gdb/complaints.exp (test_initial_complaints)
|
||||||
|
@ -257,6 +257,7 @@ proc test_with_self { executable } {
|
|||||||
global decimal
|
global decimal
|
||||||
global timeout
|
global timeout
|
||||||
global INTERNAL_GDBFLAGS
|
global INTERNAL_GDBFLAGS
|
||||||
|
global inferior_spawn_id gdb_spawn_id
|
||||||
|
|
||||||
# load yourself into the debugger
|
# load yourself into the debugger
|
||||||
# This can take a relatively long time, particularly for testing where
|
# This can take a relatively long time, particularly for testing where
|
||||||
@ -406,24 +407,27 @@ proc test_with_self { executable } {
|
|||||||
|
|
||||||
# start the "xgdb" process
|
# start the "xgdb" process
|
||||||
if [target_info exists gdb,noinferiorio] {
|
if [target_info exists gdb,noinferiorio] {
|
||||||
# Maybe testing with a local extended-remote gdbserver. With
|
# With no way to interact with the inferior GDB, all we can do
|
||||||
# no way to interact with inferior GDB, all we can do is let
|
# is let it run.
|
||||||
# it run.
|
|
||||||
send_gdb "continue\n"
|
send_gdb "continue\n"
|
||||||
# Wait a bit while the inferior gdb gets to its prompt.
|
# Wait a bit while the inferior gdb gets to its prompt.
|
||||||
sleep 1
|
sleep 1
|
||||||
} else {
|
} else {
|
||||||
set test "xgdb is at prompt"
|
set test "xgdb is at prompt"
|
||||||
gdb_test_multiple "continue" $test {
|
gdb_test_multiple "continue" $test {
|
||||||
|
-i "$inferior_spawn_id"
|
||||||
-re "GNU gdb \[0-9\.\]*.*Copyright \\(C\\) \[0-9\]* Free Software Foundation, Inc.*License GPLv3\\+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.*This is free software: you are free to change and redistribute it.*There is NO WARRANTY, to the extent permitted by law. Type \"show copying\".*and \"show warranty\" for details.*This GDB was configured as .*$gdb_prompt $" {
|
-re "GNU gdb \[0-9\.\]*.*Copyright \\(C\\) \[0-9\]* Free Software Foundation, Inc.*License GPLv3\\+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.*This is free software: you are free to change and redistribute it.*There is NO WARRANTY, to the extent permitted by law. Type \"show copying\".*and \"show warranty\" for details.*This GDB was configured as .*$gdb_prompt $" {
|
||||||
pass $test
|
pass $test
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# set xgdb prompt so we can tell which is which
|
# set xgdb prompt so we can tell which is which
|
||||||
gdb_test_multiple "set prompt (xgdb) " "Set xgdb_prompt" {
|
send_inferior "set prompt (xgdb) \n"
|
||||||
|
set msg "Set xgdb_prompt"
|
||||||
|
gdb_test_multiple "" $msg {
|
||||||
|
-i "$inferior_spawn_id"
|
||||||
-re "\[(\]xgdb\[)\].*\[(\]xgdb\[)\] $" {
|
-re "\[(\]xgdb\[)\].*\[(\]xgdb\[)\] $" {
|
||||||
pass "Set xgdb prompt"
|
pass $msg
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user