Mail Archives: djgpp-workers/1999/05/23/06:10:42
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 -