diff options
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/gdb.stabs/gdb11479.exp | 54 |
1 files changed, 30 insertions, 24 deletions
diff --git a/gdb/testsuite/gdb.stabs/gdb11479.exp b/gdb/testsuite/gdb.stabs/gdb11479.exp index 11d4be0..12f60ee 100644 --- a/gdb/testsuite/gdb.stabs/gdb11479.exp +++ b/gdb/testsuite/gdb.stabs/gdb11479.exp @@ -17,37 +17,43 @@ # Test GDB stabs problem with qualified parameter of forward types. - -set testfile "gdb11479" +standard_testfile proc do_test {version} { - if ![runto_main] { - return -1 + with_test_prefix "$version" { + if { ![runto_main] } { + return -1 + } + gdb_test "rb test" "" "set breakpoints" + gdb_test "continue" "Breakpoint .* test2 .*" \ + "stop at first breakpoint in test2 function" + + # Check that the struct is read in correctly. + gdb_test "print *t" ".*\{x = 5, y = 25, b = 2.5\}.*" \ + "Inspect t in test2" + + # Check that the enum type length has been set to a non-zero value. + gdb_test "print sizeof (*e)" "= \[1-9\]*" "sizeof (*e) in test2" + + gdb_test "continue" "Breakpoint .* test .*" \ + "Stop at first breakpoint test function" + + gdb_test "print *t" ".*\{x = 5, y = 25, b = 2.5\}.*" \ + "Inspect t in test" + + # Check that the enum type length has been set to a non-zero value. + gdb_test "print sizeof (*e)" "= \[1-9\]*" "sizeof (*e) in test" } - gdb_test "rb test" "" "set breakpoints $version" - gdb_test "continue" "Breakpoint .* test2 .*" "stop at first breakpoint $version" - # Check that the struct is read in correctly - gdb_test "print *t" ".*\{x = 5, y = 25, b = 2.5\}.*" \ - "Inspect t in test2 $version" - # Check that the enum type length has been set to a non-zero value - gdb_test "print sizeof (*e)" "= \[1-9\]*" "sizeof (*e) in test2 $version" - gdb_test "continue" "Breakpoint .* test .*" \ - "Stop at first breakpoint $version" - gdb_test "print *t" ".*\{x = 5, y = 25, b = 2.5\}.*" \ - "Inspect t in test $version" - # Check that the enum type length has been set to a non-zero value - gdb_test "print sizeof (*e)" "= \[1-9\]*" "sizeof (*e) in test $version" } -if { [prepare_for_testing "failed to prepare" $testfile $testfile.c {debug additional_flags=-gstabs quiet}] == 0 } { +# Compile and test with stabs debug format. +if { [prepare_for_testing "failed to prepare" ${testfile}-stabs $srcfile \ + {debug additional_flags=-gstabs quiet}] == 0 } { do_test forced_stabs } -# Without this gdb_exit the executable is still opened -# by GDB which can generate a compilation failure. -gdb_exit - -if { [prepare_for_testing "failed to prepare" $testfile $testfile.c {debug}] == 0 } { +# Compile and test with the default debug format. +if { [prepare_for_testing "failed to prepare" ${testfile}-default \ + $srcfile] == 0 } { do_test natural_debug_format } - |