2004-02-22 Mark Kettenis <kettenis@gnu.org>
+ * x86-64-linux-tdep.c: Tweak comment.
+ (amd64_linux_supply_gregset): Renamed from
+ x86_64_linux_supply_gresget.
+ (amd64_linux_fill_gregset): Renamed from
+ x86_64_linux_fill_gregset.
+ (fetch_core_registers): Adjust for renamed functions.
+ (amd64_core_fns): Renamed from x86_64_core_fns.
+ (amd64_linux_sigtramp_start): Renamed from
+ x86_64_linux_sigtramp_start.
+ (amd64_linux_pc_in_sigtramp): Renamed from
+ x86_64_linux_pc_in_sigtramp. Adjust for renamed functions.
+ (AMD64_LINUX_UCONTEXT_SIGCONTEXT_OFFSET): Renamed from
+ X86_64_LINUX_UCONTEXT_SIGCONTEXT_OFFSET.
+ (amd64_linux_sigcontext_addr): Renamed from
+ x86_64_linux_sigcontext_addr.
+ (amd64_linux_sc_reg_offset): Renamed from
+ x86_64_linux_sc_reg_offset.
+ (amd64_linux_init_abi): Renamed from x86_64_linux_init_abi.
+ Adjust for renamed functions and variables.
+ (_initialize_amd64_linux_tdep): Renamed from
+ _initialize_x86_64_linux_tdep. Adjust for renamed functions and
+ variables.
+ * x86-64-linux-tdep.h: Update copyright year. Tweak comment.
+ Adjust for renamed functions.
+
* x86-64-linux-nat.c (amd64_linux_gregset64_reg_offset): Rename
from x86_64_linux_gregset64_reg_offset.
(amd64_linux_gregset32_reg_offset): Rename from
-/* Target-dependent code for GNU/Linux running on x86-64, for GDB.
+/* Target-dependent code for GNU/Linux x86-64.
Copyright 2001, 2003, 2004 Free Software Foundation, Inc.
Contributed by Jiri Smid, SuSE Labs.
in *GREGSETP. */
void
-x86_64_linux_supply_gregset (char *regp)
+amd64_linux_supply_gregset (char *regp)
{
int i;
do this for all registers. */
void
-x86_64_linux_fill_gregset (char *regp, int regno)
+amd64_linux_fill_gregset (char *regp, int regno)
{
int i;
if (core_reg_size != 216)
warning ("Wrong size register set in core file.");
else
- x86_64_linux_supply_gregset (core_reg_sect);
+ amd64_linux_supply_gregset (core_reg_sect);
break;
case 2: /* Floating point registers. */
}
}
-static struct core_fns x86_64_core_fns =
+static struct core_fns amd64_core_fns =
{
bfd_target_elf_flavour, /* core_flavour */
default_check_format, /* check_format */
the routine. Otherwise, return 0. */
static CORE_ADDR
-x86_64_linux_sigtramp_start (CORE_ADDR pc)
+amd64_linux_sigtramp_start (CORE_ADDR pc)
{
unsigned char buf[LINUX_SIGTRAMP_LEN];
/* Return whether PC is in a GNU/Linux sigtramp routine. */
static int
-x86_64_linux_pc_in_sigtramp (CORE_ADDR pc, char *name)
+amd64_linux_pc_in_sigtramp (CORE_ADDR pc, char *name)
{
/* If we have NAME, we can optimize the search. The trampoline is
named __restore_rt. However, it isn't dynamically exported from
__sigaction, or __libc_sigaction (all aliases to the same
function). */
if (name == NULL || strstr (name, "sigaction") != NULL)
- return (x86_64_linux_sigtramp_start (pc) != 0);
+ return (amd64_linux_sigtramp_start (pc) != 0);
return (strcmp ("__restore_rt", name) == 0);
}
/* Offset to struct sigcontext in ucontext, from <asm/ucontext.h>. */
-#define X86_64_LINUX_UCONTEXT_SIGCONTEXT_OFFSET 40
+#define AMD64_LINUX_UCONTEXT_SIGCONTEXT_OFFSET 40
/* Assuming NEXT_FRAME is a frame following a GNU/Linux sigtramp
routine, return the address of the associated sigcontext structure. */
static CORE_ADDR
-x86_64_linux_sigcontext_addr (struct frame_info *next_frame)
+amd64_linux_sigcontext_addr (struct frame_info *next_frame)
{
CORE_ADDR sp;
char buf[8];
function calls so we can't use it. Fortunately the user context
is part of the signal frame and the unwound %rsp directly points
at it. */
- return sp + X86_64_LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
+ return sp + AMD64_LINUX_UCONTEXT_SIGCONTEXT_OFFSET;
}
\f
/* From <asm/sigcontext.h>. */
-static int x86_64_linux_sc_reg_offset[] =
+static int amd64_linux_sc_reg_offset[] =
{
13 * 8, /* %rax */
11 * 8, /* %rbx */
};
static void
-x86_64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+amd64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
x86_64_init_abi (info, gdbarch);
- set_gdbarch_pc_in_sigtramp (gdbarch, x86_64_linux_pc_in_sigtramp);
+ set_gdbarch_pc_in_sigtramp (gdbarch, amd64_linux_pc_in_sigtramp);
- tdep->sigcontext_addr = x86_64_linux_sigcontext_addr;
- tdep->sc_reg_offset = x86_64_linux_sc_reg_offset;
- tdep->sc_num_regs = ARRAY_SIZE (x86_64_linux_sc_reg_offset);
+ tdep->sigcontext_addr = amd64_linux_sigcontext_addr;
+ tdep->sc_reg_offset = amd64_linux_sc_reg_offset;
+ tdep->sc_num_regs = ARRAY_SIZE (amd64_linux_sc_reg_offset);
}
\f
/* Provide a prototype to silence -Wmissing-prototypes. */
-extern void _initialize_x86_64_linux_tdep (void);
+extern void _initialize_amd64_linux_tdep (void);
void
-_initialize_x86_64_linux_tdep (void)
+_initialize_amd64_linux_tdep (void)
{
- add_core_fns (&x86_64_core_fns);
+ add_core_fns (&amd64_core_fns);
- gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x86_64, GDB_OSABI_LINUX,
- x86_64_linux_init_abi);
+ gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x86_64,
+ GDB_OSABI_LINUX, amd64_linux_init_abi);
}
-/* Target-dependent code for the x86-64.
+/* Target-dependent definitions for GNU/Linux x86-64.
- Copyright 2003
- Free Software Foundation, Inc.
+ Copyright 2003, 2004 Free Software Foundation, Inc.
Contributed by Michal Ludvig, SuSE AG.
/* Fill GDB's register array with the general-purpose register values
in *GREGSETP. */
-void x86_64_linux_supply_gregset (char *regp);
+void amd64_linux_supply_gregset (char *regp);
/* Fill register REGNO (if it is a general-purpose register) in
*GREGSETPS with the value in GDB's register array. If REGNO is -1,
do this for all registers. */
-void x86_64_linux_fill_gregset (char *regp, int regno);
+void amd64_linux_fill_gregset (char *regp, int regno);
#endif /* x86-64-linux-tdep.h */