aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/gdbserver/ChangeLog5
-rw-r--r--gdb/gdbserver/i386-low.c12
-rw-r--r--gdb/i386-nat.c17
4 files changed, 24 insertions, 15 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 54a573e..70b68ab 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2014-06-18 Gary Benson <gbenson@redhat.com>
+ * i386-nat.c (i386_update_inferior_debug_regs) <state>:
+ New parameter. All uses updated.
+
+2014-06-18 Gary Benson <gbenson@redhat.com>
+
* i386-nat.c (maint_show_dr): Renamed to debug_hw_points.
All uses updated.
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 91dc498..7c72043 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,5 +1,10 @@
2014-06-18 Gary Benson <gbenson@redhat.com>
+ * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
+ Renamed to state.
+
+2014-06-18 Gary Benson <gbenson@redhat.com>
+
* i386-low.c (i386_length_and_rw_bits): Use internal_error
instead of fatal and error.
(i386_handle_nonaligned_watchpoint): Likewise.
diff --git a/gdb/gdbserver/i386-low.c b/gdb/gdbserver/i386-low.c
index 54dd4b8..8c50838 100644
--- a/gdb/gdbserver/i386-low.c
+++ b/gdb/gdbserver/i386-low.c
@@ -417,27 +417,27 @@ Invalid value %d of operation in i386_handle_nonaligned_watchpoint.\n"),
return retval;
}
-/* Update the inferior debug registers state, in INF_STATE, with the
+/* 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 *inf_state,
+i386_update_inferior_debug_regs (struct i386_debug_reg_state *state,
struct i386_debug_reg_state *new_state)
{
int i;
ALL_DEBUG_REGISTERS (i)
{
- if (I386_DR_VACANT (new_state, i) != I386_DR_VACANT (inf_state, i))
+ if (I386_DR_VACANT (new_state, i) != I386_DR_VACANT (state, i))
i386_dr_low_set_addr (new_state, i);
else
- gdb_assert (new_state->dr_mirror[i] == inf_state->dr_mirror[i]);
+ gdb_assert (new_state->dr_mirror[i] == state->dr_mirror[i]);
}
- if (new_state->dr_control_mirror != inf_state->dr_control_mirror)
+ if (new_state->dr_control_mirror != state->dr_control_mirror)
i386_dr_low_set_control (new_state);
- *inf_state = *new_state;
+ *state = *new_state;
}
/* Insert a watchpoint to watch a memory region which starts at
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);