/* Native-dependent code for GNU/Linux x86-64.
- Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
- Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+ 2011 Free Software Foundation, Inc.
Contributed by Jiri Smid, SuSE Labs.
This file is part of GDB.
<asm/ptrace.h> because the latter redefines FS and GS for no apparent
reason, and those definitions don't match the ones that libpthread_db
uses, which come from <sys/reg.h>. */
-/* ezannoni-2003-07-09: I think this is fixed. The extraneous defs have
+/* ezannoni-2003-07-09: I think this is fixed. The extraneous defs have
been removed from ptrace.h in the kernel. However, better safe than
sorry. */
#include <asm/ptrace.h>
amd64_linux_dr_set_control (unsigned long control)
{
struct lwp_info *lp;
- ptid_t ptid;
amd64_linux_dr[DR_CONTROL] = control;
- ALL_LWPS (lp, ptid)
- amd64_linux_dr_set (ptid, DR_CONTROL, control);
+ ALL_LWPS (lp)
+ amd64_linux_dr_set (lp->ptid, DR_CONTROL, control);
}
/* Set address REGNUM (zero based) to ADDR in all LWPs of LWP_LIST. */
amd64_linux_dr_set_addr (int regnum, CORE_ADDR addr)
{
struct lwp_info *lp;
- ptid_t ptid;
gdb_assert (regnum >= 0 && regnum <= DR_LASTADDR - DR_FIRSTADDR);
amd64_linux_dr[DR_FIRSTADDR + regnum] = addr;
- ALL_LWPS (lp, ptid)
- amd64_linux_dr_set (ptid, DR_FIRSTADDR + regnum, addr);
+ ALL_LWPS (lp)
+ amd64_linux_dr_set (lp->ptid, DR_FIRSTADDR + regnum, addr);
}
/* Set address REGNUM (zero based) to zero in all LWPs of LWP_LIST. */
amd64_linux_dr_unset_status (unsigned long mask)
{
struct lwp_info *lp;
- ptid_t ptid;
- ALL_LWPS (lp, ptid)
+ ALL_LWPS (lp)
{
unsigned long value;
- value = amd64_linux_dr_get (ptid, DR_STATUS);
+ value = amd64_linux_dr_get (lp->ptid, DR_STATUS);
value &= ~mask;
- amd64_linux_dr_set (ptid, DR_STATUS, value);
+ amd64_linux_dr_set (lp->ptid, DR_STATUS, value);
}
}