+2014-08-28 Gary Benson <gbenson@redhat.com>
+
+ * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
+ gdb_assert.
+ (i386_dr_low_get_addr): Remove vague comment.
+ * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
+ gdb_assert.
+
2014-08-28 Gary Benson <gbenson@redhat.com>
* inferiors.c (get_thread_process): Replace check with gdb_assert.
/* Only update the threads of this process. */
int pid = pid_of (current_inferior);
- if (! (regnum >= 0 && regnum <= DR_LASTADDR - DR_FIRSTADDR))
- fatal ("Invalid debug register %d", regnum);
+ gdb_assert (DR_FIRSTADDR <= regnum && regnum <= DR_LASTADDR);
find_inferior (&all_threads, update_debug_registers_callback, &pid);
}
{
ptid_t ptid = ptid_of (current_inferior);
- /* DR6 and DR7 are retrieved with some other way. */
gdb_assert (DR_FIRSTADDR <= regnum && regnum <= DR_LASTADDR);
return x86_linux_dr_get (ptid, regnum);
static void
i386_dr_low_set_addr (int regnum, CORE_ADDR addr)
{
- if (! (regnum >= 0 && regnum <= DR_LASTADDR - DR_FIRSTADDR))
- fatal ("Invalid debug register %d", regnum);
+ gdb_assert (DR_FIRSTADDR <= regnum && regnum <= DR_LASTADDR);
/* debug_reg_state.dr_mirror is already set.
Just notify i386_set_thread_context, i386_thread_added