| OLD | NEW |
| 1 # Copyright (C) 1997-1998, 2007-2012 Free Software Foundation, Inc. | 1 # Copyright (C) 1997-1998, 2007-2012 Free Software Foundation, Inc. |
| 2 | 2 |
| 3 # This program is free software; you can redistribute it and/or modify | 3 # This program is free software; you can redistribute it and/or modify |
| 4 # it under the terms of the GNU General Public License as published by | 4 # it under the terms of the GNU General Public License as published by |
| 5 # the Free Software Foundation; either version 3 of the License, or | 5 # the Free Software Foundation; either version 3 of the License, or |
| 6 # (at your option) any later version. | 6 # (at your option) any later version. |
| 7 # | 7 # |
| 8 # This program is distributed in the hope that it will be useful, | 8 # This program is distributed in the hope that it will be useful, |
| 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 # GNU General Public License for more details. | 11 # GNU General Public License for more details. |
| 12 # | 12 # |
| 13 # You should have received a copy of the GNU General Public License | 13 # You should have received a copy of the GNU General Public License |
| 14 # along with this program. If not, see <http://www.gnu.org/licenses/>. */ | 14 # along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
| 15 | 15 |
| 16 # GDB tests for sized enumerations | 16 # GDB tests for sized enumerations |
| 17 | 17 |
| 18 # This is aimed at HP-UX systems. The HP C compiler | 18 # This is aimed at HP-UX systems. The HP C compiler |
| 19 # allows specifying "char" or "short" for an enum, to | 19 # allows specifying "char" or "short" for an enum, to |
| 20 # indicate that it is 1 or 2 bytes long. | 20 # indicate that it is 1 or 2 bytes long. |
| 21 | 21 |
| 22 # This file was written by Satish Pai <pai@apollo.hp.com> | 22 # This file was written by Satish Pai <pai@apollo.hp.com> |
| 23 # 1997-09-24 | 23 # 1997-09-24 |
| 24 | 24 |
| 25 if $tracelevel then { | |
| 26 strace $tracelevel | |
| 27 } | |
| 28 | |
| 29 # | 25 # |
| 30 # test running programs | 26 # test running programs |
| 31 # | 27 # |
| 32 | 28 |
| 33 if { [skip_hp_tests] } then { continue } | 29 if { [skip_hp_tests] } then { continue } |
| 34 | 30 |
| 35 set testfile "sized-enum" | 31 set testfile "sized-enum" |
| 36 set srcfile ${testfile}.c | 32 set srcfile ${testfile}.c |
| 37 set binfile ${objdir}/${subdir}/${testfile} | 33 set binfile ${objdir}/${subdir}/${testfile} |
| 38 | 34 |
| 39 if [get_compiler_info ${binfile}] { | 35 if [get_compiler_info] { |
| 40 return -1 | 36 return -1 |
| 41 } | 37 } |
| 42 | 38 |
| 43 if { $gcc_compiled } then { continue } | 39 if { $gcc_compiled } then { continue } |
| 44 if {$hp_aCC_compiler} {continue} | 40 if {$hp_aCC_compiler} {continue} |
| 45 | 41 |
| 46 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug}] != "" } { | 42 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug}] != "" } { |
| 47 untested sized-enum.exp | 43 untested sized-enum.exp |
| 48 return -1 | 44 return -1 |
| 49 } | 45 } |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 } | 147 } |
| 152 send_gdb "print (int) yellow\n" | 148 send_gdb "print (int) yellow\n" |
| 153 gdb_expect { | 149 gdb_expect { |
| 154 -re "\\$\[0-9\]* = 1.*$gdb_prompt $" { pass "print (int) yellow" } | 150 -re "\\$\[0-9\]* = 1.*$gdb_prompt $" { pass "print (int) yellow" } |
| 155 -re "$gdb_prompt $" { fail "print (int) yellow" } | 151 -re "$gdb_prompt $" { fail "print (int) yellow" } |
| 156 timeout { fail "(timeout) print (int) yellow" } | 152 timeout { fail "(timeout) print (int) yellow" } |
| 157 } | 153 } |
| 158 | 154 |
| 159 | 155 |
| 160 | 156 |
| OLD | NEW |