This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug breakpoints/21870] aarch64: Leftover uncleared debug registers
- From: "weimin.pan at oracle dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Tue, 12 Sep 2017 00:03:02 +0000
- Subject: [Bug breakpoints/21870] aarch64: Leftover uncleared debug registers
- Auto-submitted: auto-generated
- References: <bug-21870-4717@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=21870
weimin.pan at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |weimin.pan at oracle dot com
--- Comment #1 from weimin.pan at oracle dot com ---
Looks like it's the kernel that set these control registers with non-zero
values. To experiment and verify the new register contents, just added a
PTRACE_GETREGSET call, immediately following the PTRACE_SETREGSET call in
aarch64_linux_set_debug_regs().
Register contents for the PTRACE_SETREGSET call:
gdb) p/x regs
$3 = {dbg_info = 0x0, pad = 0x0, dbg_regs = {{addr = 0x0, ctrl = 0x0,
pad = 0x0} <repeats 16 times>}}
588 if (ptrace (PTRACE_SETREGSET, tid,
(gdb) n
596 if (ptrace (PTRACE_GETREGSET, tid, NT_ARM_HW_WATCH, &iov) == 0)
(gdb) n
598 regs.dbg_regs[0].addr, regs.dbg_regs[0].ctrl);
After the PTRACE_GETREGSET call:
(gdb) p/x regs
$4 = {dbg_info = 0x604, pad = 0x0, dbg_regs = {{addr = 0x0, ctrl = 0x1fc,
pad = 0x0}, {addr = 0x0, ctrl = 0x1fc, pad = 0x0}, {addr = 0x0,
ctrl = 0x1fc, pad = 0x0}, {addr = 0x0, ctrl = 0x1fc, pad = 0x0}, {
addr = 0x0, ctrl = 0x0, pad = 0x0} <repeats 12 times>}}
--
You are receiving this mail because:
You are on the CC list for the bug.