This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v4 5/7] Arch-specific remote follow fork


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]