| OLD | NEW |
| 1 # Copyright 2004, 2007-2012 Free Software Foundation, Inc. | 1 # Copyright 2004, 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 # Please email any bugs, comments, and/or additions to this file to: | 16 # Please email any bugs, comments, and/or additions to this file to: |
| 17 # bug-gdb@gnu.org | 17 # bug-gdb@gnu.org |
| 18 | 18 |
| 19 if $tracelevel { | |
| 20 strace $tracelevel | |
| 21 } | |
| 22 | |
| 23 # If the test directory was not created by configure then skip | |
| 24 # this test. | |
| 25 if ![file isdirectory ${objdir}/${subdir}] then { | |
| 26 return 0 | |
| 27 } | |
| 28 | |
| 29 # | 19 # |
| 30 # test running programs | 20 # test running programs |
| 31 # | 21 # |
| 32 | 22 |
| 33 set testfile exclfwd | 23 standard_testfile exclfwd1.c exclfwd2.c |
| 34 set binfile ${objdir}/${subdir}/${testfile} | |
| 35 | 24 |
| 36 foreach file {exclfwd1 exclfwd2} { | 25 if {[prepare_for_testing $testfile.exp $testfile \ |
| 37 if {[gdb_compile "${srcdir}/${subdir}/${file}.c" "${file}.o" object {debug}]
!= ""} { | 26 » [list $srcfile $srcfile2] debug]} { |
| 38 untested exclfwd.exp | 27 return -1 |
| 39 return -1 | |
| 40 } | |
| 41 } | 28 } |
| 42 | 29 |
| 43 if {[gdb_compile "exclfwd1.o exclfwd2.o" ${binfile} executable {debug}] != "" }
{ | |
| 44 untested exclfwd.exp | |
| 45 return -1 | |
| 46 } | |
| 47 | |
| 48 gdb_exit | |
| 49 gdb_start | |
| 50 gdb_reinitialize_dir $srcdir/$subdir | |
| 51 gdb_load ${binfile} | |
| 52 | |
| 53 if ![runto_main] then { | 30 if ![runto_main] then { |
| 54 perror "couldn't run to breakpoint" | 31 perror "couldn't run to breakpoint" |
| 55 continue | 32 continue |
| 56 } | 33 } |
| 57 | 34 |
| 58 get_debug_format | 35 get_debug_format |
| 59 | 36 |
| 60 set eol "\[ \t\]*\[\n\r\]+" | 37 set eol "\[ \t\]*\[\n\r\]+" |
| 61 | 38 |
| 62 gdb_test "ptype v1" "type = struct a {$eol | 39 gdb_test "ptype v1" "type = struct a {$eol |
| 63 int x;$eol | 40 int x;$eol |
| 64 int y;$eol | 41 int y;$eol |
| 65 }$eol" | 42 }$eol" |
| 66 | 43 |
| 67 if { [test_debug_format "stabs"] } then { | 44 if { [test_debug_format "stabs"] } then { |
| 68 setup_kfail "gdb/1602" *-*-* | 45 setup_kfail "gdb/1602" *-*-* |
| 69 } | 46 } |
| 70 gdb_test "ptype v2" "type = struct a {$eol | 47 gdb_test "ptype v2" "type = struct a {$eol |
| 71 const char .c;$eol | 48 const char .c;$eol |
| 72 }$eol" | 49 }$eol" |
| 73 | 50 |
| 74 if { [test_debug_format "stabs"] } then { | 51 if { [test_debug_format "stabs"] } then { |
| 75 setup_kfail "gdb/1603" *-*-* | 52 setup_kfail "gdb/1603" *-*-* |
| 76 } | 53 } |
| 77 gdb_test "ptype v3" "type = const char ." | 54 gdb_test "ptype v3" "type = const char ." |
| OLD | NEW |