]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdbserver/ChangeLog
Extended-remote follow vfork
authorDon Breazeal <donb@codesourcery.com>
Tue, 12 May 2015 16:52:45 +0000 (09:52 -0700)
committerDon Breazeal <donb@codesourcery.com>
Tue, 12 May 2015 16:52:45 +0000 (09:52 -0700)
commitc269dbdb603216de2be52f07f26e65ead7e11c7b
tree58e3c78262fd63c0e2f937350b1020f461b06554
parent3a8a0396bed4e9dd87c2df0f68386a0f04dfc824
Extended-remote follow vfork

This patch implements follow-fork for vfork on extended-remote Linux targets.

The implementation follows the native implementation as much as possible.
Most of the work is done on the GDB side in the existing code now in
infrun.c.  GDBserver just has to report the events and do a little
bookkeeping.

Implementation includes:

 * enabling VFORK events by adding ptrace options for VFORK and VFORK_DONE
   to linux-low.c:linux_low_ptrace_options.

 * handling VFORK and VFORK_DONE events in linux-low.c:handle_extended_wait
   and reporting them to GDB.

 * including VFORK and VFORK_DONE events in the predicate
   linux-low.c:extended_event_reported.

 * adding support for VFORK and VFORK_DONE events in RSP by adding stop
   reasons "vfork" and "vforkdone" to the 'T' Stop Reply Packet in both
   gdbserver/remote-utils.c and gdb/remote.c.

Tested on x64 Ubuntu Lucid, native, remote, extended-remote.

gdb/gdbserver/ChangeLog:

        * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
        PTRACE_EVENT_VFORK_DONE.
        (linux_low_ptrace_options, extended_event_reported): Add vfork
        events.
        * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
        and "vforkdone" for RSP 'T' Stop Reply Packet.
        * server.h (report_vfork_events): Declare
        global variable.

gdb/ChangeLog:

        * remote.c (remove_vfork_event_p): New function.
        (remote_follow_fork): Add vfork event type to event checking.
        (remote_parse_stop_reply): New stop reasons "vfork" and
        "vforkdone" for RSP 'T' Stop Reply Packet.
gdb/ChangeLog
gdb/gdbserver/ChangeLog
gdb/gdbserver/linux-low.c
gdb/gdbserver/remote-utils.c
gdb/gdbserver/server.h
gdb/remote.c