From: Richard Henderson Date: Sun, 1 Jun 2003 18:44:13 +0000 (+0000) Subject: * alpha-nat.c (fetch_osf_core_registers): Use ALPHA_REGISTER_SIZE X-Git-Tag: ezannoni_pie-20030916-branchpoint~1480 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5ab8487279b4034ed8b1aa56cc36d25f5dbd5dd8;p=platform%2Fupstream%2Fbinutils.git * alpha-nat.c (fetch_osf_core_registers): Use ALPHA_REGISTER_SIZE instead of ALPHA_MAX_REGISTER_RAW_SIZE. (supply_gregset): Likewise. * alpha-tdep.c (alpha_store_return_value): Likewise. (alpha_get_longjmp_target): Likewise. (alpha_register_name): Constify array. (alpha_gdbarch_init): Remove deprecated_fp_regnum, deprecated_register_size, deprecated_register_bytes, deprecated_max_register_raw_size, deprecated_max_register_virtual_size. * alpha-tdep.h (ALPHA_MAX_REGISTER_RAW_SIZE): Remove. (ALPHA_MAX_REGISTER_VIRTUAL_SIZE): Remove. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3a795f6..279d981 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,19 @@ 2003-06-01 Richard Henderson + * alpha-nat.c (fetch_osf_core_registers): Use ALPHA_REGISTER_SIZE + instead of ALPHA_MAX_REGISTER_RAW_SIZE. + (supply_gregset): Likewise. + * alpha-tdep.c (alpha_store_return_value): Likewise. + (alpha_get_longjmp_target): Likewise. + (alpha_register_name): Constify array. + (alpha_gdbarch_init): Remove deprecated_fp_regnum, + deprecated_register_size, deprecated_register_bytes, + deprecated_max_register_raw_size, deprecated_max_register_virtual_size. + * alpha-tdep.h (ALPHA_MAX_REGISTER_RAW_SIZE): Remove. + (ALPHA_MAX_REGISTER_VIRTUAL_SIZE): Remove. + +2003-06-01 Richard Henderson + * alpha-tdep.c (alpha_push_dummy_call): Store sp. Tidy copies from arg_reg_buffer to regcache to avoid double conversion. diff --git a/gdb/alpha-nat.c b/gdb/alpha-nat.c index af0a336..7c272b3 100644 --- a/gdb/alpha-nat.c +++ b/gdb/alpha-nat.c @@ -94,8 +94,7 @@ fetch_osf_core_registers (char *core_reg_sect, unsigned core_reg_size, EF_PC, -1 #endif }; - static char zerobuf[ALPHA_MAX_REGISTER_RAW_SIZE] = - {0}; + static char zerobuf[ALPHA_REGISTER_SIZE] = {0}; for (regno = 0; regno < NUM_REGS; regno++) { @@ -202,8 +201,7 @@ supply_gregset (gdb_gregset_t *gregsetp) { register int regi; register long *regp = ALPHA_REGSET_BASE (gregsetp); - static char zerobuf[ALPHA_MAX_REGISTER_RAW_SIZE] = - {0}; + static char zerobuf[ALPHA_REGISTER_SIZE] = {0}; for (regi = 0; regi < 31; regi++) supply_register (regi, (char *) (regp + regi)); diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index a591d08..96ae120 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -47,7 +47,7 @@ static const char * alpha_register_name (int regno) { - static char *register_names[] = + static const char * const register_names[] = { "v0", "t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7", "s0", "s1", "s2", "s3", "s4", "s5", "fp", @@ -61,10 +61,10 @@ alpha_register_name (int regno) }; if (regno < 0) - return (NULL); + return NULL; if (regno >= (sizeof(register_names) / sizeof(*register_names))) - return (NULL); - return (register_names[regno]); + return NULL; + return register_names[regno]; } static int @@ -348,14 +348,14 @@ alpha_extract_return_value (struct type *valtype, static void alpha_store_return_value (struct type *valtype, char *valbuf) { - char raw_buffer[ALPHA_MAX_REGISTER_RAW_SIZE]; + char raw_buffer[ALPHA_REGISTER_SIZE]; int regnum = ALPHA_V0_REGNUM; int length = TYPE_LENGTH (valtype); if (TYPE_CODE (valtype) == TYPE_CODE_FLT) { regnum = FP0_REGNUM; - length = REGISTER_RAW_SIZE (regnum); + length = ALPHA_REGISTER_SIZE; alpha_register_convert_to_raw (valtype, regnum, valbuf, raw_buffer); } else @@ -510,7 +510,7 @@ alpha_get_longjmp_target (CORE_ADDR *pc) { struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); CORE_ADDR jb_addr; - char raw_buffer[ALPHA_MAX_REGISTER_RAW_SIZE]; + char raw_buffer[ALPHA_REGISTER_SIZE]; jb_addr = read_register (ALPHA_A0_REGNUM); @@ -1243,19 +1243,13 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Register info */ set_gdbarch_num_regs (gdbarch, ALPHA_NUM_REGS); set_gdbarch_sp_regnum (gdbarch, ALPHA_SP_REGNUM); - set_gdbarch_deprecated_fp_regnum (gdbarch, ALPHA_FP_REGNUM); set_gdbarch_pc_regnum (gdbarch, ALPHA_PC_REGNUM); set_gdbarch_fp0_regnum (gdbarch, ALPHA_FP0_REGNUM); set_gdbarch_register_name (gdbarch, alpha_register_name); - set_gdbarch_deprecated_register_size (gdbarch, ALPHA_REGISTER_SIZE); - set_gdbarch_deprecated_register_bytes (gdbarch, ALPHA_REGISTER_BYTES); set_gdbarch_register_byte (gdbarch, alpha_register_byte); set_gdbarch_register_raw_size (gdbarch, alpha_register_raw_size); - set_gdbarch_deprecated_max_register_raw_size (gdbarch, ALPHA_MAX_REGISTER_RAW_SIZE); set_gdbarch_register_virtual_size (gdbarch, alpha_register_virtual_size); - set_gdbarch_deprecated_max_register_virtual_size (gdbarch, - ALPHA_MAX_REGISTER_VIRTUAL_SIZE); set_gdbarch_register_virtual_type (gdbarch, alpha_register_virtual_type); set_gdbarch_cannot_fetch_register (gdbarch, alpha_cannot_fetch_register); diff --git a/gdb/alpha-tdep.h b/gdb/alpha-tdep.h index 5def15a..d7266be 100644 --- a/gdb/alpha-tdep.h +++ b/gdb/alpha-tdep.h @@ -34,12 +34,6 @@ register state. */ #define ALPHA_REGISTER_BYTES (ALPHA_NUM_REGS * 8) -/* Largest value REGISTER_RAW_SIZE can have. */ -#define ALPHA_MAX_REGISTER_RAW_SIZE 8 - -/* Largest value REGISTER_VIRTUAL_SIZE can have. */ -#define ALPHA_MAX_REGISTER_VIRTUAL_SIZE 8 - /* Register numbers of various important registers. Note that most of these values are "real" register numbers, and correspond to the general registers of the machine, and DEPRECATED_FP_REGNUM is a