This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 06/16 v3] Extended-remote Linux follow fork
- From: "Breazeal, Don" <donb at codesourcery dot com>
- To: Pedro Alves <palves at redhat dot com>, <gdb-patches at sourceware dot org>
- Date: Thu, 13 Nov 2014 11:06:20 -0800
- Subject: Re: [PATCH 06/16 v3] Extended-remote Linux follow fork
- Authentication-results: sourceware.org; auth=none
- References: <1408580964-27916-1-git-send-email-donb at codesourcery dot com> <1414798134-11536-4-git-send-email-donb at codesourcery dot com> <5464AB62 dot 5040100 at redhat dot com> <5464FE11 dot 1080001 at codesourcery dot com> <5464FF7D dot 6060103 at redhat dot com>
On 11/13/2014 10:59 AM, Pedro Alves wrote:
> On 11/13/2014 06:53 PM, Breazeal, Don wrote:
>> My initial approach was to do just that, but I ended up with
>> linux-specific code in remote.c (the code that lives in linux-nat.c
>> for the native implementation). I guess the direction of recent
>> changes would be to put that code into a common file in gdb/nat,
>> if possible. Would that be the approach you would recommend?
>
> I'm not seeing what would be linux-specific? On remote_follow_fork
> fork, we switch the current remote thread to gdb's current
> thread (either parent or child), by
> calling 'set_general_thread (inferior_ptid);'
> And then if we need to detach parent or child, we detach it with
> the D;PID packet.
>
> Thanks,
> Pedro Alves
>
I don't recall the details at this point. I'll proceed
with your recommendation, assuming I don't need any
common code, and if I run into a problem I'll post a
question about it.
Thanks
--Don