forked from Imagelibrary/binutils-gdb
x86 debug address register clarifications
The loop macro ALL_DEBUG_REGISTERS does not iterate over the status or control registers, so its name is misleading. This commit renames it as ALL_DEBUG_ADDRESS_REGISTERS and updates all uses. This commit also updates its loop conditions to an equivalent but better form, and makes two functions use it that had previously hardwired the loop. A comment on a related field in the x86_debug_reg_state structure is also updated to reflect that the field refers specifically to address registers only. gdb/ChangeLog: * nat/x86-dregs.h (ALL_DEBUG_REGISTERS): Renamed as... (ALL_DEBUG_ADDRESS_REGISTERS): New macro. All uses updated. Loop conditions changed to equivalent form. (struct x86_debug_reg_state): Updated dr_ref_count comment. * x86-linux-nat.c (x86_linux_prepare_to_resume): Use ALL_DEBUG_ADDRESS_REGISTERS. gdb/gdbserver/ChangeLog: * linux-x86-low.c (x86_linux_prepare_to_resume): Use ALL_DEBUG_ADDRESS_REGISTERS.
This commit is contained in:
@@ -787,7 +787,7 @@ x86_linux_prepare_to_resume (struct lwp_info *lwp)
|
||||
|
||||
x86_linux_dr_set (ptid, DR_CONTROL, 0);
|
||||
|
||||
for (i = DR_FIRSTADDR; i <= DR_LASTADDR; i++)
|
||||
ALL_DEBUG_ADDRESS_REGISTERS (i)
|
||||
if (state->dr_ref_count[i] > 0)
|
||||
{
|
||||
x86_linux_dr_set (ptid, i, state->dr_mirror[i]);
|
||||
|
||||
Reference in New Issue
Block a user