Re: [PATCH] [native x86 GNU/Linux] Access debug register mirror from the corresponding inferior.

Pedro Alves
2013-02-13T15:14:53Z

Aarch64 people,

I'll send you an aarch64 version of this patch, unless you've
already started porting the necessary bits over.

I think the only difference on AArch64 will be this comment:

/* Linux kernel before 2.6.33 commit
72f674d203cd230426437cdcf7dd6f681dad8b0d
will inherit hardware debug registers from parent
on fork/vfork/clone. Newer Linux kernels create such tasks with
zeroed debug registers.

GDB core assumes the child inherits the watchpoints/hw
breakpoints of the parent, and will remove them all from the
forked off process. Copy the debug registers mirrors into the
new process so that all breakpoints and watchpoints can be
removed together. The debug registers mirror will become zeroed
in the end before detaching the forked off process, thus making
this compatible with older Linux kernels too. */

Where I assume all AArch64 kernels zero the debug registers, so
that part of the comment gets dropped.

--
Pedro Alves