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: [gdbserver] Fix attaching notices


On Sat, Jun 28, 2008 at 12:11:12AM +0100, Pedro Alves wrote:
> Hi,
> 
> This patch fixes several issues I noticed with attaching
> to processes with gdbserver's --multi support, on several
> host/target combinations:
> 
> Linux host -> Linux gdbserver
> 
>  There's code in gdbserver to pretend the initial SIGSTOP
>  was a SIGTRAP, that's been put there so
>  "gdbserver --attach PID"; "target remote", doesn't see
>  the SIGSTOP.  This smudging should not be done when
>  handling a vAttach, otherwise, the user is presented
>  with:
> 
>  (gdb) tar extended-remote :9999
>  Remote debugging using :9999
>  (gdb) attach 32762
>  Attached to Thread 32762
>  [New Thread 32762]
> 
>  Program received signal SIGTRAP, Trace/breakpoint trap.
>  0x00007fc30f5d0b30 in ?? ()
> 
>  ... a bogus SIGTRAP.

Did you reproduce this with an unmodified GDB or a patched one?  I
can't reproduce it - I was curious since I did test vAttach and I
don't remember seeing these SIGTRAPs.

Actually, wait... trying another GDB I see that this problem has
appeared on the GDB side between 6.8 and HEAD.  6.8 doesn't print out
the message about a SIGTRAP.

>  [Switching to Thread 2232]
>  Stopped due to shared library event
>  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This part looks fine.

-- 
Daniel Jacobowitz
CodeSourcery


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