psmang1.cc revision 1.5
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. */ 20struct s 21{ 22 int value; 23 void method1 (void); 24 void method2 (void); 25}; 26 27void 28s::method1 () 29{ 30 value = 42; 31} 32 33int 34main (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. */ 49int ax; 50int bx; 51int a1x; 52int b1x; 53int a2x; 54int b2x; 55int a12x; 56int b12x; 57int a3x; 58int b3x; 59int a13x; 60int b13x; 61int a23x; 62int b23x; 63int a123x; 64int b123x; 65int a4x; 66int b4x; 67int a14x; 68int b14x; 69int a24x; 70int b24x; 71int a124x; 72int b124x; 73int a34x; 74int b34x; 75int a134x; 76int b134x; 77int a234x; 78int b234x; 79int a1234x; 80int b1234x; 81int a5x; 82int b5x; 83int a15x; 84int b15x; 85int a25x; 86int b25x; 87int a125x; 88int b125x; 89int a35x; 90int b35x; 91int a135x; 92int b135x; 93int a235x; 94int b235x; 95int a1235x; 96int b1235x; 97int a45x; 98int b45x; 99int a145x; 100int b145x; 101int a245x; 102int b245x; 103int a1245x; 104int b1245x; 105int a345x; 106int b345x; 107int a1345x; 108int b1345x; 109int a2345x; 110int b2345x; 111int a12345x; 112int b12345x; 113int a6x; 114int b6x; 115int a16x; 116int b16x; 117int a26x; 118int b26x; 119int a126x; 120int b126x; 121int a36x; 122int b36x; 123int a136x; 124int b136x; 125int a236x; 126int b236x; 127int a1236x; 128int b1236x; 129int a46x; 130int b46x; 131int a146x; 132int b146x; 133int a246x; 134int b246x; 135int a1246x; 136int b1246x; 137int a346x; 138int b346x; 139int a1346x; 140int b1346x; 141int a2346x; 142int b2346x; 143int a12346x; 144int b12346x; 145int a56x; 146int b56x; 147int a156x; 148int b156x; 149int a256x; 150int b256x; 151int a1256x; 152int b1256x; 153int a356x; 154int b356x; 155int a1356x; 156int b1356x; 157int a2356x; 158int b2356x; 159int a12356x; 160int b12356x; 161int a456x; 162int b456x; 163int a1456x; 164int b1456x; 165int a2456x; 166int b2456x; 167int a12456x; 168int b12456x; 169int a3456x; 170int b3456x; 171int a13456x; 172int b13456x; 173int a23456x; 174int b23456x; 175int a123456x; 176int b123456x; 177