+2002-06-20 Michal Ludvig <mludvig@suse.cz>
+
+ * x86-64-tdep.c (x86_64_register_nr2name): Rename to
+ x86_64_register_name. Return type changed to 'const char *'.
+ (x86_64_register_name2nr): Rename to x86_64_register_number.
+ (x86_64_gdbarch_init): Update to reflect the change.
+ * x86-64-tdep.h: Ditto.
+ * x86-64-linux-nat.c (x86_64_fxsave_offset)
+ (supply_fpregset): Ditto.
+
2002-06-19 Andrew Cagney <cagney@redhat.com>
* regcache.h: Update copyright.
static void *
x86_64_fxsave_offset (elf_fpregset_t * fxsave, int regnum)
{
- char *reg_name;
+ const char *reg_name;
int reg_index;
gdb_assert (x86_64_num_gregs - 1 < regnum && regnum < x86_64_num_regs);
- reg_name = x86_64_register_nr2name (regnum);
+ reg_name = x86_64_register_name (regnum);
if (reg_name[0] == 's' && reg_name[1] == 't')
{
{
int i, reg_st0, reg_mxcsr;
- reg_st0 = x86_64_register_name2nr ("st0");
- reg_mxcsr = x86_64_register_name2nr ("mxcsr");
+ reg_st0 = x86_64_register_number ("st0");
+ reg_mxcsr = x86_64_register_number ("mxcsr");
gdb_assert (reg_st0 > 0 && reg_mxcsr > reg_st0);
}
\f
-char *
-x86_64_register_nr2name (int reg_nr)
+const char *
+x86_64_register_name (int reg_nr)
{
if (reg_nr < 0 || reg_nr >= X86_64_NUM_REGS)
return NULL;
}
int
-x86_64_register_name2nr (const char *name)
+x86_64_register_number (const char *name)
{
int reg_nr;
set_gdbarch_long_double_format (gdbarch, &floatformat_i387_ext);
set_gdbarch_num_regs (gdbarch, X86_64_NUM_REGS);
- set_gdbarch_register_name (gdbarch, x86_64_register_nr2name);
+ set_gdbarch_register_name (gdbarch, x86_64_register_name);
set_gdbarch_register_size (gdbarch, 8);
set_gdbarch_register_raw_size (gdbarch, x86_64_register_raw_size);
set_gdbarch_max_register_raw_size (gdbarch, 16);
extern int x86_64_num_regs;
extern int x86_64_num_gregs;
-int x86_64_register_name2nr (const char *name);
-char *x86_64_register_nr2name (int reg_nr);
+int x86_64_register_number (const char *name);
+const char *x86_64_register_name (int reg_nr);
+
gdbarch_frame_saved_pc_ftype x86_64_linux_frame_saved_pc;
gdbarch_saved_pc_after_call_ftype x86_64_linux_saved_pc_after_call;