[Bug testsuite/31484] [gdb/testsuite] Add memcpy, memmove, memset watchpoint tests

thiago.bauermann at linaro dot org sourceware-bugzilla@sourceware.org
Fri Apr 19 06:28:24 GMT 2024


https://sourceware.org/bugzilla/show_bug.cgi?id=31484

--- Comment #6 from Thiago Jung Bauermann <thiago.bauermann at linaro dot org> ---
Hello,

Sorry for the delay in reporting back here. I agree with Tom that it makes
sense to keep this PR for the testcases, as they aren't really AArch64-specific
and could uncover needed support in GDB for other architectures as well.

I created a very simple test program and ran it under GDB with glibc 2.39 —
which introduces the MOPS variants for memset, memcpy and memmove — on both
QEMU with -mcpu max and also on the Arm FVP emulator. GDB behaved pretty
normally regarding watchpoints triggered by memcpy, memmove and memset,
stopping where it's supposed to.

This is because both emulators report the exact address of the watchpoint as
the data trap address, so GDB has no problem identifying which watchpoint was
triggered. Real hardware is allowed by the spec to be less precise, so
unfortunately my experiment may not be representative of GDB behaviour there.

I'm finishing the last touches on the patch introducing the testcase, and will
post it on the mailing list tomorrow.

I'll open a separate PR for AArch64-specific MOPS support, because in the next
few days I'll send a couple of patches that are needed there: one for decoding
the new instructions for reverse execution, and one to treat a sequence of MOPS
instructions as atomic, to prevent GDB from breaking or stepping in the middle
of the sequence.

Does that sound OK?

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Gdb-prs mailing list