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