This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v4 5/7] Arch-specific remote follow fork
- From: Pedro Alves <palves at redhat dot com>
- To: Don Breazeal <donb at codesourcery dot com>, gdb-patches at sourceware dot org
- Date: Tue, 10 Feb 2015 16:37:23 +0000
- Subject: Re: [PATCH v4 5/7] Arch-specific remote follow fork
- Authentication-results: sourceware.org; auth=none
- References: <54C236B9 dot 8060200 at redhat dot com> <1422222420-25421-1-git-send-email-donb at codesourcery dot com> <1422222420-25421-6-git-send-email-donb at codesourcery dot com>
On 01/25/2015 09:46 PM, Don Breazeal wrote:
> This patch implements the architecture-specific pieces of follow-fork
> for remote and extended-remote Linux targets, which in the current
> implementation copyies the parent's debug register state into the new
> child's data structures. This is required for x86, arm, aarch64, and
> mips.
>
> This follows the native implementation as closely as possible by
> implementing a new linux_target_ops function 'new_fork', which is
> analogous to 'linux_nat_new_fork' in linux-nat.c. In gdbserver, the debug
> registers are stored in the process list, instead of an
> architecture-specific list, so the function arguments are process_info
> pointers instead of an lwp_info and a pid as in the native implementation.
>
> In the MIPS implementation the debug register mirror is stored differently
> from x86, ARM, and aarch64, so instead of doing a simple structure assignment
> I had to clone the list of watchpoint structures.
>
> Tested using gdb.threads/watchpoint-fork.exp on x86, and ran manual tests
> on a MIPS board and an ARM board.
>
> I don't currently have access to an aarch64 board, so if someone is able
> to test this easily, please do.
LGTM. I'd prefer moving this earlier, before the "target remote"
changes; I think we may need to iterate those a bit more.
Thanks,
Pedro Alves