1 /* This test script is part of GDB, the GNU debugger.
2 
3    Copyright 2002-2013 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 
19 #include <stdio.h>
20 
21 /* Do not move this definition into a header file!  See the comments
22    in psmang.exp.  */
23 struct s
24 {
25   int value;
26   void method1 (void);
27   void method2 (void);
28 };
29 
30 void
method2(void)31 s::method2 (void)
32 {
33   printf ("%d\n", value);
34 }
35 
36 
37 /* The presence of these variables ensures there will be so many
38    symbols in psmang2.cc's symtab's global block that it will have a
39    non-trivial hash table.  When there are only a very few symbols,
40    the block only has one hash bucket, so even if we compute the hash
41    value for the wrong symbol name, we'll still find a symbol that
42    matches.  */
43 int a;
44 int b;
45 int a1;
46 int b1;
47 int a2;
48 int b2;
49 int a12;
50 int b12;
51 int a3;
52 int b3;
53 int a13;
54 int b13;
55 int a23;
56 int b23;
57 int a123;
58 int b123;
59 int a4;
60 int b4;
61 int a14;
62 int b14;
63 int a24;
64 int b24;
65 int a124;
66 int b124;
67 int a34;
68 int b34;
69 int a134;
70 int b134;
71 int a234;
72 int b234;
73 int a1234;
74 int b1234;
75 int a5;
76 int b5;
77 int a15;
78 int b15;
79 int a25;
80 int b25;
81 int a125;
82 int b125;
83 int a35;
84 int b35;
85 int a135;
86 int b135;
87 int a235;
88 int b235;
89 int a1235;
90 int b1235;
91 int a45;
92 int b45;
93 int a145;
94 int b145;
95 int a245;
96 int b245;
97 int a1245;
98 int b1245;
99 int a345;
100 int b345;
101 int a1345;
102 int b1345;
103 int a2345;
104 int b2345;
105 int a12345;
106 int b12345;
107 int a6;
108 int b6;
109 int a16;
110 int b16;
111 int a26;
112 int b26;
113 int a126;
114 int b126;
115 int a36;
116 int b36;
117 int a136;
118 int b136;
119 int a236;
120 int b236;
121 int a1236;
122 int b1236;
123 int a46;
124 int b46;
125 int a146;
126 int b146;
127 int a246;
128 int b246;
129 int a1246;
130 int b1246;
131 int a346;
132 int b346;
133 int a1346;
134 int b1346;
135 int a2346;
136 int b2346;
137 int a12346;
138 int b12346;
139 int a56;
140 int b56;
141 int a156;
142 int b156;
143 int a256;
144 int b256;
145 int a1256;
146 int b1256;
147 int a356;
148 int b356;
149 int a1356;
150 int b1356;
151 int a2356;
152 int b2356;
153 int a12356;
154 int b12356;
155 int a456;
156 int b456;
157 int a1456;
158 int b1456;
159 int a2456;
160 int b2456;
161 int a12456;
162 int b12456;
163 int a3456;
164 int b3456;
165 int a13456;
166 int b13456;
167 int a23456;
168 int b23456;
169 int a123456;
170 int b123456;
171