www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/05/23/06:10:42

Date: Sun, 23 May 1999 13:07:47 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Robert Hoehne <robert DOT hoehne AT gmx DOT net>, djgpp-workers AT delorie DOT com
cc: Andris Pavenis <pavenis AT lanet DOT lv>
Subject: Re: gdb 4.18 for DJGPP (alpha)
In-Reply-To: <Pine.SUN.3.91.990523121832.26578A-100000@is>
Message-ID: <Pine.SUN.3.91.990523130147.29194A-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

The latest dbgcom.c doesn't save and restore SIGQUIT across debuggee
invocations.  I think this might make trouble if the debuggee enables
SIGQUIT.  At least when I linked GDB with the v2.02 version of dbgcom.c
and pressed Ctrl-\ after running the debuggee, GDB crashed and took
CWSDPMI with it (and the registers' dump clearly indicated that ES and GS
came from the debuggee). 

The patch is below (it might not apply cleanly, since I ran 
diff against v2.02 sources); if there are no objections, I will check it 
in.

*** src/debug/common/dbgcom.c~0	Sun Jun 28 22:37:44 1998
--- src/debug/common/dbgcom.c	Fri May 21 16:36:28 1999
*************** static void (*oldTRAP)(int);
*** 610,615 ****
--- 610,616 ----
  static void (*oldSEGV)(int);
  static void (*oldFPE)(int);
  static void (*oldINT)(int);
+ static void (*oldQUIT)(int);
  
  void edi_init(jmp_buf start_state)
  {
*************** void edi_init(jmp_buf start_state)
*** 637,642 ****
--- 638,644 ----
    oldSEGV = signal(SIGSEGV, dbgsig);
    oldFPE = signal(SIGFPE, dbgsig);
    oldINT = signal(SIGINT, dbgsig);
+   oldQUIT = signal(SIGQUIT, dbgsig);
    movedata(a_tss.tss_fs,0,my_ds,(unsigned)&si,sizeof(si));
    memset(mem_handles,0,sizeof(mem_handles));
    mem_handles[0] = si.memory_handle;
*************** void cleanup_client(void)
*** 696,701 ****
--- 698,704 ----
    signal(SIGSEGV, oldSEGV);
    signal(SIGFPE, oldFPE);
    signal(SIGINT, oldINT);
+   signal(SIGQUIT, oldQUIT);
  }
  
  /*

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019