This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[eliz@is.elta.co.il: Signals support in DJGPP port of GDB]


------- Start of forwarded message -------
Date: Sun, 27 Jun 1999 18:57:10 +0300 (IDT)
From: Eli Zaretskii <eliz@is.elta.co.il>
X-Sender: eliz@is
To: DJ Delorie <dj@delorie.com>
Subject: Signals support in DJGPP port of GDB
Content-Type: TEXT/PLAIN; charset=US-ASCII

These changes fix some signal-related problems:

1999-06-26  Eli Zaretskii  <eliz@is.elta.co.il>

	* utils.c (endif) [__DJGPP__]: Simulate a core dump with SIGABRT.
	(quit) [__MSDOS__]: Don't mention SIGINT, since it's not gonna
	happen.
	(notice_quit): No need to define this function for the DJGPP
	port.

*** ./gdb/utils.c~0	Thu Feb 11 00:24:40 1999
- --- ./gdb/utils.c	Sat May 22 08:47:34 1999
*************** fatal_dump_core (va_alist)
*** 512,519 ****
- --- 512,525 ----
    fprintf_unfiltered (gdb_stderr, "\n");
    va_end (args);
  
+ #ifdef __DJGPP__
+   /* SIGQUIT by default is ignored, so use SIGABRT instead.  */
+   signal (SIGABRT, SIG_DFL);
+   kill (getpid (), SIGABRT);
+ #else
    signal (SIGQUIT, SIG_DFL);
    kill (getpid (), SIGQUIT);
+ #endif
    /* We should never get here, but just in case...  */
    exit (1);
  }
*************** quit ()
*** 637,642 ****
- --- 643,653 ----
    if (quit_pre_print)
      fprintf_unfiltered (gdb_stderr, quit_pre_print);
  
+ #ifdef __MSDOS__
+       /* No steenking SIGINT will ever be coming our way when the
+          program is resumed.  Don't lie.  */
+   fprintf_unfiltered (gdb_stderr, "Quit\n");
+ #else
    if (job_control
        /* If there is no terminal switching for this target, then we can't
  	 possibly get screwed by the lack of job control.  */
*************** quit ()
*** 645,680 ****
    else
      fprintf_unfiltered (gdb_stderr,
  	     "Quit (expect signal SIGINT when the program is resumed)\n");
    return_to_top_level (RETURN_QUIT);
  }
  
! 
! #if defined(__GO32__)
! 
! /* In the absence of signals, poll keyboard for a quit.
!    Called from #define QUIT pollquit() in xm-go32.h. */
! 
! void
! notice_quit()
! {
!   if (kbhit ())
!     switch (getkey ())
!       {
!       case 1:
! 	quit_flag = 1;
! 	break;
!       case 2:
! 	immediate_quit = 2;
! 	break;
!       default:
! 	/* We just ignore it */
! 	/* FIXME!! Don't think this actually works! */
! 	fprintf_unfiltered (gdb_stderr, "CTRL-A to quit, CTRL-B to quit harder\n");
! 	break;
!       }
! }
! 
! #elif defined(_MSC_VER) /* should test for wingdb instead? */
  
  /*
   * Windows translates all keyboard and mouse events 
- --- 656,666 ----
    else
      fprintf_unfiltered (gdb_stderr,
  	     "Quit (expect signal SIGINT when the program is resumed)\n");
+ #endif
    return_to_top_level (RETURN_QUIT);
  }
  
! #if defined(_MSC_VER) /* should test for wingdb instead? */
  
  /*
   * Windows translates all keyboard and mouse events 
------- End of forwarded message -------

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]