OLD | NEW |
1 /* This testcase is part of GDB, the GNU debugger. | 1 /* This testcase is part of GDB, the GNU debugger. |
2 | 2 |
3 Copyright 2008-2012 Free Software Foundation, Inc. | 3 Copyright 2008-2012 Free Software Foundation, Inc. |
4 | 4 |
5 This program is free software; you can redistribute it and/or modify | 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 | 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 | 7 the Free Software Foundation; either version 3 of the License, or |
8 (at your option) any later version. | 8 (at your option) any later version. |
9 | 9 |
10 This program is distributed in the hope that it will be useful, | 10 This program is distributed in the hope that it will be useful, |
(...skipping 15 matching lines...) Expand all Loading... |
26 int | 26 int |
27 call_longjmp (jmp_buf *buf) | 27 call_longjmp (jmp_buf *buf) |
28 { | 28 { |
29 longjmps++; | 29 longjmps++; |
30 longjmp (*buf, 1); | 30 longjmp (*buf, 1); |
31 } | 31 } |
32 | 32 |
33 void | 33 void |
34 hidden_longjmp (void) | 34 hidden_longjmp (void) |
35 { | 35 { |
36 if (setjmp (env) == 0) /* longjmp caught */ | 36 if (setjmp (env) == 0) |
37 { | 37 { |
38 call_longjmp (&env); | 38 call_longjmp (&env); |
39 } | 39 } |
40 else | 40 else |
41 resumes++; | 41 resumes++; |
42 } | 42 } |
43 | 43 |
44 int | 44 int |
45 main () | 45 main () |
46 { | 46 { |
(...skipping 21 matching lines...) Expand all Loading... |
68 else | 68 else |
69 { | 69 { |
70 resumes++; | 70 resumes++; |
71 } | 71 } |
72 | 72 |
73 i = 2; /* miss_step_2 */ | 73 i = 2; /* miss_step_2 */ |
74 | 74 |
75 /* Pattern 3 - setjmp/longjmp inside stepped-over function. */ | 75 /* Pattern 3 - setjmp/longjmp inside stepped-over function. */ |
76 hidden_longjmp (); /* patt3 */ | 76 hidden_longjmp (); /* patt3 */ |
77 | 77 |
| 78 i = 77; /* longjmp caught */ |
| 79 |
78 i = 3; /* patt_end3. */ | 80 i = 3; /* patt_end3. */ |
79 | 81 |
80 return 0; | 82 return 0; |
81 } | 83 } |
OLD | NEW |