diff -urN src/gdb/arm-tdep.c dev/gdb/arm-tdep.c --- src/gdb/arm-tdep.c 2007-06-18 05:36:40.000000000 +0200 +++ dev/gdb/arm-tdep.c 2007-06-18 10:06:09.000000000 +0200 @@ -1282,7 +1282,9 @@ registers and stack. */ while (len > 0) { - int partial_len = len < DEPRECATED_REGISTER_SIZE ? len : DEPRECATED_REGISTER_SIZE; + int partial_len + = len < gdbarch_deprecated_register_size (current_gdbarch) + ? len : gdbarch_deprecated_register_size (current_gdbarch); if (argreg <= ARM_LAST_ARG_REGNUM) { @@ -1294,7 +1296,9 @@ argnum, gdbarch_register_name (current_gdbarch, argreg), - phex (regval, DEPRECATED_REGISTER_SIZE)); + phex (regval, + gdbarch_deprecated_register_size + (current_gdbarch))); regcache_cooked_write_unsigned (regcache, argreg, regval); argreg++; } @@ -1304,8 +1308,10 @@ 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, + gdbarch_deprecated_register_size + (current_gdbarch)); + nstack += gdbarch_deprecated_register_size (current_gdbarch); } len -= partial_len; @@ -1622,7 +1628,8 @@ /* 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)) + * gdbarch_deprecated_register_size (current_gdbarch); 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 +2145,7 @@ /* 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 gdbarch_deprecated_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 +2162,7 @@ /* 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) > gdbarch_deprecated_register_size (current_gdbarch)) { return 1; } @@ -2182,7 +2189,7 @@ 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 + gdbarch_deprecated_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 diff -urN src/gdb/gdbarch.c dev/gdb/gdbarch.c --- src/gdb/gdbarch.c 2007-06-18 05:36:42.000000000 +0200 +++ dev/gdb/gdbarch.c 2007-06-18 10:02:08.000000000 +0200 @@ -777,11 +777,6 @@ 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)); diff -urN src/gdb/gdbarch.h dev/gdb/gdbarch.h --- src/gdb/gdbarch.h 2007-06-18 05:36:42.000000000 +0200 +++ dev/gdb/gdbarch.h 2007-06-18 10:01:58.000000000 +0200 @@ -300,16 +300,10 @@ 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. */ +/* 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 -urN src/gdb/gdbarch.sh dev/gdb/gdbarch.sh --- src/gdb/gdbarch.sh 2007-06-18 05:36:42.000000000 +0200 +++ dev/gdb/gdbarch.sh 2007-06-18 10:01:53.000000000 +0200 @@ -467,8 +467,8 @@ # 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 +# 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