PR gdb/9346
* infcmd.c (signal_command): Do not specify a resume PC. testsuite/ PR gdb/9346 * gdb.base/interrupt.c (sigint_handler): New. (main): Install a SIGINT handler if SIGNALS is defined. Exit on error. * gdb.base/interrupt.exp: Define SIGNALS unless gdb,nosignals. Test "signal SIGINT".
This commit is contained in:
parent
6f3b91a621
commit
a12cc160ab
5 changed files with 68 additions and 8 deletions
|
@ -2,6 +2,16 @@
|
|||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef SIGNALS
|
||||
#include <signal.h>
|
||||
|
||||
static void
|
||||
sigint_handler (int signo)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
@ -10,6 +20,9 @@ main ()
|
|||
#ifdef usestubs
|
||||
set_debug_traps();
|
||||
breakpoint();
|
||||
#endif
|
||||
#ifdef SIGNALS
|
||||
signal (SIGINT, sigint_handler);
|
||||
#endif
|
||||
printf ("talk to me baby\n");
|
||||
while (1)
|
||||
|
@ -20,7 +33,10 @@ main ()
|
|||
#ifdef EINTR
|
||||
if (errno != EINTR)
|
||||
#endif
|
||||
perror ("");
|
||||
{
|
||||
perror ("");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else if (nbytes == 0)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue