]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gm2/pim/pass/try
Update copyright years.
[thirdparty/gcc.git] / gcc / testsuite / gm2 / pim / pass / try
1 #!/bin/sh
2
3 # Copyright (C) 2005-2024 Free Software Foundation, Inc.
4 # This file is part of GNU Modula-2.
5 #
6 # GNU Modula-2 is free software; you can redistribute it and/or modify it under
7 # the terms of the GNU General Public License as published by the Free
8 # Software Foundation; either version 2, or (at your option) any later
9 # version.
10 #
11 # GNU Modula-2 is distributed in the hope that it will be useful, but WITHOUT ANY
12 # WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 # for more details.
15 #
16 # You should have received a copy of the GNU General Public License along
17 # with gm2; see the file COPYING. If not, write to the Free Software
18 # Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
20
21 export PATH=$HOME/bin/bin:$PATH
22
23
24 doStabs () {
25 echo "====================================================="
26 echo "Stabs $1"
27 gm2 -g -c -gstabs+ $1.mod
28 gm2 -g -gstabs+ -o a.stabs $1.mod
29 if ! gdb ./a.stabs ; then
30 echo "gdb crashed on $1.mod"
31 fi
32 }
33
34
35 doDwarf2 () {
36 echo "====================================================="
37 echo "Dwarf2 $1"
38 gm2 -g -c -gdwarf-2 $1.mod
39 gm2 -g -gdwarf-2 -o a.dwarf2 $1.mod
40 if ! gdb ./a.dwarf2 ; then
41 echo "gdb crashed on $1.mod"
42 fi
43 }
44
45
46 doTry () {
47 cat <<EOF > .gdbinit
48 set lang modula-2
49 break _M2_$1_init
50 run
51 next
52 print s
53 ptype s
54 quit
55 EOF
56 doStabs $1
57 doDwarf2 $1
58 }
59
60 doTry setchar3
61 doTry subrange15
62 doTry subrange16
63 doTry subrange17
64 doTry array4
65 doTry array5
66 doTry char
67 doTry int
68 doTry ptrarray
69 doTry variant9
70 doTry setenum
71 doTry record7
72 doTry setchar4
73
74 type gdb