public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug remote/18965] New: new vforkdone stop reply should indicate parent process ID
@ 2015-09-15 16:10 palves at redhat dot com
  2015-09-15 16:10 ` [Bug remote/18965] " palves at redhat dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: palves at redhat dot com @ 2015-09-15 16:10 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=18965

            Bug ID: 18965
           Summary: new vforkdone stop reply should indicate parent
                    process ID
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: remote
          Assignee: unassigned at sourceware dot org
          Reporter: palves at redhat dot com
  Target Milestone: ---

The new vforkdone stop reply misses indicating the thread ID of the vfork
parent which the event relates to:

Note:

 @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.

vs:

 @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.

Unfortunately, this is not just a documentation issue.  GDBserver
is really not specifying the thread ID.  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, there's no way to tell which of the parent processes
is done with the vfork.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-10-21  6:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-15 16:10 [Bug remote/18965] New: new vforkdone stop reply should indicate parent process ID palves at redhat dot com
2015-09-15 16:10 ` [Bug remote/18965] " palves at redhat dot com
2015-09-15 16:33 ` cvs-commit at gcc dot gnu.org
2015-09-15 16:37 ` cvs-commit at gcc dot gnu.org
2015-09-15 17:03 ` cvs-commit at gcc dot gnu.org
2015-09-15 17:06 ` palves at redhat dot com
2015-09-15 18:34 ` cvs-commit at gcc dot gnu.org
2015-09-15 18:37 ` cvs-commit at gcc dot gnu.org
2021-10-21  6:50 ` bap.fayol at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).