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 attaching to Linux stopped processes


On Mon, 18 Sep 2006 15:16:17 +0200, Daniel Jacobowitz wrote:
...
> > Also the patch looks right to me - after `PT_ATTACH' it is appropriate that
> > `WSTOPSIG (status)' will report the original signal that stopped process,
> > (WSTOPSIG (status) == SIGSTOP) <=> (process was in running/sleeping mode).
> 
> The part I was dubious about was the zero if already stopped by
> sigstop.
[ see below ]
> In any case, I agree.  The patch to linux-nat.c is OK to apply.
> 
> I'm not sure about the testcase though :-(  I don't think it'll work
> without the RH patched kernel, will it?

The testcase does not work for kernel.org kernels.
And in fast on kernel.org Linux kernels the patch also does not work well as
you need to manually "kill -CONT" the process during the attach, moreover gdb
will get 'SIGCONT' id afterwards (and leave the process running after detach).

(I did not test but) I expect the Red Hat kernels behavior change is due to the
new utrace patch from Intel present in Red Hat kernels. It is going to be
imported to kernel.org one day changing the current (IMO broken - I may be
wrong) kernels behavior.

Still I consider the patch to be better than the current behavior but still it
is not fully functional, sorry for its submission; going to check the patches
on kernel.org kernels next time.  Patch update from me possible later.


Regards,
Jan


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