/* Target-dependent code for GNU/Linux x86-64.
- Copyright (C) 2001-2017 Free Software Foundation, Inc.
+ Copyright (C) 2001-2019 Free Software Foundation, Inc.
Contributed by Jiri Smid, SuSE Labs.
This file is part of GDB.
static LONGEST
amd64_linux_get_syscall_number (struct gdbarch *gdbarch,
- ptid_t ptid)
+ thread_info *thread)
{
- struct regcache *regcache = get_thread_regcache (ptid);
+ struct regcache *regcache = get_thread_regcache (thread);
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
/* The content of a register. */
gdb_byte buf[8];
/* Getting the system call number from the register.
When dealing with x86_64 architecture, this information
is stored at %rax register. */
- regcache_cooked_read (regcache, AMD64_LINUX_ORIG_RAX_REGNUM, buf);
+ regcache->cooked_read (AMD64_LINUX_ORIG_RAX_REGNUM, buf);
ret = extract_signed_integer (buf, 8, byte_order);
static enum gdb_syscall
amd64_canonicalize_syscall (enum amd64_syscall syscall_number)
{
+ DIAGNOSTIC_PUSH
+ DIAGNOSTIC_IGNORE_SWITCH_DIFFERENT_ENUM_TYPES
+
switch (syscall_number) {
case amd64_sys_read:
case amd64_x32_sys_read:
default:
return gdb_sys_no_syscall;
}
+
+ DIAGNOSTIC_POP
}
/* Parse the arguments of current system call instruction and record
}
if (*tdesc == NULL)
- *tdesc = amd64_create_target_description (xcr0_features_bit, is_x32, true);
+ *tdesc = amd64_create_target_description (xcr0_features_bit, is_x32,
+ true, true);
return *tdesc;
}
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
- cb (".reg", 27 * 8, &i386_gregset, NULL, cb_data);
- cb (".reg2", 512, &amd64_fpregset, NULL, cb_data);
- cb (".reg-xstate", X86_XSTATE_SIZE (tdep->xcr0),
+ cb (".reg", 27 * 8, 27 * 8, &i386_gregset, NULL, cb_data);
+ cb (".reg2", 512, 512, &amd64_fpregset, NULL, cb_data);
+ cb (".reg-xstate", X86_XSTATE_SIZE (tdep->xcr0), X86_XSTATE_SIZE (tdep->xcr0),
&amd64_linux_xstateregset, "XSAVE extended state", cb_data);
}