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:
Daniel Jacobowitz 2009-01-20 15:33:14 +00:00
parent 6f3b91a621
commit a12cc160ab
5 changed files with 68 additions and 8 deletions

View file

@ -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)
{