if the process stops with SIGTRAP (breakpoint),

don't relay the signal when restarting it.

R=r
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=28060
CL=28064
This commit is contained in:
Russ Cox 2009-04-29 18:53:01 -07:00
parent c0b8b969ae
commit d2e42f3e48

View File

@ -610,9 +610,10 @@ procnotes(int pid, char ***pnotes)
return 0; return 0;
} }
notes = mallocz(32*sizeof(char*), 0); notes = malloc(32*sizeof(char*));
if(notes == nil) if(notes == nil)
return -1; return -1;
memset(notes, 0, 32*sizeof(char*));
n = 0; n = 0;
for(i=0; i<32; i++){ for(i=0; i<32; i++){
if((sigs&(1<<i)) == 0) if((sigs&(1<<i)) == 0)
@ -713,7 +714,7 @@ ctlproc(int pid, char *msg)
if(t->state == Running) if(t->state == Running)
return 0; return 0;
data = 0; data = 0;
if(t->state == Stopped && t->signal != SIGSTOP) if(t->state == Stopped && t->signal != SIGSTOP && t->signal != SIGTRAP)
data = t->signal; data = t->signal;
if(trace && data) if(trace && data)
fprint(2, "tid %d: continue %lud\n", pid, (ulong)data); fprint(2, "tid %d: continue %lud\n", pid, (ulong)data);