diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2007-06-18 18:58:13 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2007-06-18 18:58:13 +0000 |
commit | c916f5bcf3170deea88849294e0e0d7f78185db9 (patch) | |
tree | 0840632ba5a3548d9e12a37869b47f92ad5b18dd | |
parent | ffef93f2648d6500984bb27d323687a36a458bd2 (diff) | |
download | gdb-c916f5bcf3170deea88849294e0e0d7f78185db9.tar.gz |
* gdbarch.sh (deprecated_register_size): Remove.
* gdbarch.h, gdbarch.c: Regenerate.
* arm-tdep.c (arm_push_dummy_call): Replace DEPRECATED_REGISTER_SIZE
by INT_REGISTER_SIZE.
(thumb_get_next_pc, arm_return_in_memory): Likewise.
(arm_gdbarch_init): Do not call set_gdbarch_deprecated_register_size.
* ia64-tdep.c (ia64_gdbarch_init): Do not call
set_gdbarch_deprecated_register_size.
-rw-r--r-- | gdb/ChangeLog | 12 | ||||
-rw-r--r-- | gdb/arm-tdep.c | 18 | ||||
-rw-r--r-- | gdb/gdbarch.c | 26 | ||||
-rw-r--r-- | gdb/gdbarch.h | 11 | ||||
-rwxr-xr-x | gdb/gdbarch.sh | 2 | ||||
-rw-r--r-- | gdb/ia64-tdep.c | 3 |
6 files changed, 20 insertions, 52 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7852e617fc2..c7223881f0f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,15 @@ +2007-06-18 Ulrich Weigand <uweigand@de.ibm.com> + + * gdbarch.sh (deprecated_register_size): Remove. + * gdbarch.h, gdbarch.c: Regenerate. + + * arm-tdep.c (arm_push_dummy_call): Replace DEPRECATED_REGISTER_SIZE + by INT_REGISTER_SIZE. + (thumb_get_next_pc, arm_return_in_memory): Likewise. + (arm_gdbarch_init): Do not call set_gdbarch_deprecated_register_size. + * ia64-tdep.c (ia64_gdbarch_init): Do not call + set_gdbarch_deprecated_register_size. + 2007-06-18 Markus Deuling <deuling@de.ibm.com> * gdbarch.sh (DEPRECATED_FP_REGNUM): Replace by diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 4b7b429f41f..2f15050a01f 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -1282,7 +1282,7 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct value *function, registers and stack. */ while (len > 0) { - int partial_len = len < DEPRECATED_REGISTER_SIZE ? len : DEPRECATED_REGISTER_SIZE; + int partial_len = len < INT_REGISTER_SIZE ? len : INT_REGISTER_SIZE; if (argreg <= ARM_LAST_ARG_REGNUM) { @@ -1294,7 +1294,7 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct value *function, argnum, gdbarch_register_name (current_gdbarch, argreg), - phex (regval, DEPRECATED_REGISTER_SIZE)); + phex (regval, INT_REGISTER_SIZE)); regcache_cooked_write_unsigned (regcache, argreg, regval); argreg++; } @@ -1304,8 +1304,8 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct value *function, if (arm_debug) fprintf_unfiltered (gdb_stdlog, "arg %d @ sp + %d\n", argnum, nstack); - si = push_stack_item (si, val, DEPRECATED_REGISTER_SIZE); - nstack += DEPRECATED_REGISTER_SIZE; + si = push_stack_item (si, val, INT_REGISTER_SIZE); + nstack += INT_REGISTER_SIZE; } len -= partial_len; @@ -1622,7 +1622,7 @@ thumb_get_next_pc (struct frame_info *frame, CORE_ADDR pc) /* Fetch the saved PC from the stack. It's stored above all of the other registers. */ - offset = bitcount (bits (inst1, 0, 7)) * DEPRECATED_REGISTER_SIZE; + offset = bitcount (bits (inst1, 0, 7)) * INT_REGISTER_SIZE; sp = get_frame_register_unsigned (frame, ARM_SP_REGNUM); nextpc = (CORE_ADDR) read_memory_unsigned_integer (sp + offset, 4); nextpc = gdbarch_addr_bits_remove (current_gdbarch, nextpc); @@ -2138,7 +2138,7 @@ arm_return_in_memory (struct gdbarch *gdbarch, struct type *type) /* In the ARM ABI, "integer" like aggregate types are returned in registers. For an aggregate type to be integer like, its size - must be less than or equal to DEPRECATED_REGISTER_SIZE and the + must be less than or equal to INT_REGISTER_SIZE and the offset of each addressable subfield must be zero. Note that bit fields are not addressable, and all addressable subfields of unions always start at offset zero. @@ -2155,7 +2155,7 @@ arm_return_in_memory (struct gdbarch *gdbarch, struct type *type) /* All aggregate types that won't fit in a register must be returned in memory. */ - if (TYPE_LENGTH (type) > DEPRECATED_REGISTER_SIZE) + if (TYPE_LENGTH (type) > INT_REGISTER_SIZE) { return 1; } @@ -2182,7 +2182,7 @@ arm_return_in_memory (struct gdbarch *gdbarch, struct type *type) int i; /* Need to check if this struct/union is "integer" like. For this to be true, its size must be less than or equal to - DEPRECATED_REGISTER_SIZE and the offset of each addressable + INT_REGISTER_SIZE and the offset of each addressable subfield must be zero. Note that bit fields are not addressable, and unions always start at offset zero. If any of the subfields is a floating point type, the struct/union @@ -2968,8 +2968,6 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_dwarf2_reg_to_regnum (gdbarch, arm_dwarf_reg_to_regnum); set_gdbarch_register_sim_regno (gdbarch, arm_register_sim_regno); - /* Integer registers are 4 bytes. */ - set_gdbarch_deprecated_register_size (gdbarch, 4); set_gdbarch_register_name (gdbarch, arm_register_name); /* Returning results. */ diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 26421a476fb..d7cac695db7 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -166,7 +166,6 @@ struct gdbarch gdbarch_unwind_dummy_id_ftype *unwind_dummy_id; int deprecated_fp_regnum; gdbarch_push_dummy_call_ftype *push_dummy_call; - int deprecated_register_size; int call_dummy_location; gdbarch_push_dummy_code_ftype *push_dummy_code; gdbarch_print_registers_info_ftype *print_registers_info; @@ -288,7 +287,6 @@ struct gdbarch startup_gdbarch = 0, /* unwind_dummy_id */ -1, /* deprecated_fp_regnum */ 0, /* push_dummy_call */ - 0, /* deprecated_register_size */ 0, /* call_dummy_location */ 0, /* push_dummy_code */ default_print_registers_info, /* print_registers_info */ @@ -734,14 +732,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file) fprintf_unfiltered (file, "gdbarch_dump: deprecated_reg_struct_has_addr = <0x%lx>\n", (long) current_gdbarch->deprecated_reg_struct_has_addr); -#ifdef DEPRECATED_REGISTER_SIZE - fprintf_unfiltered (file, - "gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n", - XSTRING (DEPRECATED_REGISTER_SIZE)); -#endif - fprintf_unfiltered (file, - "gdbarch_dump: deprecated_register_size = %s\n", - paddr_d (current_gdbarch->deprecated_register_size)); fprintf_unfiltered (file, "gdbarch_dump: deprecated_use_struct_convention = <0x%lx>\n", (long) current_gdbarch->deprecated_use_struct_convention); @@ -1746,22 +1736,6 @@ set_gdbarch_push_dummy_call (struct gdbarch *gdbarch, } int -gdbarch_deprecated_register_size (struct gdbarch *gdbarch) -{ - gdb_assert (gdbarch != NULL); - if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_size called\n"); - return gdbarch->deprecated_register_size; -} - -void -set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch, - int deprecated_register_size) -{ - gdbarch->deprecated_register_size = deprecated_register_size; -} - -int gdbarch_call_dummy_location (struct gdbarch *gdbarch) { gdb_assert (gdbarch != NULL); diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 59a7bda6d80..19fb2b3497c 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -270,17 +270,6 @@ typedef CORE_ADDR (gdbarch_push_dummy_call_ftype) (struct gdbarch *gdbarch, stru extern CORE_ADDR gdbarch_push_dummy_call (struct gdbarch *gdbarch, struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr); extern void set_gdbarch_push_dummy_call (struct gdbarch *gdbarch, gdbarch_push_dummy_call_ftype *push_dummy_call); -/* DEPRECATED_REGISTER_SIZE can be deleted. */ - -extern int gdbarch_deprecated_register_size (struct gdbarch *gdbarch); -extern void set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch, int deprecated_register_size); -#if !defined (GDB_TM_FILE) && defined (DEPRECATED_REGISTER_SIZE) -#error "Non multi-arch definition of DEPRECATED_REGISTER_SIZE" -#endif -#if !defined (DEPRECATED_REGISTER_SIZE) -#define DEPRECATED_REGISTER_SIZE (gdbarch_deprecated_register_size (current_gdbarch)) -#endif - extern int gdbarch_call_dummy_location (struct gdbarch *gdbarch); extern void set_gdbarch_call_dummy_location (struct gdbarch *gdbarch, int call_dummy_location); diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 00326e6ca47..2d142807794 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -467,8 +467,6 @@ v::int:deprecated_fp_regnum:::-1:-1::0 # See gdbint.texinfo. See infcall.c. M::CORE_ADDR:push_dummy_call:struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr:function, regcache, bp_addr, nargs, args, sp, struct_return, struct_addr -# DEPRECATED_REGISTER_SIZE can be deleted. -v:=:int:deprecated_register_size v::int:call_dummy_location::::AT_ENTRY_POINT::0 M::CORE_ADDR:push_dummy_code:CORE_ADDR sp, CORE_ADDR funaddr, int using_gcc, struct value **args, int nargs, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr, struct regcache *regcache:sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr, regcache diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c index af4eff4064f..7453dc5f7db 100644 --- a/gdb/ia64-tdep.c +++ b/gdb/ia64-tdep.c @@ -3525,9 +3525,6 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_fp0_regnum (gdbarch, IA64_FR0_REGNUM); set_gdbarch_register_name (gdbarch, ia64_register_name); - /* FIXME: Following interface should not be needed, however, without it recurse.exp - gets a number of extra failures. */ - set_gdbarch_deprecated_register_size (gdbarch, 8); set_gdbarch_register_type (gdbarch, ia64_register_type); set_gdbarch_pseudo_register_read (gdbarch, ia64_pseudo_register_read); |