1/* This testcase is part of GDB, the GNU debugger. 2 3 Copyright 2010, 2011 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#ifdef __cplusplus 20class SimpleClass 21{ 22 private: 23 int i; 24 25 public: 26 void seti (int arg) 27 { 28 i = arg; 29 } 30 31 int valueofi (void) 32 { 33 return i; /* Break in class. */ 34 } 35}; 36#endif 37 38int func (int arg) 39{ 40 int i = 2; 41 i = i * arg; 42 return arg; /* Block break here. */ 43} 44 45int main (int argc, char *argv[]) 46{ 47#ifdef __cplusplus 48 SimpleClass sclass; 49#endif 50 int a = 0; 51 int result; 52 enum tag {one, two, three}; 53 enum tag t = one; 54 55 result = func (42); 56 57#ifdef __cplusplus 58 sclass.seti (42); 59 sclass.valueofi (); 60#endif 61 return 0; /* Break at end. */ 62} 63