]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/testsuite/gdb.base/ptr-typedef.exp
Copyright updates for 2007.
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.base / ptr-typedef.exp
1 # Copyright 2005, 2007 Free Software Foundation, Inc.
2
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
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16
17 if $tracelevel then {
18 strace $tracelevel
19 }
20
21 set testfile ptr-typedef
22 set srcfile ${testfile}.c
23 set binfile ${objdir}/${subdir}/${testfile}
24 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
25 untested "Couldn't compile test program"
26 return -1
27 }
28
29 # Get things started.
30
31 gdb_exit
32 gdb_start
33 gdb_reinitialize_dir $srcdir/$subdir
34 gdb_load ${binfile}
35
36 if ![runto marker1] {
37 untested "Couldn't run to marker1"
38 }
39
40 gdb_test "print foo_ptr" "\\\$$decimal = \\\(struct foo \\\*\\\) $hex"
41 gdb_test "print foz_ptr" "\\\$$decimal = \\\(foz\\\) $hex"