Imported Upstream version 7.9
[platform/upstream/gdb.git] / gdb / testsuite / gdb.cp / psmang1.cc
1 /* This test script is part of GDB, the GNU debugger.
2
3    Copyright 2002-2015 Free Software Foundation, Inc.
4
5    This program is free software; you can redistribute it and/or modify
6    it under the terms of the GNU General Public License as published by
7    the Free Software Foundation; either version 3 of the License, or
8    (at your option) any later version.
9
10    This program is distributed in the hope that it will be useful,
11    but WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13    GNU General Public License for more details.
14
15    You should have received a copy of the GNU General Public License
16    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
17
18 /* Do not move this definition into a header file!  See the comments
19    in psmang.exp.  */
20 struct s
21 {
22   int value;
23   void method1 (void);
24   void method2 (void);
25 };
26
27 void
28 s::method1 ()
29 {
30   value = 42;
31 }
32
33 int
34 main (int argc, char **argv)
35 {
36   s si;
37
38   si.method1 ();
39   si.method2 ();
40 }
41
42
43 /* The presence of these variables ensures there will be so many
44    symbols in psmang1.cc's symtab's global block that it will have a
45    non-trivial hash table.  When there are only a very few symbols,
46    the block only has one hash bucket, so even if we compute the hash
47    value for the wrong symbol name, we'll still find a symbol that
48    matches.  */
49 int ax;
50 int bx;
51 int a1x;
52 int b1x;
53 int a2x;
54 int b2x;
55 int a12x;
56 int b12x;
57 int a3x;
58 int b3x;
59 int a13x;
60 int b13x;
61 int a23x;
62 int b23x;
63 int a123x;
64 int b123x;
65 int a4x;
66 int b4x;
67 int a14x;
68 int b14x;
69 int a24x;
70 int b24x;
71 int a124x;
72 int b124x;
73 int a34x;
74 int b34x;
75 int a134x;
76 int b134x;
77 int a234x;
78 int b234x;
79 int a1234x;
80 int b1234x;
81 int a5x;
82 int b5x;
83 int a15x;
84 int b15x;
85 int a25x;
86 int b25x;
87 int a125x;
88 int b125x;
89 int a35x;
90 int b35x;
91 int a135x;
92 int b135x;
93 int a235x;
94 int b235x;
95 int a1235x;
96 int b1235x;
97 int a45x;
98 int b45x;
99 int a145x;
100 int b145x;
101 int a245x;
102 int b245x;
103 int a1245x;
104 int b1245x;
105 int a345x;
106 int b345x;
107 int a1345x;
108 int b1345x;
109 int a2345x;
110 int b2345x;
111 int a12345x;
112 int b12345x;
113 int a6x;
114 int b6x;
115 int a16x;
116 int b16x;
117 int a26x;
118 int b26x;
119 int a126x;
120 int b126x;
121 int a36x;
122 int b36x;
123 int a136x;
124 int b136x;
125 int a236x;
126 int b236x;
127 int a1236x;
128 int b1236x;
129 int a46x;
130 int b46x;
131 int a146x;
132 int b146x;
133 int a246x;
134 int b246x;
135 int a1246x;
136 int b1246x;
137 int a346x;
138 int b346x;
139 int a1346x;
140 int b1346x;
141 int a2346x;
142 int b2346x;
143 int a12346x;
144 int b12346x;
145 int a56x;
146 int b56x;
147 int a156x;
148 int b156x;
149 int a256x;
150 int b256x;
151 int a1256x;
152 int b1256x;
153 int a356x;
154 int b356x;
155 int a1356x;
156 int b1356x;
157 int a2356x;
158 int b2356x;
159 int a12356x;
160 int b12356x;
161 int a456x;
162 int b456x;
163 int a1456x;
164 int b1456x;
165 int a2456x;
166 int b2456x;
167 int a12456x;
168 int b12456x;
169 int a3456x;
170 int b3456x;
171 int a13456x;
172 int b13456x;
173 int a23456x;
174 int b23456x;
175 int a123456x;
176 int b123456x;