From 1cf877ad9b542d1f91bfb60ebe7fe5d303641d20 Mon Sep 17 00:00:00 2001 From: Michal Ludvig Date: Thu, 20 Jun 2002 13:08:12 +0000 Subject: [PATCH] 2002-06-20 Michal Ludvig * 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. --- gdb/ChangeLog | 10 ++++++++++ gdb/x86-64-linux-nat.c | 8 ++++---- gdb/x86-64-tdep.c | 8 ++++---- gdb/x86-64-tdep.h | 5 +++-- 4 files changed, 21 insertions(+), 10 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index dc86a43cb17..9091d537654 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,13 @@ +2002-06-20 Michal Ludvig + + * 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 * regcache.h: Update copyright. diff --git a/gdb/x86-64-linux-nat.c b/gdb/x86-64-linux-nat.c index 4c4f64382c4..7749b415114 100644 --- a/gdb/x86-64-linux-nat.c +++ b/gdb/x86-64-linux-nat.c @@ -197,12 +197,12 @@ store_regs (int tid, int regno) 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') { @@ -231,8 +231,8 @@ supply_fpregset (elf_fpregset_t * fxsave) { 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); diff --git a/gdb/x86-64-tdep.c b/gdb/x86-64-tdep.c index 111861aaafe..5b6d2cd8161 100644 --- a/gdb/x86-64-tdep.c +++ b/gdb/x86-64-tdep.c @@ -798,8 +798,8 @@ x86_64_store_return_value (struct type *type, char *valbuf) } -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; @@ -807,7 +807,7 @@ x86_64_register_nr2name (int reg_nr) } int -x86_64_register_name2nr (const char *name) +x86_64_register_number (const char *name) { int reg_nr; @@ -989,7 +989,7 @@ x86_64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) 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); diff --git a/gdb/x86-64-tdep.h b/gdb/x86-64-tdep.h index dda94bc5eb8..711486077fb 100644 --- a/gdb/x86-64-tdep.h +++ b/gdb/x86-64-tdep.h @@ -28,8 +28,9 @@ 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; -- 2.30.2