This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

Re: [patch] Fix Linux attach to signalled/stopped processes


On Thu, Apr 10, 2008 at 05:48:39PM +0200, Jan Kratochvil wrote:
> > If I run attach-stopped from your testcase in a shell, then send it a
> > stop signal using kill from another window, stock GDB fails to attach
> > to it - just as I'd expect, that's the bug we're discussing.  But if I
> > run the attach-stopped.exp test script this part works fine.  It turns
> > out that if we spawn the program in expect (even at the expect1.1>
> > prompt, by hand) instead of using a shell with job control, GDB can
> > attach to it just fine.
> 
> As the shell already did WAITPID on the process and ate the SIGSTOP
> notification so there is no other notification left there for GDB.
> A process already stopped does not generate another SIGSTOP during
> PTRACE_ATTACH as signals never count.
> 
> [ Sure from info from Roland before. ]

Ah-hah.  Thanks, that makes sense.  exit_code doesn't show up in
/proc anywhere.

-- 
Daniel Jacobowitz
CodeSourcery


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