/* Native-dependent code for FreeBSD/i386.
- Copyright (C) 2001-2018 Free Software Foundation, Inc.
+ Copyright (C) 2001-2020 Free Software Foundation, Inc.
This file is part of GDB.
#include "fbsd-nat.h"
#include "i386-tdep.h"
#include "x86-nat.h"
-#include "x86-xstate.h"
+#include "gdbsupport/x86-xstate.h"
#include "x86-bsd-nat.h"
#include "i386-bsd-nat.h"
void
i386_fbsd_nat_target::resume (ptid_t ptid, int step, enum gdb_signal signal)
{
- pid_t pid = ptid_get_pid (ptid);
+ pid_t pid = ptid.pid ();
int request = PT_STEP;
if (pid == -1)
/* Resume all threads. This only gets used in the non-threaded
case, where "resume all threads" and "resume inferior_ptid" are
the same. */
- pid = ptid_get_pid (inferior_ptid);
+ pid = inferior_ptid.pid ();
if (!step)
{
return 0;
pcb->pcb_esp += 4;
- regcache_raw_supply (regcache, I386_EDI_REGNUM, &pcb->pcb_edi);
- regcache_raw_supply (regcache, I386_ESI_REGNUM, &pcb->pcb_esi);
- regcache_raw_supply (regcache, I386_EBP_REGNUM, &pcb->pcb_ebp);
- regcache_raw_supply (regcache, I386_ESP_REGNUM, &pcb->pcb_esp);
- regcache_raw_supply (regcache, I386_EBX_REGNUM, &pcb->pcb_ebx);
- regcache_raw_supply (regcache, I386_EIP_REGNUM, &pcb->pcb_eip);
- regcache_raw_supply (regcache, I386_GS_REGNUM, &pcb->pcb_gs);
+ regcache->raw_supply (I386_EDI_REGNUM, &pcb->pcb_edi);
+ regcache->raw_supply (I386_ESI_REGNUM, &pcb->pcb_esi);
+ regcache->raw_supply (I386_EBP_REGNUM, &pcb->pcb_ebp);
+ regcache->raw_supply (I386_ESP_REGNUM, &pcb->pcb_esp);
+ regcache->raw_supply (I386_EBX_REGNUM, &pcb->pcb_ebx);
+ regcache->raw_supply (I386_EIP_REGNUM, &pcb->pcb_eip);
+ regcache->raw_supply (I386_GS_REGNUM, &pcb->pcb_gs);
return 1;
}
{
struct ptrace_xstate_info info;
- if (ptrace (PT_GETXSTATE_INFO, ptid_get_pid (inferior_ptid),
+ if (ptrace (PT_GETXSTATE_INFO, inferior_ptid.pid (),
(PTRACE_TYPE_ARG3) &info, sizeof (info)) == 0)
{
x86bsd_xsave_len = info.xsave_len;
if (x86bsd_xsave_len == 0)
xcr0 = X86_XSTATE_SSE_MASK;
- return i386_target_description (xcr0);
+ return i386_target_description (xcr0, true);
}
#endif