diff options
Diffstat (limited to 'gdb/testsuite/gdb.base/constvars.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/constvars.exp | 32 |
1 files changed, 10 insertions, 22 deletions
diff --git a/gdb/testsuite/gdb.base/constvars.exp b/gdb/testsuite/gdb.base/constvars.exp index 8a6b60b3ed5..68732867d50 100644 --- a/gdb/testsuite/gdb.base/constvars.exp +++ b/gdb/testsuite/gdb.base/constvars.exp @@ -1,4 +1,4 @@ -# Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003 +# Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify @@ -48,23 +48,10 @@ if [get_compiler_info ${binfile}] { return -1; } -if {$hp_aCC_compiler || $hp_cc_compiler} { - set lang "c++" -} else { - set lang "" -} - -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [concat debug $lang]] != "" } { +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug ] != "" } { gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail." } -# Create and source the file that provides information about the compiler -# used to compile the test case. - -if [get_compiler_info ${binfile}] { - return -1; -} - gdb_exit gdb_start gdb_reinitialize_dir $srcdir/$subdir @@ -82,14 +69,17 @@ if ![runto_main] then { get_debug_format proc local_compiler_xfail_check { } { - global gcc_compiled; - - if {$gcc_compiled == 2} then { + if { [test_compiler_info gcc-2-*] } then { if { ![test_debug_format "HP"] \ && ![test_debug_format "DWARF 2"] } then { setup_xfail "*-*-*" } } + + global hp_cc_compiler + if { $hp_cc_compiler } { + setup_xfail "hppa*-*-hpux*" + } } send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $" @@ -128,7 +118,7 @@ send_gdb "break marker1\n" ; gdb_expect -re ".*$gdb_prompt $" # test function parameters local_compiler_xfail_check -if {$gcc_compiled == 3 && [test_debug_format "stabs"]} then { +if { [test_compiler_info gcc-3-*] && [test_debug_format "stabs"] } then { # With stabs, even GCC 3 does not get the const char arguments correct. setup_xfail "*-*-*" } @@ -144,8 +134,6 @@ gdb_expect { # test vars and pointers proc do_constvar_tests {} { - global gcc_compiled - gdb_test "print lave" " = 66 'B'" gdb_test "ptype lave" "type = char" gdb_test "print lavish" " = 10 '\\\\n'" @@ -285,7 +273,7 @@ proc do_constvar_tests {} { gdb_test "ptype locust" "type = double \\* const" local_compiler_xfail_check - if {$gcc_compiled == 3 && [test_debug_format "stabs"]} then { + if { [test_compiler_info gcc-3-*] && [test_debug_format "stabs"] } then { # With stabs, even GCC 3 does not get the constant structure member # correct. setup_xfail "*-*-*" |