aboutsummaryrefslogtreecommitdiff
path: root/gdb/i386-nat.c
diff options
context:
space:
mode:
authorGary Benson <gbenson@redhat.com>2014-06-12 12:01:11 +0100
committerGary Benson <gbenson@redhat.com>2014-06-18 10:15:23 +0100
commitd9305f7fef566159dd940a11155107407f43ec15 (patch)
tree1eb4652a1ae3c2a393fbe66add08d5bf5286e48a /gdb/i386-nat.c
parentea008da432a185fccb9ef967b32092eea98d3c9e (diff)
downloadgdb-d9305f7fef566159dd940a11155107407f43ec15.zip
gdb-d9305f7fef566159dd940a11155107407f43ec15.tar.gz
gdb-d9305f7fef566159dd940a11155107407f43ec15.tar.bz2
Merge i386_update_inferior_debug_regs
This commit synchronizes the i386_update_inferior_debug_regs functions in i386-nat.c and i386-low.c. gdb/ 2014-06-18 Gary Benson <gbenson@redhat.com> * i386-nat.c (i386_update_inferior_debug_regs) <state>: New parameter. All uses updated. gdb/gdbserver/ 2014-06-18 Gary Benson <gbenson@redhat.com> * i386-low.c (i386_update_inferior_debug_regs) <inf_state>: Renamed to state.
Diffstat (limited to 'gdb/i386-nat.c')
-rw-r--r--gdb/i386-nat.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/gdb/i386-nat.c b/gdb/i386-nat.c
index 6520549..a64cdab 100644
--- a/gdb/i386-nat.c
+++ b/gdb/i386-nat.c
@@ -526,14 +526,13 @@ Invalid value %d of operation in i386_handle_nonaligned_watchpoint.\n"),
return retval;
}
-/* Update the inferior's debug registers with the new debug registers
- state, in NEW_STATE, and then update our local mirror to match. */
+/* Update the inferior debug registers state, in STATE, with the
+ new debug registers state, in NEW_STATE. */
static void
-i386_update_inferior_debug_regs (struct i386_debug_reg_state *new_state)
+i386_update_inferior_debug_regs (struct i386_debug_reg_state *state,
+ struct i386_debug_reg_state *new_state)
{
- struct i386_debug_reg_state *state
- = i386_debug_reg_state (ptid_get_pid (inferior_ptid));
int i;
ALL_DEBUG_REGISTERS (i)
@@ -586,7 +585,7 @@ i386_insert_watchpoint (struct target_ops *self,
}
if (retval == 0)
- i386_update_inferior_debug_regs (&local_state);
+ i386_update_inferior_debug_regs (state, &local_state);
if (debug_hw_points)
i386_show_dr (state, "insert_watchpoint", addr, len, type);
@@ -626,7 +625,7 @@ i386_remove_watchpoint (struct target_ops *self,
}
if (retval == 0)
- i386_update_inferior_debug_regs (&local_state);
+ i386_update_inferior_debug_regs (state, &local_state);
if (debug_hw_points)
i386_show_dr (state, "remove_watchpoint", addr, len, type);
@@ -761,7 +760,7 @@ i386_insert_hw_breakpoint (struct target_ops *self, struct gdbarch *gdbarch,
addr, len_rw) ? EBUSY : 0;
if (retval == 0)
- i386_update_inferior_debug_regs (&local_state);
+ i386_update_inferior_debug_regs (state, &local_state);
if (debug_hw_points)
i386_show_dr (state, "insert_hwbp", addr, 1, hw_execute);
@@ -787,7 +786,7 @@ i386_remove_hw_breakpoint (struct target_ops *self, struct gdbarch *gdbarch,
addr, len_rw);
if (retval == 0)
- i386_update_inferior_debug_regs (&local_state);
+ i386_update_inferior_debug_regs (state, &local_state);
if (debug_hw_points)
i386_show_dr (state, "remove_hwbp", addr, 1, hw_execute);