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, 2010-2012 Free Software Foundation, Inc. | 3 Copyright 2008, 2010-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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 } | 51 } |
52 | 52 |
53 void | 53 void |
54 null_hand_call () | 54 null_hand_call () |
55 { | 55 { |
56 } | 56 } |
57 | 57 |
58 int | 58 int |
59 main () | 59 main () |
60 { | 60 { |
61 #ifdef usestubs | |
62 set_debug_traps (); | |
63 breakpoint (); | |
64 #endif | |
65 | |
66 #ifdef SIG_SETMASK | 61 #ifdef SIG_SETMASK |
67 /* Ensure all the signals aren't blocked. | 62 /* Ensure all the signals aren't blocked. |
68 The environment in which the testsuite is run may have blocked some | 63 The environment in which the testsuite is run may have blocked some |
69 for whatever reason. */ | 64 for whatever reason. */ |
70 { | 65 { |
71 sigset_t newset; | 66 sigset_t newset; |
72 sigemptyset (&newset); | 67 sigemptyset (&newset); |
73 sigprocmask (SIG_SETMASK, &newset, NULL); | 68 sigprocmask (SIG_SETMASK, &newset, NULL); |
74 } | 69 } |
75 #endif | 70 #endif |
76 | 71 |
77 signal (SIGABRT, handle_signal); | 72 signal (SIGABRT, handle_signal); |
78 | 73 |
79 /* Stop here so we can hand-call gen_signal. */ | 74 /* Stop here so we can hand-call gen_signal. */ |
80 stop_one (); | 75 stop_one (); |
81 | 76 |
82 /* When we're resumed stop here. */ | 77 /* When we're resumed stop here. */ |
83 stop_two (); | 78 stop_two (); |
84 | 79 |
85 /* When we're resumed we generate a signal ourselves. */ | 80 /* When we're resumed we generate a signal ourselves. */ |
86 gen_signal (); | 81 gen_signal (); |
87 | 82 |
88 return 0; | 83 return 0; |
89 } | 84 } |
OLD | NEW |