From: Andrew Cagney Date: Sat, 6 Dec 2003 22:49:02 +0000 (+0000) Subject: 2003-12-06 Andrew Cagney X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5266b69c16cec86dc13f343aaccd481db29e78da;p=binutils-gdb.git 2003-12-06 Andrew Cagney * gdb.base/structs.exp (test_struct_returns): When applicable, set "return_value_unimplemented". When an unimplemented struct return architecture, report incorrect values as a KFAIL --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index fc704ab82fb..90d2ff14113 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2003-12-06 Andrew Cagney + + * gdb.base/structs.exp (test_struct_returns): When applicable, set + "return_value_unimplemented". When an unimplemented struct return + architecture, report incorrect values as a KFAIL + 2003-12-05 Michael Chastain * gdb.cp/rtti.exp: Accept new wording of warning from diff --git a/gdb/testsuite/gdb.base/structs.exp b/gdb/testsuite/gdb.base/structs.exp index 140ee70c310..7ff54c9057c 100644 --- a/gdb/testsuite/gdb.base/structs.exp +++ b/gdb/testsuite/gdb.base/structs.exp @@ -299,6 +299,7 @@ proc test_struct_returns { n } { set test "return foo; ${tests}" set return_value_unknown 0 + set return_value_unimplemented 0 gdb_test_multiple "return foo${n}" "${test}" { -re "The location" { # Ulgh, a struct return, remember this (still need prompt). @@ -307,10 +308,10 @@ proc test_struct_returns { n } { } -re "A structure or union" { # Ulgh, a struct return, remember this (still need prompt). - # Set it to something unique so that it won't match a - # struct return convention value. - # set return_value_unknown -1 set return_value_unknown 1 + # Double ulgh. Architecture doesn't use return_value and + # hence hasn't implemented small structure return. + set return_value_unimplemented 1 exp_continue } -re "Make fun${n} return now.*y or n. $" { @@ -355,6 +356,15 @@ proc test_struct_returns { n } { fail "${test}" } } + -re ".*${gdb_prompt} $" { + if $return_value_unimplemented { + # What a suprize. The architecture hasn't implemented + # return_value, and hence has to fail. + kfail "$test" gdb/1444 + } else { + fail "$test" + } + } } # Check that a "finish" works.