Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Don Breazeal <donb@codesourcery.com>
To: Pedro Alves <palves@redhat.com>
Cc: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: problem with new vforkdone stop reply in 7.10
Date: Tue, 15 Sep 2015 14:51:00 -0000	[thread overview]
Message-ID: <55F8306D.4010801@codesourcery.com> (raw)
In-Reply-To: <55F828D9.8050100@redhat.com>

On 9/15/2015 7:19 AM, Pedro Alves wrote:
> Hi Don,
> 
> Unfortunately, I missed in review that the vforkdone stop reply
> misses indicating the thread ID of the vfork parent which the
> event relates to:
> 
>  @cindex vfork events, remote reply
>  @item vfork
>  The packet indicates that @code{vfork} was called, and @var{r}
>  is the thread ID of the new child process. Refer to
>  @ref{thread-id syntax} for the format of the @var{thread-id}
>  field.  This packet is only applicable to targets that support
>  vfork events.
> 
>  @cindex vforkdone events, remote reply
>  @item vforkdone
>  The packet indicates that a child process created by a vfork
>  has either called @code{exec} or terminated, so that the
>  address spaces of the parent and child process are no longer
>  shared. The @var{r} part is ignored.  This packet is only
>  applicable to targets that support vforkdone events.
> 
> Unfortunately, this is not just a documentation issue.  GDBserver
> is really not specifying the thread ID.  I noticed because
> in non-stop mode, gdb complains:
> 
>  [Thread 6089.6089] #1 stopped.
>  #0  0x0000003615a011f0 in ?? ()
>  0x0000003615a011f0 in ?? ()
>  (gdb) set debug remote 1
>  (gdb) c
>  Continuing.
>  Sending packet: $QPassSignals:e;10;14;17;1a;1b;1c;21;24;25;2c;4c;#5f...Packet received: OK
>  Sending packet: $vCont;c:p17c9.17c9#88...Packet received: OK
>    Notification received: Stop:T05vfork:p17ce.17ce;06:40d7ffffff7f0000;07:30d7ffffff7f0000;10:e4c9eb1536000000;thread:p17c9.17c9;core:2;
>  Sending packet: $vStopped#55...Packet received: OK
>  Sending packet: $D;17ce#af...Packet received: OK
>  Sending packet: $vCont;c:p17c9.17c9#88...Packet received: OK
>    Notification received: Stop:T05vforkdone:;
>  No process or thread specified in stop reply: T05vforkdone:;
>  (gdb)
> 
> This is not non-stop-mode-specific, however.  Consider e.g., that
> in all-stop, you may be debugging more than one process at the
> same time.  You continue, and both processes vfork.  So if you next
> a T05vforkdone, how can we tell which of the parent processes
> has had its child exit/exec?
> 
> Thanks,
> Pedro Alves
> 
Hi Pedro,
Thanks for pointing this out.  I will take a look at it.  This case
would make an interesting test.
--Don


  reply	other threads:[~2015-09-15 14:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-15 14:19 Pedro Alves
2015-09-15 14:51 ` Don Breazeal [this message]
2015-09-15 14:51 ` Pedro Alves
2015-09-15 15:46   ` Don Breazeal
2015-09-15 15:56     ` Pedro Alves
2015-09-15 18:14   ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55F8306D.4010801@codesourcery.com \
    --to=donb@codesourcery.com \
    --cc=gdb@sourceware.org \
    --cc=palves@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox