+2015-03-24 Gary Benson <gbenson@redhat.com>
+
+ * x86-linux-nat.c (x86_linux_dr_set_addr): Update assertion.
+ (x86_linux_new_thread): Rename argument.
+
2015-03-24 Gary Benson <gbenson@redhat.com>
* nat/x86-linux.h: New file.
+2015-03-24 Gary Benson <gbenson@redhat.com>
+
+ * linux-x86-low.c (x86_linux_dr_get): Add assertion.
+ Use perror_with_name. Pass string through gettext.
+ (x86_linux_dr_set): Likewise.
+
2015-03-24 Gary Benson <gbenson@redhat.com>
* linux-x86-low.c (x86_dr_low_set_addr): Rename to...
int tid;
unsigned long value;
+ gdb_assert (ptid_lwp_p (ptid));
tid = ptid_get_lwp (ptid);
errno = 0;
value = ptrace (PTRACE_PEEKUSER, tid, u_debugreg_offset (regnum), 0);
if (errno != 0)
- error ("Couldn't read debug register");
+ perror_with_name (_("Couldn't read debug register"));
return value;
}
{
int tid;
+ gdb_assert (ptid_lwp_p (ptid));
tid = ptid_get_lwp (ptid);
errno = 0;
ptrace (PTRACE_POKEUSER, tid, u_debugreg_offset (regnum), value);
if (errno != 0)
- error ("Couldn't write debug register");
+ perror_with_name (_("Couldn't write debug register"));
}
static int
{
ptid_t pid_ptid = pid_to_ptid (ptid_get_pid (current_lwp_ptid ()));
- gdb_assert (regnum >= 0 && regnum <= DR_LASTADDR - DR_FIRSTADDR);
+ gdb_assert (DR_FIRSTADDR <= regnum && regnum <= DR_LASTADDR);
iterate_over_lwps (pid_ptid, update_debug_registers_callback, NULL);
}
}
static void
-x86_linux_new_thread (struct lwp_info *lp)
+x86_linux_new_thread (struct lwp_info *lwp)
{
- lwp_set_debug_registers_changed (lp, 1);
+ lwp_set_debug_registers_changed (lwp, 1);
}
\f