This is the mail archive of the gdb-prs@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]

[Bug breakpoints/21870] aarch64: Leftover uncleared debug registers


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.

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