mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-01 01:45:51 +08:00
2003-11-20 Andrew Cagney <cagney@redhat.com>
* gdb.base/structs.exp: Handle and recover from internal errors. Replace "foo${n}" with "foo<n>" in test messages.
This commit is contained in:
gdb/testsuite
@ -1,5 +1,8 @@
|
|||||||
2003-11-20 Andrew Cagney <cagney@redhat.com>
|
2003-11-20 Andrew Cagney <cagney@redhat.com>
|
||||||
|
|
||||||
|
* gdb.base/structs.exp: Handle and recover from internal errors.
|
||||||
|
Replace "foo${n}" with "foo<n>" in test messages.
|
||||||
|
|
||||||
* gdb.base/structs.exp: Update copyright. Rewrite.
|
* gdb.base/structs.exp: Update copyright. Rewrite.
|
||||||
* gdb.base/structs.c: Update copyright. Rewrite.
|
* gdb.base/structs.c: Update copyright. Rewrite.
|
||||||
|
|
||||||
|
@ -321,11 +321,22 @@ proc test_struct_returns { n } {
|
|||||||
-re "L[expr ${n} + 1] *= fun[expr ${n} + 1].*${gdb_prompt} $" {
|
-re "L[expr ${n} + 1] *= fun[expr ${n} + 1].*${gdb_prompt} $" {
|
||||||
pass "${test}"
|
pass "${test}"
|
||||||
}
|
}
|
||||||
|
-re "A problem internal to GDB has been detected" {
|
||||||
|
fail "${test} (GDB internal error 2)"
|
||||||
|
gdb_internal_error_resync
|
||||||
|
}
|
||||||
|
-re "${gdb_prompt} $" {
|
||||||
|
fail "${test} (wrong line info)"
|
||||||
|
}
|
||||||
timeout {
|
timeout {
|
||||||
fail "${test} (timeout 2)"
|
fail "${test} (timeout 2)"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
-re "A problem internal to GDB has been detected" {
|
||||||
|
fail "${test} (GDB internal error 1)"
|
||||||
|
gdb_internal_error_resync
|
||||||
|
}
|
||||||
-re "${gdb_prompt} $" {
|
-re "${gdb_prompt} $" {
|
||||||
fail "${test} (no query)"
|
fail "${test} (no query)"
|
||||||
}
|
}
|
||||||
@ -364,6 +375,10 @@ proc test_struct_returns { n } {
|
|||||||
fail "${test}"
|
fail "${test}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
-re "A problem internal to GDB has been detected" {
|
||||||
|
fail "${test} (GDB internal error)"
|
||||||
|
gdb_internal_error_resync
|
||||||
|
}
|
||||||
-re "${gdb_prompt} $" {
|
-re "${gdb_prompt} $" {
|
||||||
# Garbage returned, garbage printed
|
# Garbage returned, garbage printed
|
||||||
fail "${test}"
|
fail "${test}"
|
||||||
@ -395,7 +410,7 @@ proc test_struct_returns { n } {
|
|||||||
# Finish the function, set 'finish_value_unknown" to non-empty if the
|
# Finish the function, set 'finish_value_unknown" to non-empty if the
|
||||||
# return-value was not found.
|
# return-value was not found.
|
||||||
send_gdb "finish\n"
|
send_gdb "finish\n"
|
||||||
set test "finish foo${n}; ${tests}"
|
set test "finish foo<n>; ${tests}"
|
||||||
set finish_value_unknown 0
|
set finish_value_unknown 0
|
||||||
gdb_expect {
|
gdb_expect {
|
||||||
-re "Value returned is .*${gdb_prompt} $" {
|
-re "Value returned is .*${gdb_prompt} $" {
|
||||||
@ -406,6 +421,10 @@ proc test_struct_returns { n } {
|
|||||||
set finish_value_unknown 1
|
set finish_value_unknown 1
|
||||||
pass "${test}"
|
pass "${test}"
|
||||||
}
|
}
|
||||||
|
-re "A problem internal to GDB has been detected" {
|
||||||
|
fail "${test} (GDB internal error)"
|
||||||
|
gdb_internal_error_resync
|
||||||
|
}
|
||||||
-re ".*${gdb_prompt} $" {
|
-re ".*${gdb_prompt} $" {
|
||||||
# Garbage returned
|
# Garbage returned
|
||||||
fail "${test}"
|
fail "${test}"
|
||||||
@ -419,7 +438,7 @@ proc test_struct_returns { n } {
|
|||||||
# "p/c". If no return value was found, the 'Z' from the previous
|
# "p/c". If no return value was found, the 'Z' from the previous
|
||||||
# check that the variable was cleared, is printed.
|
# check that the variable was cleared, is printed.
|
||||||
send_gdb "p/c\n"
|
send_gdb "p/c\n"
|
||||||
set test "value foo${n} finished; ${tests}"
|
set test "value foo<n> finished; ${tests}"
|
||||||
setup_kfails structs-*tld* i686-*-* gdb/1447
|
setup_kfails structs-*tld* i686-*-* gdb/1447
|
||||||
gdb_expect {
|
gdb_expect {
|
||||||
-re "[foo ${n}]\[\r\n\]+${gdb_prompt} $" {
|
-re "[foo ${n}]\[\r\n\]+${gdb_prompt} $" {
|
||||||
@ -441,6 +460,10 @@ proc test_struct_returns { n } {
|
|||||||
fail "${test}"
|
fail "${test}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
-re "A problem internal to GDB has been detected" {
|
||||||
|
fail "${test} (GDB internal error)"
|
||||||
|
gdb_internal_error_resync
|
||||||
|
}
|
||||||
-re ".*${gdb_prompt} $" {
|
-re ".*${gdb_prompt} $" {
|
||||||
# Garbage returned
|
# Garbage returned
|
||||||
fail "${test}"
|
fail "${test}"
|
||||||
|
Reference in New Issue
Block a user