diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-05-05 17:56:57 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-05-05 17:56:57 +0000 |
commit | b1e29e332aca04fd8b4b795d1c2ee1eb8fa7ba42 (patch) | |
tree | 4833fc30d54f0ce4fe0d97b777feacbbd0048cbe | |
parent | 4e795f50c1c5f7e59a8ab1f127bc5267d81600f1 (diff) | |
download | binutils-gdb-b1e29e332aca04fd8b4b795d1c2ee1eb8fa7ba42.tar.gz |
2003-05-03 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (DEPRECATED_REGISTER_SIZE): Rename REGISTER_SIZE.
(DEPRECATED_SIZEOF_CALL_DUMMY_WORDS): Rename
SIZEOF_CALL_DUMMY_WORDS.
(DEPRECATED_CALL_DUMMY_WORDS): Rename CALL_DUMMY_WORDS.
(DEPRECATED_FIX_CALL_DUMMY): Rename FIX_CALL_DUMMY.
(DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET): Rename
CALL_DUMMY_BREAKPOINT_OFFSET.
(DEPRECATED_CALL_DUMMY_START_OFFSET): Rename
CALL_DUMMY_START_OFFSET.
(DEPRECATED_CALL_DUMMY_LENGTH): Rename CALL_DUMMY_LENGTH.
* gdbarch.h, gdbarch.c: Re-generate.
* alpha-tdep.c, alphafbsd-tdep.c, arm-linux-tdep.c: Update.
* arm-tdep.c, avr-tdep.c, breakpoint.c, cris-tdep.c: Update.
* dummy-frame.c, dummy-frame.h, frv-tdep.c, gdbarch.c: Update.
* gdbarch.h, gdbarch.sh, h8300-tdep.c, hppa-tdep.c: Update.
* i386-tdep.c, ia64-tdep.c, infcall.c, inferior.h: Update.
* m68hc11-tdep.c, m68k-tdep.c, mcore-tdep.c: Update.
* mips-tdep.c, mn10300-tdep.c, ns32k-tdep.c: Update.
* rs6000-tdep.c, s390-tdep.c, sh-tdep.c, sol-thread.c: Update.
* sparc-tdep.c, target.c, v850-tdep.c, valops.c: Update.
* vax-tdep.c, x86-64-tdep.c, xstormy16-tdep.c: Update.
* config/ia64/tm-ia64.h, config/m68k/tm-vx68.h: Update.
* config/mips/tm-mips.h, config/pa/nm-hppah.h: Update.
* config/pa/tm-hppa.h, config/pa/tm-hppa64.h: Update.
* config/s390/tm-s390.h, config/sparc/tm-sp64.h: Update.
* config/sparc/tm-sparc.h: Update.
Index: doc/ChangeLog
2003-05-03 Andrew Cagney <cagney@redhat.com>
* gdbint.texinfo (Target Architecture Definition): Make
CALL_DUMMY_WORDS, SIZEOF_CALL_DUMMY_WORDS, CALL_DUMMY_LENGTH,
FIX_CALL_DUMMY, CALL_DUMMY_BREAKPOINT_OFFSET and
CALL_DUMMY_BREAKPOINT_OFFSET deprecated.
Index: mi/ChangeLog
2003-05-03 Andrew Cagney <cagney@redhat.com>
* mi-main.c (mi_cmd_data_write_register_values): Replace
REGISTER_SIZE with DEPRECATED_REGISTER_SIZE.
Index: testsuite/ChangeLog
2003-05-03 Andrew Cagney <cagney@redhat.com>
* gdb.base/watchpoint.exp: Rename CALL_DUMMY_BREAKPOINT_OFFSET to
DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET in comments.
52 files changed, 627 insertions, 573 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 60157253af2..cf8b1a02031 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,32 @@ +2003-05-05 Andrew Cagney <cagney@redhat.com> + + * gdbarch.sh (DEPRECATED_REGISTER_SIZE): Rename REGISTER_SIZE. + (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS): Rename + SIZEOF_CALL_DUMMY_WORDS. + (DEPRECATED_CALL_DUMMY_WORDS): Rename CALL_DUMMY_WORDS. + (DEPRECATED_FIX_CALL_DUMMY): Rename FIX_CALL_DUMMY. + (DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET): Rename + CALL_DUMMY_BREAKPOINT_OFFSET. + (DEPRECATED_CALL_DUMMY_START_OFFSET): Rename + CALL_DUMMY_START_OFFSET. + (DEPRECATED_CALL_DUMMY_LENGTH): Rename CALL_DUMMY_LENGTH. + * gdbarch.h, gdbarch.c: Re-generate. + * alpha-tdep.c, alphafbsd-tdep.c, arm-linux-tdep.c: Update. + * arm-tdep.c, avr-tdep.c, breakpoint.c, cris-tdep.c: Update. + * dummy-frame.c, dummy-frame.h, frv-tdep.c, gdbarch.c: Update. + * gdbarch.h, gdbarch.sh, h8300-tdep.c, hppa-tdep.c: Update. + * i386-tdep.c, ia64-tdep.c, infcall.c, inferior.h: Update. + * m68hc11-tdep.c, m68k-tdep.c, mcore-tdep.c: Update. + * mips-tdep.c, mn10300-tdep.c, ns32k-tdep.c: Update. + * rs6000-tdep.c, s390-tdep.c, sh-tdep.c, sol-thread.c: Update. + * sparc-tdep.c, target.c, v850-tdep.c, valops.c: Update. + * vax-tdep.c, x86-64-tdep.c, xstormy16-tdep.c: Update. + * config/ia64/tm-ia64.h, config/m68k/tm-vx68.h: Update. + * config/mips/tm-mips.h, config/pa/nm-hppah.h: Update. + * config/pa/tm-hppa.h, config/pa/tm-hppa64.h: Update. + * config/s390/tm-s390.h, config/sparc/tm-sp64.h: Update. + * config/sparc/tm-sparc.h: Update. + 2003-05-04 Andrew Cagney <cagney@redhat.com> * gdbthread.h (save_infrun_state): Drop prev_func_name parameter. diff --git a/gdb/alpha-tdep.c b/gdb/alpha-tdep.c index 067fc91fd63..c1648b48b48 100644 --- a/gdb/alpha-tdep.c +++ b/gdb/alpha-tdep.c @@ -66,8 +66,6 @@ static gdbarch_frame_locals_address_ftype alpha_frame_locals_address; static gdbarch_skip_prologue_ftype alpha_skip_prologue; -static gdbarch_fix_call_dummy_ftype alpha_fix_call_dummy; - static gdbarch_get_longjmp_target_ftype alpha_get_longjmp_target; struct frame_extra_info @@ -1811,7 +1809,7 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_fp0_regnum (gdbarch, ALPHA_FP0_REGNUM); set_gdbarch_register_name (gdbarch, alpha_register_name); - set_gdbarch_register_size (gdbarch, ALPHA_REGISTER_SIZE); + set_gdbarch_deprecated_register_size (gdbarch, ALPHA_REGISTER_SIZE); set_gdbarch_register_bytes (gdbarch, ALPHA_REGISTER_BYTES); set_gdbarch_register_byte (gdbarch, alpha_register_byte); set_gdbarch_register_raw_size (gdbarch, alpha_register_raw_size); @@ -1859,8 +1857,8 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) stopping the user call is achieved via a bp_call_dummy breakpoint. But we need a fake CALL_DUMMY definition to enable the proper call_function_by_hand and to avoid zero length array warnings. */ - set_gdbarch_call_dummy_words (gdbarch, alpha_call_dummy_words); - set_gdbarch_sizeof_call_dummy_words (gdbarch, 0); + set_gdbarch_deprecated_call_dummy_words (gdbarch, alpha_call_dummy_words); + set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, 0); set_gdbarch_frame_args_address (gdbarch, alpha_frame_args_address); set_gdbarch_frame_locals_address (gdbarch, alpha_frame_locals_address); set_gdbarch_deprecated_init_extra_frame_info (gdbarch, alpha_init_extra_frame_info); @@ -1873,7 +1871,7 @@ alpha_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_deprecated_push_dummy_frame (gdbarch, alpha_push_dummy_frame); /* Should be using push_dummy_call. */ set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp); - set_gdbarch_fix_call_dummy (gdbarch, alpha_fix_call_dummy); + set_gdbarch_deprecated_fix_call_dummy (gdbarch, alpha_fix_call_dummy); set_gdbarch_deprecated_init_frame_pc (gdbarch, init_frame_pc_noop); set_gdbarch_deprecated_init_frame_pc_first (gdbarch, alpha_init_frame_pc_first); diff --git a/gdb/alphafbsd-tdep.c b/gdb/alphafbsd-tdep.c index 6b1b068d9cf..3d8eafb2927 100644 --- a/gdb/alphafbsd-tdep.c +++ b/gdb/alphafbsd-tdep.c @@ -32,7 +32,7 @@ alphafbsd_use_struct_convention (int gcc_p, struct type *type) /* All aggregate types that won't fit in a register must be returned in memory. */ - if (TYPE_LENGTH (type) > REGISTER_SIZE) + if (TYPE_LENGTH (type) > DEPRECATED_REGISTER_SIZE) return 1; /* The only aggregate types that can be returned in a register are diff --git a/gdb/arm-linux-tdep.c b/gdb/arm-linux-tdep.c index 91fa88fe0ad..60c8ae492a9 100644 --- a/gdb/arm-linux-tdep.c +++ b/gdb/arm-linux-tdep.c @@ -46,7 +46,7 @@ static const char arm_linux_arm_le_breakpoint[] = {0x01,0x00,0x9f,0xef}; -/* CALL_DUMMY_WORDS: +/* DEPRECATED_CALL_DUMMY_WORDS: This sequence of words is the instructions mov lr, pc @@ -115,10 +115,10 @@ arm_linux_push_arguments (int nargs, struct value **args, CORE_ADDR sp, /* Walk through the list of args and determine how large a temporary stack is required. Need to take care here as structs may be passed on the stack, and we have to to push them. */ - nstack_size = -4 * REGISTER_SIZE; /* Some arguments go into A1-A4. */ + nstack_size = -4 * DEPRECATED_REGISTER_SIZE; /* Some arguments go into A1-A4. */ if (struct_return) /* The struct address goes in A1. */ - nstack_size += REGISTER_SIZE; + nstack_size += DEPRECATED_REGISTER_SIZE; /* Walk through the arguments and add their size to nstack_size. */ for (argnum = 0; argnum < nargs; argnum++) @@ -131,7 +131,7 @@ arm_linux_push_arguments (int nargs, struct value **args, CORE_ADDR sp, /* ANSI C code passes float arguments as integers, K&R code passes float arguments as doubles. Correct for this here. */ - if (TYPE_CODE_FLT == TYPE_CODE (arg_type) && REGISTER_SIZE == len) + if (TYPE_CODE_FLT == TYPE_CODE (arg_type) && DEPRECATED_REGISTER_SIZE == len) nstack_size += FP_REGISTER_VIRTUAL_SIZE; else nstack_size += len; @@ -178,7 +178,7 @@ arm_linux_push_arguments (int nargs, struct value **args, CORE_ADDR sp, .stabs records the type as FP_FLOAT. In this latter case the compiler converts the float arguments to double before calling the function. */ - if (TYPE_CODE_FLT == typecode && REGISTER_SIZE == len) + if (TYPE_CODE_FLT == typecode && DEPRECATED_REGISTER_SIZE == len) { DOUBLEST dblval; dblval = deprecated_extract_floating (val, len); @@ -203,7 +203,7 @@ arm_linux_push_arguments (int nargs, struct value **args, CORE_ADDR sp, registers and stack. */ while (len > 0) { - int partial_len = len < REGISTER_SIZE ? len : REGISTER_SIZE; + int partial_len = len < DEPRECATED_REGISTER_SIZE ? len : DEPRECATED_REGISTER_SIZE; if (argreg <= ARM_LAST_ARG_REGNUM) { @@ -214,8 +214,8 @@ arm_linux_push_arguments (int nargs, struct value **args, CORE_ADDR sp, else { /* Push the arguments onto the stack. */ - write_memory ((CORE_ADDR) fp, val, REGISTER_SIZE); - fp += REGISTER_SIZE; + write_memory ((CORE_ADDR) fp, val, DEPRECATED_REGISTER_SIZE); + fp += DEPRECATED_REGISTER_SIZE; } len -= partial_len; @@ -530,9 +530,8 @@ arm_linux_init_abi (struct gdbarch_info info, tdep->jb_pc = ARM_LINUX_JB_PC; tdep->jb_elt_size = ARM_LINUX_JB_ELEMENT_SIZE; - set_gdbarch_call_dummy_words (gdbarch, arm_linux_call_dummy_words); - set_gdbarch_sizeof_call_dummy_words (gdbarch, - sizeof (arm_linux_call_dummy_words)); + set_gdbarch_deprecated_call_dummy_words (gdbarch, arm_linux_call_dummy_words); + set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof (arm_linux_call_dummy_words)); /* The following two overrides shouldn't be needed. */ set_gdbarch_deprecated_extract_return_value (gdbarch, arm_linux_extract_return_value); diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index ee07a36282c..d2e3ef598a0 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -1237,7 +1237,7 @@ arm_push_dummy_frame (void) write_register (ARM_SP_REGNUM, sp); } -/* CALL_DUMMY_WORDS: +/* DEPRECATED_CALL_DUMMY_WORDS: This sequence of words is the instructions mov lr,pc @@ -1265,9 +1265,9 @@ static void arm_set_call_dummy_breakpoint_offset (void) { if (caller_is_thumb) - set_gdbarch_call_dummy_breakpoint_offset (current_gdbarch, 4); + set_gdbarch_deprecated_call_dummy_breakpoint_offset (current_gdbarch, 4); else - set_gdbarch_call_dummy_breakpoint_offset (current_gdbarch, 8); + set_gdbarch_deprecated_call_dummy_breakpoint_offset (current_gdbarch, 8); } /* Fix up the call dummy, based on whether the processor is currently @@ -1430,7 +1430,7 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache, /* Some platforms require a double-word aligned stack. Make sure sp is correctly aligned before we start. We always do this even if it isn't really needed -- it can never hurt things. */ - sp &= ~(CORE_ADDR)(2 * REGISTER_SIZE - 1); + sp &= ~(CORE_ADDR)(2 * DEPRECATED_REGISTER_SIZE - 1); /* The struct_return pointer occupies the first parameter passing register. */ @@ -1477,7 +1477,7 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache, registers and stack. */ while (len > 0) { - int partial_len = len < REGISTER_SIZE ? len : REGISTER_SIZE; + int partial_len = len < DEPRECATED_REGISTER_SIZE ? len : DEPRECATED_REGISTER_SIZE; if (argreg <= ARM_LAST_ARG_REGNUM) { @@ -1487,7 +1487,7 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache, if (arm_debug) fprintf_unfiltered (gdb_stdlog, "arg %d in %s = 0x%s\n", argnum, REGISTER_NAME (argreg), - phex (regval, REGISTER_SIZE)); + phex (regval, DEPRECATED_REGISTER_SIZE)); regcache_cooked_write_unsigned (regcache, argreg, regval); argreg++; } @@ -1497,8 +1497,8 @@ arm_push_dummy_call (struct gdbarch *gdbarch, struct regcache *regcache, if (arm_debug) fprintf_unfiltered (gdb_stdlog, "arg %d @ sp + %d\n", argnum, nstack); - si = push_stack_item (si, val, REGISTER_SIZE); - nstack += REGISTER_SIZE; + si = push_stack_item (si, val, DEPRECATED_REGISTER_SIZE); + nstack += DEPRECATED_REGISTER_SIZE; } len -= partial_len; @@ -1799,7 +1799,7 @@ thumb_get_next_pc (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)) * REGISTER_SIZE; + offset = bitcount (bits (inst1, 0, 7)) * DEPRECATED_REGISTER_SIZE; sp = read_register (ARM_SP_REGNUM); nextpc = (CORE_ADDR) read_memory_integer (sp + offset, 4); nextpc = ADDR_BITS_REMOVE (nextpc); @@ -2309,10 +2309,10 @@ arm_use_struct_convention (int gcc_p, 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 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. + must be less than or equal to 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. This function is based on the behaviour of GCC 2.95.1. See: gcc/arm.c: arm_return_in_memory() for details. @@ -2326,7 +2326,7 @@ arm_use_struct_convention (int gcc_p, struct type *type) /* All aggregate types that won't fit in a register must be returned in memory. */ - if (TYPE_LENGTH (type) > REGISTER_SIZE) + if (TYPE_LENGTH (type) > DEPRECATED_REGISTER_SIZE) { return 1; } @@ -2348,11 +2348,11 @@ arm_use_struct_convention (int gcc_p, 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 - 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 cannot be an - integer type. */ + 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 + cannot be an integer type. */ /* For each field in the object, check: 1) Is it FP? --> yes, nRc = 1; @@ -2930,8 +2930,8 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) tdep->lowest_pc = 0x20; tdep->jb_pc = -1; /* Longjump support not enabled by default. */ - set_gdbarch_call_dummy_words (gdbarch, arm_call_dummy_words); - set_gdbarch_sizeof_call_dummy_words (gdbarch, 0); + set_gdbarch_deprecated_call_dummy_words (gdbarch, arm_call_dummy_words); + set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, 0); set_gdbarch_push_dummy_call (gdbarch, arm_push_dummy_call); @@ -2991,7 +2991,7 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_register_sim_regno (gdbarch, arm_register_sim_regno); /* Integer registers are 4 bytes. */ - set_gdbarch_register_size (gdbarch, 4); + set_gdbarch_deprecated_register_size (gdbarch, 4); set_gdbarch_register_name (gdbarch, arm_register_name); /* Returning results. */ diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c index 314c0a11977..33e0ce237ca 100644 --- a/gdb/avr-tdep.c +++ b/gdb/avr-tdep.c @@ -1156,7 +1156,7 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_pc_regnum (gdbarch, AVR_PC_REGNUM); set_gdbarch_register_name (gdbarch, avr_register_name); - set_gdbarch_register_size (gdbarch, 1); + set_gdbarch_deprecated_register_size (gdbarch, 1); set_gdbarch_register_bytes (gdbarch, AVR_NUM_REG_BYTES); set_gdbarch_register_byte (gdbarch, avr_register_byte); set_gdbarch_register_raw_size (gdbarch, avr_register_raw_size); @@ -1168,7 +1168,7 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_print_insn (gdbarch, print_insn_avr); set_gdbarch_call_dummy_address (gdbarch, avr_call_dummy_address); - set_gdbarch_call_dummy_words (gdbarch, avr_call_dummy_words); + set_gdbarch_deprecated_call_dummy_words (gdbarch, avr_call_dummy_words); /* set_gdbarch_believe_pcc_promotion (gdbarch, 1); // TRoth: should this be set? */ diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index f6736a4cb74..66b319e842b 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -1697,7 +1697,7 @@ deprecated_frame_in_dummy (struct frame_info *frame) for signals.exp in the testsuite. */ && (get_frame_pc (frame) >= (b->address - - SIZEOF_CALL_DUMMY_WORDS / sizeof (LONGEST) * REGISTER_SIZE)) + - DEPRECATED_SIZEOF_CALL_DUMMY_WORDS / sizeof (LONGEST) * DEPRECATED_REGISTER_SIZE)) && get_frame_pc (frame) <= b->address) return 1; } @@ -5464,7 +5464,7 @@ watch_command_1 (char *arg, int accessflag, int from_tty) #if !defined(TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT) #define TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT(BYTE_SIZE) \ - ((BYTE_SIZE) <= (REGISTER_SIZE)) + ((BYTE_SIZE) <= (DEPRECATED_REGISTER_SIZE)) #endif #if !defined(TARGET_REGION_OK_FOR_HW_WATCHPOINT) diff --git a/gdb/config/ia64/tm-ia64.h b/gdb/config/ia64/tm-ia64.h index dc36127e3cd..feeef09bb0c 100644 --- a/gdb/config/ia64/tm-ia64.h +++ b/gdb/config/ia64/tm-ia64.h @@ -31,7 +31,7 @@ used in push_word and a few other places; REGISTER_RAW_SIZE is the real way to know how big a register is. */ -#define REGISTER_SIZE 8 +#define DEPRECATED_REGISTER_SIZE 8 #undef NUM_REGS #define NUM_REGS 590 diff --git a/gdb/config/m68k/tm-vx68.h b/gdb/config/m68k/tm-vx68.h index f7e8fca6f2b..271eb7ef70e 100644 --- a/gdb/config/m68k/tm-vx68.h +++ b/gdb/config/m68k/tm-vx68.h @@ -79,4 +79,4 @@ /* Number of registers in a ptrace_getfpregs call. */ #define VX_SIZE_FPREGS (8 * REGISTER_RAW_SIZE (FP0_REGNUM) \ - + (3 * REGISTER_SIZE)) + + (3 * DEPRECATED_REGISTER_SIZE)) diff --git a/gdb/config/mips/tm-mips.h b/gdb/config/mips/tm-mips.h index dada6155713..f9aebbe1f5a 100644 --- a/gdb/config/mips/tm-mips.h +++ b/gdb/config/mips/tm-mips.h @@ -49,10 +49,10 @@ extern int mips_step_skips_delay (CORE_ADDR); used in push_word and a few other places; REGISTER_RAW_SIZE is the real way to know how big a register is. */ -#define REGISTER_SIZE 4 +#define DEPRECATED_REGISTER_SIZE 4 /* The size of a register. This is predefined in tm-mips64.h. We - can't use REGISTER_SIZE because that is used for various other + can't use DEPRECATED_REGISTER_SIZE because that is used for various other things. */ #ifndef MIPS_REGSIZE diff --git a/gdb/config/pa/nm-hppah.h b/gdb/config/pa/nm-hppah.h index 2cc1e300365..f8a2a117fa2 100644 --- a/gdb/config/pa/nm-hppah.h +++ b/gdb/config/pa/nm-hppah.h @@ -121,9 +121,10 @@ extern int hppa_can_use_hw_watchpoint (int type, int cnt, int ot); #define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) \ hppa_can_use_hw_watchpoint(type, cnt, ot) -/* The PA can also watch memory regions of arbitrary size, since we're using - a page-protection scheme. (On some targets, apparently watch registers - are used, which can only accomodate regions of REGISTER_SIZE.) */ +/* The PA can also watch memory regions of arbitrary size, since we're + using a page-protection scheme. (On some targets, apparently watch + registers are used, which can only accomodate regions of + DEPRECATED_REGISTER_SIZE.) */ #define TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT(byte_count) \ (1) diff --git a/gdb/config/pa/tm-hppa.h b/gdb/config/pa/tm-hppa.h index 8646ab0dab3..7daa6f5eadf 100644 --- a/gdb/config/pa/tm-hppa.h +++ b/gdb/config/pa/tm-hppa.h @@ -274,20 +274,20 @@ extern void hppa_frame_init_saved_regs (struct frame_info *); (DEPRECATED_PC_IN_CALL_DUMMY((pc), (sp), (frame_address)) && \ (read_memory_integer((pc), 4) == BREAKPOINT32)) -/* - * Insert the specified number of args and function address - * into a call sequence of the above form stored at DUMMYNAME. - * - * On the hppa we need to call the stack dummy through $$dyncall. - * Therefore our version of FIX_CALL_DUMMY takes an extra argument, - * real_pc, which is the location where gdb should start up the - * inferior to do the function call. - */ +/* Insert the specified number of args and function address into a + call sequence of the above form stored at DUMMYNAME. + + On the hppa we need to call the stack dummy through $$dyncall. + Therefore our version of DEPRECATED_FIX_CALL_DUMMY takes an extra + argument, real_pc, which is the location where gdb should start up + the inferior to do the function call. */ /* FIXME: brobecker 2002-12-26. This macro is going to cause us some - problems before we can go to multiarch partial as it has been diverted - on HPUX to return the value of the PC! */ -#define FIX_CALL_DUMMY hppa_fix_call_dummy + problems before we can go to multiarch partial as it has been + diverted on HPUX to return the value of the PC! */ +/* NOTE: cagney/2003-05-03: This has been replaced by push_dummy_code. + Hopefully that has all the parameters HP/UX needs. */ +#define DEPRECATED_FIX_CALL_DUMMY hppa_fix_call_dummy extern CORE_ADDR hppa_fix_call_dummy (char *, CORE_ADDR, CORE_ADDR, int, struct value **, struct type *, int); diff --git a/gdb/config/pa/tm-hppa64.h b/gdb/config/pa/tm-hppa64.h index 17f40aab37d..81bf7caeb08 100644 --- a/gdb/config/pa/tm-hppa64.h +++ b/gdb/config/pa/tm-hppa64.h @@ -109,7 +109,7 @@ extern CORE_ADDR hppa_stack_align (CORE_ADDR sp); real way to know how big a register is. */ #if !GDB_MULTI_ARCH -#define REGISTER_SIZE 4 +#define DEPRECATED_REGISTER_SIZE 4 #endif /* Number of machine registers */ @@ -308,11 +308,11 @@ extern void hppa_pop_frame (void); #endif #if !GDB_MULTI_ARCH -#define CALL_DUMMY_LENGTH (INSTRUCTION_SIZE * 28) +#define DEPRECATED_CALL_DUMMY_LENGTH (INSTRUCTION_SIZE * 28) #endif #if !GDB_MULTI_ARCH -#define CALL_DUMMY_START_OFFSET 0 +#define DEPRECATED_CALL_DUMMY_START_OFFSET 0 #endif #if !GDB_MULTI_ARCH @@ -357,8 +357,8 @@ extern CORE_ADDR hppa_target_read_fp (void); push_word and a few other places, but REGISTER_RAW_SIZE is the real way to know how big a register is. */ -#undef REGISTER_SIZE -#define REGISTER_SIZE 8 +#undef DEPRECATED_REGISTER_SIZE +#define DEPRECATED_REGISTER_SIZE 8 /* Number of bytes of storage in the actual machine representation for register N. On the PA-RISC 2.0, all regs are 8 bytes, including @@ -501,14 +501,14 @@ call_dummy 0xe820f0000fb110d3LL, 0x0001000400151820LL,\ 0xe6c0000008000240LL} -#define CALL_DUMMY_BREAKPOINT_OFFSET 22 * 4 +#define DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET 22 * 4 -/* CALL_DUMMY_LENGTH is computed based on the size of a word on the target - machine, not the size of an instruction. Since a word on this target - holds two instructions we have to divide the instruction size by two to - get the word size of the dummy. */ -#undef CALL_DUMMY_LENGTH -#define CALL_DUMMY_LENGTH (INSTRUCTION_SIZE * 26 / 2) +/* DEPRECATED_CALL_DUMMY_LENGTH is computed based on the size of a + word on the target machine, not the size of an instruction. Since + a word on this target holds two instructions we have to divide the + instruction size by two to get the word size of the dummy. */ +#undef DEPRECATED_CALL_DUMMY_LENGTH +#define DEPRECATED_CALL_DUMMY_LENGTH (INSTRUCTION_SIZE * 26 / 2) /* The PA64 ABI mandates a 16 byte stack alignment. */ #undef STACK_ALIGN @@ -540,12 +540,12 @@ call_dummy if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \ memcpy ((VALBUF), \ ((char *)(REGBUF)) + REGISTER_BYTE (FP4_REGNUM) + \ - (REGISTER_SIZE - TYPE_LENGTH (TYPE)), \ + (DEPRECATED_REGISTER_SIZE - TYPE_LENGTH (TYPE)), \ TYPE_LENGTH (TYPE)); \ else if (is_integral_type(TYPE)) \ memcpy ((VALBUF), \ (char *)(REGBUF) + REGISTER_BYTE (28) + \ - (REGISTER_SIZE - TYPE_LENGTH (TYPE)), \ + (DEPRECATED_REGISTER_SIZE - TYPE_LENGTH (TYPE)), \ TYPE_LENGTH (TYPE)); \ else if (TYPE_LENGTH (TYPE) <= 8) \ memcpy ((VALBUF), \ @@ -574,13 +574,13 @@ call_dummy if (TYPE_CODE (TYPE) == TYPE_CODE_FLT) \ deprecated_write_register_bytes \ (REGISTER_BYTE (FP4_REGNUM) + \ - (REGISTER_SIZE - TYPE_LENGTH (TYPE)), \ + (DEPRECATED_REGISTER_SIZE - TYPE_LENGTH (TYPE)), \ (VALBUF), \ TYPE_LENGTH (TYPE)); \ else if (is_integral_type(TYPE)) \ deprecated_write_register_bytes \ (REGISTER_BYTE (28) + \ - (REGISTER_SIZE - TYPE_LENGTH (TYPE)), \ + (DEPRECATED_REGISTER_SIZE - TYPE_LENGTH (TYPE)), \ (VALBUF), \ TYPE_LENGTH (TYPE)); \ else if (TYPE_LENGTH (TYPE) <= 8) \ diff --git a/gdb/config/s390/tm-s390.h b/gdb/config/s390/tm-s390.h index 2bb4c2d2c30..37bf770e94f 100644 --- a/gdb/config/s390/tm-s390.h +++ b/gdb/config/s390/tm-s390.h @@ -24,15 +24,15 @@ #define TM_S390_H 1 #define S390_NUM_GPRS (16) -#define S390_GPR_SIZE REGISTER_SIZE -#define S390_PSW_MASK_SIZE REGISTER_SIZE -#define S390_PSW_ADDR_SIZE REGISTER_SIZE +#define S390_GPR_SIZE DEPRECATED_REGISTER_SIZE +#define S390_PSW_MASK_SIZE DEPRECATED_REGISTER_SIZE +#define S390_PSW_ADDR_SIZE DEPRECATED_REGISTER_SIZE #define S390_NUM_FPRS (16) #define S390_FPR_SIZE (8) #define S390_FPC_SIZE (4) #define S390_FPC_PAD_SIZE (4) /* gcc insists on aligning the fpregs */ #define S390_NUM_CRS (16) -#define S390_CR_SIZE REGISTER_SIZE +#define S390_CR_SIZE DEPRECATED_REGISTER_SIZE #define S390_NUM_ACRS (16) #define S390_ACR_SIZE (4) @@ -94,7 +94,7 @@ int s390_cannot_fetch_register (int regno); int s390x_register_raw_size (int reg_nr); #define REGISTER_RAW_SIZE(reg_nr) s390x_register_raw_size(reg_nr) #define GDB_TARGET_IS_ESAME (1) -#define REGISTER_SIZE (8) +#define DEPRECATED_REGISTER_SIZE (8) #define REGISTER_BYTES S390X_REGISTER_BYTES #else /* CONFIG_ARCH_S390X */ @@ -102,7 +102,7 @@ int s390x_register_raw_size (int reg_nr); int s390_register_raw_size (int reg_nr); #define REGISTER_RAW_SIZE(reg_nr) s390_register_raw_size(reg_nr) #define GDB_TARGET_IS_ESAME (0) -#define REGISTER_SIZE (4) +#define DEPRECATED_REGISTER_SIZE (4) #define REGISTER_BYTES S390_REGISTER_BYTES #endif /* CONFIG_ARCH_S390X */ diff --git a/gdb/config/sparc/tm-sp64.h b/gdb/config/sparc/tm-sp64.h index f46d45915c1..b371d1297b3 100644 --- a/gdb/config/sparc/tm-sp64.h +++ b/gdb/config/sparc/tm-sp64.h @@ -90,26 +90,26 @@ struct type; #undef CALL_DUMMY #define CALL_DUMMY {0} -#undef CALL_DUMMY_LENGTH -#define CALL_DUMMY_LENGTH 0 +#undef DEPRECATED_CALL_DUMMY_LENGTH +#define DEPRECATED_CALL_DUMMY_LENGTH 0 #undef CALL_DUMMY_CALL_OFFSET #define CALL_DUMMY_CALL_OFFSET 0 -#undef CALL_DUMMY_START_OFFSET -#define CALL_DUMMY_START_OFFSET 0 -#undef CALL_DUMMY_BREAKPOINT_OFFSET -#define CALL_DUMMY_BREAKPOINT_OFFSET 0 +#undef DEPRECATED_CALL_DUMMY_START_OFFSET +#define DEPRECATED_CALL_DUMMY_START_OFFSET 0 +#undef DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET +#define DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET 0 #undef CALL_DUMMY_LOCATION #define CALL_DUMMY_LOCATION AT_ENTRY_POINT #undef DEPRECATED_PC_IN_CALL_DUMMY #define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) deprecated_pc_in_call_dummy_at_entry_point (pc, sp, frame_address) #undef DEPRECATED_CALL_DUMMY_STACK_ADJUST #define DEPRECATED_CALL_DUMMY_STACK_ADJUST 128 -#undef SIZEOF_CALL_DUMMY_WORDS -#define SIZEOF_CALL_DUMMY_WORDS 0 +#undef DEPRECATED_SIZEOF_CALL_DUMMY_WORDS +#define DEPRECATED_SIZEOF_CALL_DUMMY_WORDS 0 #undef CALL_DUMMY_ADDRESS #define CALL_DUMMY_ADDRESS() entry_point_address() -#undef FIX_CALL_DUMMY -#define FIX_CALL_DUMMY(DUMMYNAME, PC, FUN, NARGS, ARGS, TYPE, GCC_P) +#undef DEPRECATED_FIX_CALL_DUMMY +#define DEPRECATED_FIX_CALL_DUMMY(DUMMYNAME, PC, FUN, NARGS, ARGS, TYPE, GCC_P) #undef DEPRECATED_PUSH_RETURN_ADDRESS #define DEPRECATED_PUSH_RETURN_ADDRESS(PC, SP) sparc_at_entry_push_return_address (PC, SP) extern CORE_ADDR sparc_at_entry_push_return_address (CORE_ADDR pc, @@ -147,20 +147,20 @@ extern void sparc_at_entry_store_struct_return (CORE_ADDR addr, CORE_ADDR sp); #define DEPRECATED_CALL_DUMMY_STACK_ADJUST 128 /* Size of the call dummy in bytes. */ -#undef CALL_DUMMY_LENGTH -#define CALL_DUMMY_LENGTH 192 +#undef DEPRECATED_CALL_DUMMY_LENGTH +#define DEPRECATED_CALL_DUMMY_LENGTH 192 /* Offset within CALL_DUMMY of the 'call' instruction. */ -#undef CALL_DUMMY_START_OFFSET -#define CALL_DUMMY_START_OFFSET 148 +#undef DEPRECATED_CALL_DUMMY_START_OFFSET +#define DEPRECATED_CALL_DUMMY_START_OFFSET 148 /* Offset within CALL_DUMMY of the 'call' instruction. */ #undef CALL_DUMMY_CALL_OFFSET -#define CALL_DUMMY_CALL_OFFSET (CALL_DUMMY_START_OFFSET + (5 * 4)) +#define CALL_DUMMY_CALL_OFFSET (DEPRECATED_CALL_DUMMY_START_OFFSET + (5 * 4)) /* Offset within CALL_DUMMY of the 'ta 1' instruction. */ -#undef CALL_DUMMY_BREAKPOINT_OFFSET -#define CALL_DUMMY_BREAKPOINT_OFFSET (CALL_DUMMY_START_OFFSET + (8 * 4)) +#undef DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET +#define DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET (DEPRECATED_CALL_DUMMY_START_OFFSET + (8 * 4)) /* Call dummy will be located on the stack. */ #undef CALL_DUMMY_LOCATION @@ -169,15 +169,15 @@ extern void sparc_at_entry_store_struct_return (CORE_ADDR addr, CORE_ADDR sp); #define DEPRECATED_PC_IN_CALL_DUMMY(pc, sp, frame_address) deprecated_pc_in_call_dummy_on_stack (pc, sp, frame_address) /* Insert the function address into the call dummy. */ -#undef FIX_CALL_DUMMY -#define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \ +#undef DEPRECATED_FIX_CALL_DUMMY +#define DEPRECATED_FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \ sparc_fix_call_dummy (dummyname, pc, fun, type, gcc_p) void sparc_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, struct type *value_type, int using_gcc); /* The remainder of these will accept the default definition. */ -#undef SIZEOF_CALL_DUMMY_WORDS +#undef DEPRECATED_SIZEOF_CALL_DUMMY_WORDS #undef DEPRECATED_PUSH_RETURN_ADDRESS #undef CALL_DUMMY_ADDRESS #undef STORE_STRUCT_RETURN @@ -376,8 +376,8 @@ extern void sp64_extract_return_value (struct type *, char[], char *, int); used in push_word and a few other places; REGISTER_RAW_SIZE is the real way to know how big a register is. */ -#undef REGISTER_SIZE -#define REGISTER_SIZE 8 +#undef DEPRECATED_REGISTER_SIZE +#define DEPRECATED_REGISTER_SIZE 8 /* Number of bytes of storage in the actual machine representation for register N. */ diff --git a/gdb/config/sparc/tm-sparc.h b/gdb/config/sparc/tm-sparc.h index e997babd75b..a44b04ed251 100644 --- a/gdb/config/sparc/tm-sparc.h +++ b/gdb/config/sparc/tm-sparc.h @@ -174,7 +174,7 @@ extern int sparc_intreg_size (void); used in push_word and a few other places; REGISTER_RAW_SIZE is the real way to know how big a register is. */ -#define REGISTER_SIZE 4 +#define DEPRECATED_REGISTER_SIZE 4 /* Number of machine registers */ @@ -589,19 +589,19 @@ extern CORE_ADDR init_frame_pc_noop (int fromleaf, struct frame_info *prev); /* Size of the call dummy in bytes. */ -#define CALL_DUMMY_LENGTH 0x38 +#define DEPRECATED_CALL_DUMMY_LENGTH 0x38 /* Offset within call dummy of first instruction to execute. */ -#define CALL_DUMMY_START_OFFSET 0 +#define DEPRECATED_CALL_DUMMY_START_OFFSET 0 /* Offset within CALL_DUMMY of the 'call' instruction. */ -#define CALL_DUMMY_CALL_OFFSET (CALL_DUMMY_START_OFFSET + 0x24) +#define CALL_DUMMY_CALL_OFFSET (DEPRECATED_CALL_DUMMY_START_OFFSET + 0x24) /* Offset within CALL_DUMMY of the 'ta 1' trap instruction. */ -#define CALL_DUMMY_BREAKPOINT_OFFSET (CALL_DUMMY_START_OFFSET + 0x30) +#define DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET (DEPRECATED_CALL_DUMMY_START_OFFSET + 0x30) #define DEPRECATED_CALL_DUMMY_STACK_ADJUST 68 @@ -626,7 +626,7 @@ extern CORE_ADDR init_frame_pc_noop (int fromleaf, struct frame_info *prev); /* Insert the specified number of args and function address into a call sequence of the above form stored at DUMMYNAME. */ -#define FIX_CALL_DUMMY(DUMMYNAME, PC, FUN, NARGS, ARGS, TYPE, GCC_P) \ +#define DEPRECATED_FIX_CALL_DUMMY(DUMMYNAME, PC, FUN, NARGS, ARGS, TYPE, GCC_P) \ sparc_fix_call_dummy (DUMMYNAME, PC, FUN, TYPE, GCC_P) void sparc_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, struct type *value_type, int using_gcc); diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c index a963d21616f..ff2d6d22abf 100644 --- a/gdb/cris-tdep.c +++ b/gdb/cris-tdep.c @@ -971,7 +971,7 @@ cris_abi_original_store_return_value (struct type *type, char *valbuf) { int len = TYPE_LENGTH (type); - if (len <= REGISTER_SIZE) + if (len <= DEPRECATED_REGISTER_SIZE) deprecated_write_register_bytes (REGISTER_BYTE (RET_REGNUM), valbuf, len); else internal_error (__FILE__, __LINE__, "cris_abi_original_store_return_value: type length too large."); @@ -984,7 +984,7 @@ cris_abi_v2_store_return_value (struct type *type, char *valbuf) { int len = TYPE_LENGTH (type); - if (len <= 2 * REGISTER_SIZE) + if (len <= 2 * DEPRECATED_REGISTER_SIZE) { /* Note that this works since R10 and R11 are consecutive registers. */ deprecated_write_register_bytes (REGISTER_BYTE (RET_REGNUM), valbuf, @@ -1057,7 +1057,7 @@ cris_abi_original_extract_return_value (struct type *type, char *regbuf, { int len = TYPE_LENGTH (type); - if (len <= REGISTER_SIZE) + if (len <= DEPRECATED_REGISTER_SIZE) memcpy (valbuf, regbuf + REGISTER_BYTE (RET_REGNUM), len); else internal_error (__FILE__, __LINE__, "cris_abi_original_extract_return_value: type length too large"); @@ -1071,7 +1071,7 @@ cris_abi_v2_extract_return_value (struct type *type, char *regbuf, { int len = TYPE_LENGTH (type); - if (len <= 2 * REGISTER_SIZE) + if (len <= 2 * DEPRECATED_REGISTER_SIZE) memcpy (valbuf, regbuf + REGISTER_BYTE (RET_REGNUM), len); else internal_error (__FILE__, __LINE__, "cris_abi_v2_extract_return_value: type length too large"); @@ -1311,13 +1311,13 @@ cris_abi_original_push_arguments (int nargs, struct value **args, /* Make sure there's space on the stack. Allocate space for data and a parameter to refer to that data. */ for (argnum = 0, stack_alloc = 0; argnum < nargs; argnum++) - stack_alloc += (TYPE_LENGTH (VALUE_TYPE (args[argnum])) + REGISTER_SIZE); + stack_alloc += (TYPE_LENGTH (VALUE_TYPE (args[argnum])) + DEPRECATED_REGISTER_SIZE); sp -= stack_alloc; /* We may over-allocate a little here, but that won't hurt anything. */ /* Initialize stack frame pointers. */ fp_params = sp; - fp_data = sp + (nargs * REGISTER_SIZE); + fp_data = sp + (nargs * DEPRECATED_REGISTER_SIZE); /* Now load as many as possible of the first arguments into registers, and push the rest onto the stack. */ @@ -1330,14 +1330,14 @@ cris_abi_original_push_arguments (int nargs, struct value **args, len = TYPE_LENGTH (type); val = (char *) VALUE_CONTENTS (args[argnum]); - if (len <= REGISTER_SIZE && argreg <= ARG4_REGNUM) + if (len <= DEPRECATED_REGISTER_SIZE && argreg <= ARG4_REGNUM) { /* Data fits in a register; put it in the first available register. */ write_register (argreg, *(unsigned long *) val); argreg++; } - else if (len > REGISTER_SIZE && argreg <= ARG4_REGNUM) + else if (len > DEPRECATED_REGISTER_SIZE && argreg <= ARG4_REGNUM) { /* Data does not fit in register; pass it on the stack and put its address in the first available register. */ @@ -1346,21 +1346,21 @@ cris_abi_original_push_arguments (int nargs, struct value **args, fp_data += len; argreg++; } - else if (len > REGISTER_SIZE) + else if (len > DEPRECATED_REGISTER_SIZE) { /* Data does not fit in register; put both data and parameter on the stack. */ write_memory (fp_data, val, len); - write_memory (fp_params, (char *) (&fp_data), REGISTER_SIZE); + write_memory (fp_params, (char *) (&fp_data), DEPRECATED_REGISTER_SIZE); fp_data += len; - fp_params += REGISTER_SIZE; + fp_params += DEPRECATED_REGISTER_SIZE; } else { /* Data fits in a register, but we are out of registers; put the parameter on the stack. */ - write_memory (fp_params, val, REGISTER_SIZE); - fp_params += REGISTER_SIZE; + write_memory (fp_params, val, DEPRECATED_REGISTER_SIZE); + fp_params += DEPRECATED_REGISTER_SIZE; } } @@ -1401,20 +1401,21 @@ cris_abi_v2_push_arguments (int nargs, struct value **args, CORE_ADDR sp, int reg_demand; len = TYPE_LENGTH (VALUE_TYPE (args[argnum])); - reg_demand = (len / REGISTER_SIZE) + (len % REGISTER_SIZE != 0 ? 1 : 0); + reg_demand = (len / DEPRECATED_REGISTER_SIZE) + (len % DEPRECATED_REGISTER_SIZE != 0 ? 1 : 0); - /* reg_demand * REGISTER_SIZE is the amount of memory we might need to - allocate for this argument. 2 * REGISTER_SIZE is the amount of stack - space we might need to pass the argument itself (either by value or by + /* reg_demand * DEPRECATED_REGISTER_SIZE is the amount of memory + we might need to allocate for this argument. 2 * + DEPRECATED_REGISTER_SIZE is the amount of stack space we + might need to pass the argument itself (either by value or by reference). */ - stack_alloc += (reg_demand * REGISTER_SIZE + 2 * REGISTER_SIZE); + stack_alloc += (reg_demand * DEPRECATED_REGISTER_SIZE + 2 * DEPRECATED_REGISTER_SIZE); } sp -= stack_alloc; /* We may over-allocate a little here, but that won't hurt anything. */ /* Initialize frame pointers. */ fp_arg = sp; - fp_mem = sp + (nargs * (2 * REGISTER_SIZE)); + fp_mem = sp + (nargs * (2 * DEPRECATED_REGISTER_SIZE)); /* Now load as many as possible of the first arguments into registers, and push the rest onto the stack. */ @@ -1432,9 +1433,9 @@ cris_abi_v2_push_arguments (int nargs, struct value **args, CORE_ADDR sp, val = (char *) VALUE_CONTENTS (args[argnum]); /* How may registers worth of storage do we need for this argument? */ - reg_demand = (len / REGISTER_SIZE) + (len % REGISTER_SIZE != 0 ? 1 : 0); + reg_demand = (len / DEPRECATED_REGISTER_SIZE) + (len % DEPRECATED_REGISTER_SIZE != 0 ? 1 : 0); - if (len <= (2 * REGISTER_SIZE) + if (len <= (2 * DEPRECATED_REGISTER_SIZE) && (argreg + reg_demand - 1 <= ARG4_REGNUM)) { /* Data passed by value. Fits in available register(s). */ @@ -1442,10 +1443,10 @@ cris_abi_v2_push_arguments (int nargs, struct value **args, CORE_ADDR sp, { write_register (argreg, *(unsigned long *) val); argreg++; - val += REGISTER_SIZE; + val += DEPRECATED_REGISTER_SIZE; } } - else if (len <= (2 * REGISTER_SIZE) && argreg <= ARG4_REGNUM) + else if (len <= (2 * DEPRECATED_REGISTER_SIZE) && argreg <= ARG4_REGNUM) { /* Data passed by value. Does not fit in available register(s). Use the register(s) first, then the stack. */ @@ -1455,28 +1456,29 @@ cris_abi_v2_push_arguments (int nargs, struct value **args, CORE_ADDR sp, { write_register (argreg, *(unsigned long *) val); argreg++; - val += REGISTER_SIZE; + val += DEPRECATED_REGISTER_SIZE; } else { - /* I guess this memory write could write the remaining data - all at once instead of in REGISTER_SIZE chunks. */ - write_memory (fp_arg, val, REGISTER_SIZE); - fp_arg += REGISTER_SIZE; - val += REGISTER_SIZE; + /* I guess this memory write could write the + remaining data all at once instead of in + DEPRECATED_REGISTER_SIZE chunks. */ + write_memory (fp_arg, val, DEPRECATED_REGISTER_SIZE); + fp_arg += DEPRECATED_REGISTER_SIZE; + val += DEPRECATED_REGISTER_SIZE; } } } - else if (len > (2 * REGISTER_SIZE)) + else if (len > (2 * DEPRECATED_REGISTER_SIZE)) { /* Data passed by reference. Put it on the stack. */ write_memory (fp_mem, val, len); - write_memory (fp_arg, (char *) (&fp_mem), REGISTER_SIZE); + write_memory (fp_arg, (char *) (&fp_mem), DEPRECATED_REGISTER_SIZE); /* fp_mem need not be word-aligned since it's just a chunk of memory being pointed at. That is, += len would do. */ - fp_mem += reg_demand * REGISTER_SIZE; - fp_arg += REGISTER_SIZE; + fp_mem += reg_demand * DEPRECATED_REGISTER_SIZE; + fp_arg += DEPRECATED_REGISTER_SIZE; } else { @@ -1486,7 +1488,7 @@ cris_abi_v2_push_arguments (int nargs, struct value **args, CORE_ADDR sp, /* fp_arg must be word-aligned (i.e., don't += len) to match the function prologue. */ - fp_arg += reg_demand * REGISTER_SIZE; + fp_arg += reg_demand * DEPRECATED_REGISTER_SIZE; } } @@ -4189,7 +4191,7 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Length of ordinary registers used in push_word and a few other places. REGISTER_RAW_SIZE is the real way to know how big a register is. */ - set_gdbarch_register_size (gdbarch, 4); + set_gdbarch_deprecated_register_size (gdbarch, 4); /* NEW */ set_gdbarch_register_bytes_ok (gdbarch, cris_register_bytes_ok); @@ -4260,8 +4262,8 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Defined to 1 to indicate that the target supports inferior function calls. */ - set_gdbarch_call_dummy_words (gdbarch, 0); - set_gdbarch_sizeof_call_dummy_words (gdbarch, 0); + set_gdbarch_deprecated_call_dummy_words (gdbarch, 0); + set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, 0); set_gdbarch_deprecated_get_saved_register (gdbarch, deprecated_generic_get_saved_register); diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 13bcf7da19d..3a4789a41b7 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,10 @@ +2003-05-05 Andrew Cagney <cagney@redhat.com> + + * gdbint.texinfo (Target Architecture Definition): Make + CALL_DUMMY_WORDS, SIZEOF_CALL_DUMMY_WORDS, CALL_DUMMY_LENGTH, + FIX_CALL_DUMMY, CALL_DUMMY_BREAKPOINT_OFFSET and + CALL_DUMMY_BREAKPOINT_OFFSET deprecated. + 2003-05-04 Andrew Cagney <cagney@redhat.com> * gdb.texinfo (GDB/MI Symbol Query): Use @{ and @}. diff --git a/gdb/doc/gdbint.texinfo b/gdb/doc/gdbint.texinfo index 9896e79f372..28cdc82242a 100644 --- a/gdb/doc/gdbint.texinfo +++ b/gdb/doc/gdbint.texinfo @@ -3085,8 +3085,8 @@ custom breakpoint insertion and removal routines if @code{BREAKPOINT_FROM_PC} needs to read the target's memory for some reason. -@item CALL_DUMMY_WORDS -@findex CALL_DUMMY_WORDS +@item DEPRECATED_CALL_DUMMY_WORDS +@findex DEPRECATED_CALL_DUMMY_WORDS Pointer to an array of @code{LONGEST} words of data containing host-byte-ordered @code{REGISTER_BYTES} sized values that partially specify the sequence of instructions needed for an inferior function @@ -3098,17 +3098,18 @@ data. This method has been replaced by @code{push_dummy_code} (@pxref{push_dummy_code}). -@item SIZEOF_CALL_DUMMY_WORDS -@findex SIZEOF_CALL_DUMMY_WORDS -The size of @code{CALL_DUMMY_WORDS}. This must return a positive value. -See also @code{CALL_DUMMY_LENGTH}. +@item DEPRECATED_SIZEOF_CALL_DUMMY_WORDS +@findex DEPRECATED_SIZEOF_CALL_DUMMY_WORDS +The size of @code{DEPRECATED_CALL_DUMMY_WORDS}. This must return a +positive value. See also @code{DEPRECATED_CALL_DUMMY_LENGTH}. This method has been replaced by @code{push_dummy_code} (@pxref{push_dummy_code}). @item CALL_DUMMY @findex CALL_DUMMY -A static initializer for @code{CALL_DUMMY_WORDS}. Deprecated. +A static initializer for @code{DEPRECATED_CALL_DUMMY_WORDS}. +Deprecated. This method has been replaced by @code{push_dummy_code} (@pxref{push_dummy_code}). @@ -3721,7 +3722,7 @@ This method replaces @code{DEPRECATED_PUSH_ARGUMENTS}. @item CORE_ADDR push_dummy_code (@var{gdbarch}, @var{sp}, @var{funaddr}, @var{using_gcc}, @var{args}, @var{nargs}, @var{value_type}, @var{real_pc}, @var{bp_addr}) @findex push_dummy_code -@findex FIX_CALL_DUMMY +@findex DEPRECATED_FIX_CALL_DUMMY @anchor{push_dummy_code} Given a stack based call dummy, push the instruction sequence (including space for a breakpoint) to which the called function should return. @@ -3734,11 +3735,12 @@ By default, the stack is grown sufficient to hold a frame-aligned (@pxref{frame_align}) breakpoint, @var{bp_addr} is set to the address reserved for that breakpoint, and @var{real_pc} set to @var{funaddr}. -This method replaces @code{CALL_DUMMY_WORDS}, -@code{SIZEOF_CALL_DUMMY_WORDS}, @code{CALL_DUMMY}, -@code{CALL_DUMMY_LOCATION}, @code{REGISTER_SIZE}, -@code{GDB_TARGET_IS_HPPA}, @code{CALL_DUMMY_BREAKPOINT_OFFSET}, and -@code{FIX_CALL_DUMMY}. +This method replaces @code{DEPRECATED_CALL_DUMMY_WORDS}, +@code{DEPRECATED_SIZEOF_CALL_DUMMY_WORDS}, @code{CALL_DUMMY}, +@code{CALL_DUMMY_LOCATION}, @code{DEPRECATED_REGISTER_SIZE}, +@code{GDB_TARGET_IS_HPPA}, +@code{DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET}, and +@code{DEPRECATED_FIX_CALL_DUMMY}. @item DEPRECATED_PUSH_DUMMY_FRAME @findex DEPRECATED_PUSH_DUMMY_FRAME diff --git a/gdb/dummy-frame.c b/gdb/dummy-frame.c index 7f3b2a2edc1..e6c9ca6199e 100644 --- a/gdb/dummy-frame.c +++ b/gdb/dummy-frame.c @@ -149,8 +149,9 @@ generic_pc_in_call_dummy (CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR fp) figure out what the real PC (as in the resume address) is BEFORE calling this function (Oh, and I'm not even sure that this function is called with an decremented PC, the call to pc_in_call_dummy() in - that file is conditional on !CALL_DUMMY_BREAKPOINT_OFFSET_P yet - generic dummy targets set CALL_DUMMY_BREAKPOINT_OFFSET. True?). */ + that file is conditional on + !DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET_P yet generic dummy + targets set DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET. True?). */ int pc_in_dummy_frame (CORE_ADDR pc) diff --git a/gdb/dummy-frame.h b/gdb/dummy-frame.h index bb41e8d7988..3d38cc436cc 100644 --- a/gdb/dummy-frame.h +++ b/gdb/dummy-frame.h @@ -37,12 +37,13 @@ struct frame_id; generic enough to be used by many targets. The cheapest and most generic way to do CALL_DUMMY on a new target - is probably to define CALL_DUMMY to be empty, CALL_DUMMY_LENGTH to - zero, and CALL_DUMMY_LOCATION to AT_ENTRY. Then you must remember - to define PUSH_RETURN_ADDRESS, because no call instruction will be - being executed by the target. Also DEPRECATED_FRAME_CHAIN_VALID as + is probably to define CALL_DUMMY to be empty, + DEPRECATED_CALL_DUMMY_LENGTH to zero, and CALL_DUMMY_LOCATION to + AT_ENTRY. Then you must remember to define PUSH_RETURN_ADDRESS, + because no call instruction will be being executed by the target. + Also DEPRECATED_FRAME_CHAIN_VALID as generic_{file,func}_frame_chain_valid and do not set - FIX_CALL_DUMMY. */ + DEPRECATED_FIX_CALL_DUMMY. */ /* If the PC falls in a dummy frame, return a dummy frame unwinder. */ diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c index d45a76d3eb1..ce02b7fc6a8 100644 --- a/gdb/frv-tdep.c +++ b/gdb/frv-tdep.c @@ -1057,7 +1057,7 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_pc_regnum (gdbarch, pc_regnum); set_gdbarch_register_name (gdbarch, frv_register_name); - set_gdbarch_register_size (gdbarch, 4); + set_gdbarch_deprecated_register_size (gdbarch, 4); set_gdbarch_register_bytes (gdbarch, frv_num_regs * 4); set_gdbarch_register_byte (gdbarch, frv_register_byte); set_gdbarch_register_raw_size (gdbarch, frv_register_raw_size); @@ -1092,8 +1092,8 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_deprecated_push_return_address (gdbarch, frv_push_return_address); set_gdbarch_deprecated_pop_frame (gdbarch, frv_pop_frame); - set_gdbarch_call_dummy_words (gdbarch, frv_call_dummy_words); - set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (frv_call_dummy_words)); + set_gdbarch_deprecated_call_dummy_words (gdbarch, frv_call_dummy_words); + set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof (frv_call_dummy_words)); set_gdbarch_deprecated_init_extra_frame_info (gdbarch, frv_init_extra_frame_info); /* Settings that should be unnecessary. */ diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 7bfd06a013b..667dbe0f577 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -167,7 +167,7 @@ struct gdbarch gdbarch_sdb_reg_to_regnum_ftype *sdb_reg_to_regnum; gdbarch_dwarf2_reg_to_regnum_ftype *dwarf2_reg_to_regnum; gdbarch_register_name_ftype *register_name; - int register_size; + int deprecated_register_size; int register_bytes; gdbarch_register_byte_ftype *register_byte; gdbarch_register_raw_size_ftype *register_raw_size; @@ -188,14 +188,14 @@ struct gdbarch int deprecated_use_generic_dummy_frames; int call_dummy_location; gdbarch_call_dummy_address_ftype *call_dummy_address; - CORE_ADDR call_dummy_start_offset; - CORE_ADDR call_dummy_breakpoint_offset; - int call_dummy_length; + CORE_ADDR deprecated_call_dummy_start_offset; + CORE_ADDR deprecated_call_dummy_breakpoint_offset; + int deprecated_call_dummy_length; gdbarch_deprecated_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy; - LONGEST * call_dummy_words; - int sizeof_call_dummy_words; + LONGEST * deprecated_call_dummy_words; + int deprecated_sizeof_call_dummy_words; int deprecated_call_dummy_stack_adjust; - gdbarch_fix_call_dummy_ftype *fix_call_dummy; + gdbarch_deprecated_fix_call_dummy_ftype *deprecated_fix_call_dummy; gdbarch_push_dummy_code_ftype *push_dummy_code; gdbarch_deprecated_init_frame_pc_first_ftype *deprecated_init_frame_pc_first; gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc; @@ -527,8 +527,8 @@ gdbarch_alloc (const struct gdbarch_info *info, current_gdbarch->call_dummy_location = AT_ENTRY_POINT; current_gdbarch->call_dummy_address = entry_point_address; current_gdbarch->deprecated_pc_in_call_dummy = generic_pc_in_call_dummy; - current_gdbarch->call_dummy_words = legacy_call_dummy_words; - current_gdbarch->sizeof_call_dummy_words = legacy_sizeof_call_dummy_words; + current_gdbarch->deprecated_call_dummy_words = legacy_call_dummy_words; + current_gdbarch->deprecated_sizeof_call_dummy_words = legacy_sizeof_call_dummy_words; current_gdbarch->register_convertible = generic_register_convertible_not; current_gdbarch->convert_register_p = legacy_convert_register_p; current_gdbarch->register_to_value = legacy_register_to_value; @@ -663,10 +663,10 @@ verify_gdbarch (struct gdbarch *gdbarch) /* Skip verify of call_dummy_location, invalid_p == 0 */ /* Skip verify of call_dummy_address, invalid_p == 0 */ /* Skip verify of deprecated_pc_in_call_dummy, has predicate */ - /* Skip verify of call_dummy_words, invalid_p == 0 */ - /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */ + /* Skip verify of deprecated_call_dummy_words, invalid_p == 0 */ + /* Skip verify of deprecated_sizeof_call_dummy_words, invalid_p == 0 */ /* Skip verify of deprecated_call_dummy_stack_adjust, has predicate */ - /* Skip verify of fix_call_dummy, has predicate */ + /* Skip verify of deprecated_fix_call_dummy, has predicate */ /* Skip verify of push_dummy_code, has predicate */ /* Skip verify of deprecated_init_frame_pc_first, has predicate */ /* Skip verify of deprecated_init_frame_pc, has predicate */ @@ -916,22 +916,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) (long) current_gdbarch->call_dummy_address /*CALL_DUMMY_ADDRESS ()*/); #endif -#ifdef CALL_DUMMY_BREAKPOINT_OFFSET - fprintf_unfiltered (file, - "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET # %s\n", - XSTRING (CALL_DUMMY_BREAKPOINT_OFFSET)); - fprintf_unfiltered (file, - "gdbarch_dump: CALL_DUMMY_BREAKPOINT_OFFSET = %ld\n", - (long) CALL_DUMMY_BREAKPOINT_OFFSET); -#endif -#ifdef CALL_DUMMY_LENGTH - fprintf_unfiltered (file, - "gdbarch_dump: CALL_DUMMY_LENGTH # %s\n", - XSTRING (CALL_DUMMY_LENGTH)); - fprintf_unfiltered (file, - "gdbarch_dump: CALL_DUMMY_LENGTH = %d\n", - CALL_DUMMY_LENGTH); -#endif #ifdef CALL_DUMMY_LOCATION fprintf_unfiltered (file, "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n", @@ -940,22 +924,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) "gdbarch_dump: CALL_DUMMY_LOCATION = %d\n", CALL_DUMMY_LOCATION); #endif -#ifdef CALL_DUMMY_START_OFFSET - fprintf_unfiltered (file, - "gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n", - XSTRING (CALL_DUMMY_START_OFFSET)); - fprintf_unfiltered (file, - "gdbarch_dump: CALL_DUMMY_START_OFFSET = %ld\n", - (long) CALL_DUMMY_START_OFFSET); -#endif -#ifdef CALL_DUMMY_WORDS - fprintf_unfiltered (file, - "gdbarch_dump: CALL_DUMMY_WORDS # %s\n", - XSTRING (CALL_DUMMY_WORDS)); - fprintf_unfiltered (file, - "gdbarch_dump: CALL_DUMMY_WORDS = 0x%08lx\n", - (long) CALL_DUMMY_WORDS); -#endif #ifdef CANNOT_FETCH_REGISTER fprintf_unfiltered (file, "gdbarch_dump: %s # %s\n", @@ -1034,6 +1002,22 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n", (long) DECR_PC_AFTER_BREAK); #endif +#ifdef DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET + fprintf_unfiltered (file, + "gdbarch_dump: DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET # %s\n", + XSTRING (DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET)); + fprintf_unfiltered (file, + "gdbarch_dump: DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET = %ld\n", + (long) DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET); +#endif +#ifdef DEPRECATED_CALL_DUMMY_LENGTH + fprintf_unfiltered (file, + "gdbarch_dump: DEPRECATED_CALL_DUMMY_LENGTH # %s\n", + XSTRING (DEPRECATED_CALL_DUMMY_LENGTH)); + fprintf_unfiltered (file, + "gdbarch_dump: DEPRECATED_CALL_DUMMY_LENGTH = %d\n", + DEPRECATED_CALL_DUMMY_LENGTH); +#endif #ifdef DEPRECATED_CALL_DUMMY_STACK_ADJUST_P fprintf_unfiltered (file, "gdbarch_dump: %s # %s\n", @@ -1051,6 +1035,22 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST = %d\n", DEPRECATED_CALL_DUMMY_STACK_ADJUST); #endif +#ifdef DEPRECATED_CALL_DUMMY_START_OFFSET + fprintf_unfiltered (file, + "gdbarch_dump: DEPRECATED_CALL_DUMMY_START_OFFSET # %s\n", + XSTRING (DEPRECATED_CALL_DUMMY_START_OFFSET)); + fprintf_unfiltered (file, + "gdbarch_dump: DEPRECATED_CALL_DUMMY_START_OFFSET = %ld\n", + (long) DEPRECATED_CALL_DUMMY_START_OFFSET); +#endif +#ifdef DEPRECATED_CALL_DUMMY_WORDS + fprintf_unfiltered (file, + "gdbarch_dump: DEPRECATED_CALL_DUMMY_WORDS # %s\n", + XSTRING (DEPRECATED_CALL_DUMMY_WORDS)); + fprintf_unfiltered (file, + "gdbarch_dump: DEPRECATED_CALL_DUMMY_WORDS = 0x%08lx\n", + (long) DEPRECATED_CALL_DUMMY_WORDS); +#endif #ifdef DEPRECATED_DO_REGISTERS_INFO_P fprintf_unfiltered (file, "gdbarch_dump: %s # %s\n", @@ -1139,6 +1139,29 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) "gdbarch_dump: DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED = %d\n", DEPRECATED_EXTRA_STACK_ALIGNMENT_NEEDED); #endif +#ifdef DEPRECATED_FIX_CALL_DUMMY_P + fprintf_unfiltered (file, + "gdbarch_dump: %s # %s\n", + "DEPRECATED_FIX_CALL_DUMMY_P()", + XSTRING (DEPRECATED_FIX_CALL_DUMMY_P ())); + fprintf_unfiltered (file, + "gdbarch_dump: DEPRECATED_FIX_CALL_DUMMY_P() = %d\n", + DEPRECATED_FIX_CALL_DUMMY_P ()); +#endif +#ifdef DEPRECATED_FIX_CALL_DUMMY +#if GDB_MULTI_ARCH + /* Macro might contain `[{}]' when not multi-arch */ + fprintf_unfiltered (file, + "gdbarch_dump: %s # %s\n", + "DEPRECATED_FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)", + XSTRING (DEPRECATED_FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p))); +#endif + if (GDB_MULTI_ARCH) + fprintf_unfiltered (file, + "gdbarch_dump: DEPRECATED_FIX_CALL_DUMMY = <0x%08lx>\n", + (long) current_gdbarch->deprecated_fix_call_dummy + /*DEPRECATED_FIX_CALL_DUMMY ()*/); +#endif #ifdef DEPRECATED_FP_REGNUM fprintf_unfiltered (file, "gdbarch_dump: DEPRECATED_FP_REGNUM # %s\n", @@ -1456,6 +1479,14 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) (long) current_gdbarch->deprecated_push_return_address /*DEPRECATED_PUSH_RETURN_ADDRESS ()*/); #endif +#ifdef DEPRECATED_REGISTER_SIZE + fprintf_unfiltered (file, + "gdbarch_dump: DEPRECATED_REGISTER_SIZE # %s\n", + XSTRING (DEPRECATED_REGISTER_SIZE)); + fprintf_unfiltered (file, + "gdbarch_dump: DEPRECATED_REGISTER_SIZE = %d\n", + DEPRECATED_REGISTER_SIZE); +#endif #ifdef DEPRECATED_SAVED_PC_AFTER_CALL_P fprintf_unfiltered (file, "gdbarch_dump: %s # %s\n", @@ -1476,6 +1507,14 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) (long) current_gdbarch->deprecated_saved_pc_after_call /*DEPRECATED_SAVED_PC_AFTER_CALL ()*/); #endif +#ifdef DEPRECATED_SIZEOF_CALL_DUMMY_WORDS + fprintf_unfiltered (file, + "gdbarch_dump: DEPRECATED_SIZEOF_CALL_DUMMY_WORDS # %s\n", + XSTRING (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS)); + fprintf_unfiltered (file, + "gdbarch_dump: DEPRECATED_SIZEOF_CALL_DUMMY_WORDS = %d\n", + DEPRECATED_SIZEOF_CALL_DUMMY_WORDS); +#endif #ifdef DEPRECATED_STORE_RETURN_VALUE #if GDB_MULTI_ARCH /* Macro might contain `[{}]' when not multi-arch */ @@ -1645,29 +1684,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) (long) current_gdbarch->extract_struct_value_address /*EXTRACT_STRUCT_VALUE_ADDRESS ()*/); #endif -#ifdef FIX_CALL_DUMMY_P - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "FIX_CALL_DUMMY_P()", - XSTRING (FIX_CALL_DUMMY_P ())); - fprintf_unfiltered (file, - "gdbarch_dump: FIX_CALL_DUMMY_P() = %d\n", - FIX_CALL_DUMMY_P ()); -#endif -#ifdef FIX_CALL_DUMMY -#if GDB_MULTI_ARCH - /* Macro might contain `[{}]' when not multi-arch */ - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p)", - XSTRING (FIX_CALL_DUMMY (dummy, pc, fun, nargs, args, type, gcc_p))); -#endif - if (GDB_MULTI_ARCH) - fprintf_unfiltered (file, - "gdbarch_dump: FIX_CALL_DUMMY = <0x%08lx>\n", - (long) current_gdbarch->fix_call_dummy - /*FIX_CALL_DUMMY ()*/); -#endif #ifdef FP0_REGNUM fprintf_unfiltered (file, "gdbarch_dump: FP0_REGNUM # %s\n", @@ -2095,14 +2111,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) (long) current_gdbarch->register_sim_regno /*REGISTER_SIM_REGNO ()*/); #endif -#ifdef REGISTER_SIZE - fprintf_unfiltered (file, - "gdbarch_dump: REGISTER_SIZE # %s\n", - XSTRING (REGISTER_SIZE)); - fprintf_unfiltered (file, - "gdbarch_dump: REGISTER_SIZE = %d\n", - REGISTER_SIZE); -#endif #ifdef REGISTER_TO_VALUE #if GDB_MULTI_ARCH /* Macro might contain `[{}]' when not multi-arch */ @@ -2275,14 +2283,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) (long) current_gdbarch->sigtramp_start /*SIGTRAMP_START ()*/); #endif -#ifdef SIZEOF_CALL_DUMMY_WORDS - fprintf_unfiltered (file, - "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n", - XSTRING (SIZEOF_CALL_DUMMY_WORDS)); - fprintf_unfiltered (file, - "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = %d\n", - SIZEOF_CALL_DUMMY_WORDS); -#endif #ifdef SKIP_PROLOGUE fprintf_unfiltered (file, "gdbarch_dump: %s # %s\n", @@ -3295,19 +3295,19 @@ set_gdbarch_register_name (struct gdbarch *gdbarch, } int -gdbarch_register_size (struct gdbarch *gdbarch) +gdbarch_deprecated_register_size (struct gdbarch *gdbarch) { gdb_assert (gdbarch != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_register_size called\n"); - return gdbarch->register_size; + fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_register_size called\n"); + return gdbarch->deprecated_register_size; } void -set_gdbarch_register_size (struct gdbarch *gdbarch, - int register_size) +set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch, + int deprecated_register_size) { - gdbarch->register_size = register_size; + gdbarch->deprecated_register_size = deprecated_register_size; } int @@ -3749,51 +3749,51 @@ set_gdbarch_call_dummy_address (struct gdbarch *gdbarch, } CORE_ADDR -gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch) +gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch) { gdb_assert (gdbarch != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_start_offset called\n"); - return gdbarch->call_dummy_start_offset; + fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_start_offset called\n"); + return gdbarch->deprecated_call_dummy_start_offset; } void -set_gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch, - CORE_ADDR call_dummy_start_offset) +set_gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch, + CORE_ADDR deprecated_call_dummy_start_offset) { - gdbarch->call_dummy_start_offset = call_dummy_start_offset; + gdbarch->deprecated_call_dummy_start_offset = deprecated_call_dummy_start_offset; } CORE_ADDR -gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch) +gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch) { gdb_assert (gdbarch != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_breakpoint_offset called\n"); - return gdbarch->call_dummy_breakpoint_offset; + fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_breakpoint_offset called\n"); + return gdbarch->deprecated_call_dummy_breakpoint_offset; } void -set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch, - CORE_ADDR call_dummy_breakpoint_offset) +set_gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch, + CORE_ADDR deprecated_call_dummy_breakpoint_offset) { - gdbarch->call_dummy_breakpoint_offset = call_dummy_breakpoint_offset; + gdbarch->deprecated_call_dummy_breakpoint_offset = deprecated_call_dummy_breakpoint_offset; } int -gdbarch_call_dummy_length (struct gdbarch *gdbarch) +gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch) { gdb_assert (gdbarch != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_length called\n"); - return gdbarch->call_dummy_length; + fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_length called\n"); + return gdbarch->deprecated_call_dummy_length; } void -set_gdbarch_call_dummy_length (struct gdbarch *gdbarch, - int call_dummy_length) +set_gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch, + int deprecated_call_dummy_length) { - gdbarch->call_dummy_length = call_dummy_length; + gdbarch->deprecated_call_dummy_length = deprecated_call_dummy_length; } int @@ -3824,37 +3824,37 @@ set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, } LONGEST * -gdbarch_call_dummy_words (struct gdbarch *gdbarch) +gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch) { gdb_assert (gdbarch != NULL); - /* Skip verify of call_dummy_words, invalid_p == 0 */ + /* Skip verify of deprecated_call_dummy_words, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_words called\n"); - return gdbarch->call_dummy_words; + fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_words called\n"); + return gdbarch->deprecated_call_dummy_words; } void -set_gdbarch_call_dummy_words (struct gdbarch *gdbarch, - LONGEST * call_dummy_words) +set_gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch, + LONGEST * deprecated_call_dummy_words) { - gdbarch->call_dummy_words = call_dummy_words; + gdbarch->deprecated_call_dummy_words = deprecated_call_dummy_words; } int -gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch) +gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch) { gdb_assert (gdbarch != NULL); - /* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */ + /* Skip verify of deprecated_sizeof_call_dummy_words, invalid_p == 0 */ if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_sizeof_call_dummy_words called\n"); - return gdbarch->sizeof_call_dummy_words; + fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_sizeof_call_dummy_words called\n"); + return gdbarch->deprecated_sizeof_call_dummy_words; } void -set_gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch, - int sizeof_call_dummy_words) +set_gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch, + int deprecated_sizeof_call_dummy_words) { - gdbarch->sizeof_call_dummy_words = sizeof_call_dummy_words; + gdbarch->deprecated_sizeof_call_dummy_words = deprecated_sizeof_call_dummy_words; } int @@ -3881,29 +3881,29 @@ set_gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdbarch, } int -gdbarch_fix_call_dummy_p (struct gdbarch *gdbarch) +gdbarch_deprecated_fix_call_dummy_p (struct gdbarch *gdbarch) { gdb_assert (gdbarch != NULL); - return gdbarch->fix_call_dummy != 0; + return gdbarch->deprecated_fix_call_dummy != 0; } void -gdbarch_fix_call_dummy (struct gdbarch *gdbarch, char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p) +gdbarch_deprecated_fix_call_dummy (struct gdbarch *gdbarch, char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p) { gdb_assert (gdbarch != NULL); - if (gdbarch->fix_call_dummy == 0) + if (gdbarch->deprecated_fix_call_dummy == 0) internal_error (__FILE__, __LINE__, - "gdbarch: gdbarch_fix_call_dummy invalid"); + "gdbarch: gdbarch_deprecated_fix_call_dummy invalid"); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_fix_call_dummy called\n"); - gdbarch->fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p); + fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_fix_call_dummy called\n"); + gdbarch->deprecated_fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p); } void -set_gdbarch_fix_call_dummy (struct gdbarch *gdbarch, - gdbarch_fix_call_dummy_ftype fix_call_dummy) +set_gdbarch_deprecated_fix_call_dummy (struct gdbarch *gdbarch, + gdbarch_deprecated_fix_call_dummy_ftype deprecated_fix_call_dummy) { - gdbarch->fix_call_dummy = fix_call_dummy; + gdbarch->deprecated_fix_call_dummy = deprecated_fix_call_dummy; } int diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index 7cbb19cb72a..aeb704be267 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -721,13 +721,13 @@ extern void set_gdbarch_register_name (struct gdbarch *gdbarch, gdbarch_register #endif #endif -extern int gdbarch_register_size (struct gdbarch *gdbarch); -extern void set_gdbarch_register_size (struct gdbarch *gdbarch, int register_size); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REGISTER_SIZE) -#error "Non multi-arch definition of REGISTER_SIZE" +extern int gdbarch_deprecated_register_size (struct gdbarch *gdbarch); +extern void set_gdbarch_deprecated_register_size (struct gdbarch *gdbarch, int deprecated_register_size); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_REGISTER_SIZE) +#error "Non multi-arch definition of DEPRECATED_REGISTER_SIZE" #endif -#if !defined (REGISTER_SIZE) -#define REGISTER_SIZE (gdbarch_register_size (current_gdbarch)) +#if !defined (DEPRECATED_REGISTER_SIZE) +#define DEPRECATED_REGISTER_SIZE (gdbarch_deprecated_register_size (current_gdbarch)) #endif extern int gdbarch_register_bytes (struct gdbarch *gdbarch); @@ -1198,35 +1198,35 @@ extern void set_gdbarch_call_dummy_address (struct gdbarch *gdbarch, gdbarch_cal /* Replaced by push_dummy_code. */ -extern CORE_ADDR gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch); -extern void set_gdbarch_call_dummy_start_offset (struct gdbarch *gdbarch, CORE_ADDR call_dummy_start_offset); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_START_OFFSET) -#error "Non multi-arch definition of CALL_DUMMY_START_OFFSET" +extern CORE_ADDR gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch); +extern void set_gdbarch_deprecated_call_dummy_start_offset (struct gdbarch *gdbarch, CORE_ADDR deprecated_call_dummy_start_offset); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_START_OFFSET) +#error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_START_OFFSET" #endif -#if !defined (CALL_DUMMY_START_OFFSET) -#define CALL_DUMMY_START_OFFSET (gdbarch_call_dummy_start_offset (current_gdbarch)) +#if !defined (DEPRECATED_CALL_DUMMY_START_OFFSET) +#define DEPRECATED_CALL_DUMMY_START_OFFSET (gdbarch_deprecated_call_dummy_start_offset (current_gdbarch)) #endif /* Replaced by push_dummy_code. */ -extern CORE_ADDR gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch); -extern void set_gdbarch_call_dummy_breakpoint_offset (struct gdbarch *gdbarch, CORE_ADDR call_dummy_breakpoint_offset); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_BREAKPOINT_OFFSET) -#error "Non multi-arch definition of CALL_DUMMY_BREAKPOINT_OFFSET" +extern CORE_ADDR gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch); +extern void set_gdbarch_deprecated_call_dummy_breakpoint_offset (struct gdbarch *gdbarch, CORE_ADDR deprecated_call_dummy_breakpoint_offset); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET) +#error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET" #endif -#if !defined (CALL_DUMMY_BREAKPOINT_OFFSET) -#define CALL_DUMMY_BREAKPOINT_OFFSET (gdbarch_call_dummy_breakpoint_offset (current_gdbarch)) +#if !defined (DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET) +#define DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET (gdbarch_deprecated_call_dummy_breakpoint_offset (current_gdbarch)) #endif /* Replaced by push_dummy_code. */ -extern int gdbarch_call_dummy_length (struct gdbarch *gdbarch); -extern void set_gdbarch_call_dummy_length (struct gdbarch *gdbarch, int call_dummy_length); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_LENGTH) -#error "Non multi-arch definition of CALL_DUMMY_LENGTH" +extern int gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch); +extern void set_gdbarch_deprecated_call_dummy_length (struct gdbarch *gdbarch, int deprecated_call_dummy_length); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_LENGTH) +#error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_LENGTH" #endif -#if !defined (CALL_DUMMY_LENGTH) -#define CALL_DUMMY_LENGTH (gdbarch_call_dummy_length (current_gdbarch)) +#if !defined (DEPRECATED_CALL_DUMMY_LENGTH) +#define DEPRECATED_CALL_DUMMY_LENGTH (gdbarch_deprecated_call_dummy_length (current_gdbarch)) #endif /* NOTE: cagney/2002-11-24: This function with predicate has a valid @@ -1275,33 +1275,33 @@ extern void set_gdbarch_deprecated_pc_in_call_dummy (struct gdbarch *gdbarch, gd /* Replaced by push_dummy_code. */ /* Default (value) for non- multi-arch platforms. */ -#if (!GDB_MULTI_ARCH) && !defined (CALL_DUMMY_WORDS) -#define CALL_DUMMY_WORDS (legacy_call_dummy_words) +#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_CALL_DUMMY_WORDS) +#define DEPRECATED_CALL_DUMMY_WORDS (legacy_call_dummy_words) #endif -extern LONGEST * gdbarch_call_dummy_words (struct gdbarch *gdbarch); -extern void set_gdbarch_call_dummy_words (struct gdbarch *gdbarch, LONGEST * call_dummy_words); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_WORDS) -#error "Non multi-arch definition of CALL_DUMMY_WORDS" +extern LONGEST * gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch); +extern void set_gdbarch_deprecated_call_dummy_words (struct gdbarch *gdbarch, LONGEST * deprecated_call_dummy_words); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_CALL_DUMMY_WORDS) +#error "Non multi-arch definition of DEPRECATED_CALL_DUMMY_WORDS" #endif -#if !defined (CALL_DUMMY_WORDS) -#define CALL_DUMMY_WORDS (gdbarch_call_dummy_words (current_gdbarch)) +#if !defined (DEPRECATED_CALL_DUMMY_WORDS) +#define DEPRECATED_CALL_DUMMY_WORDS (gdbarch_deprecated_call_dummy_words (current_gdbarch)) #endif /* Replaced by push_dummy_code. */ /* Default (value) for non- multi-arch platforms. */ -#if (!GDB_MULTI_ARCH) && !defined (SIZEOF_CALL_DUMMY_WORDS) -#define SIZEOF_CALL_DUMMY_WORDS (legacy_sizeof_call_dummy_words) +#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS) +#define DEPRECATED_SIZEOF_CALL_DUMMY_WORDS (legacy_sizeof_call_dummy_words) #endif -extern int gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch); -extern void set_gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch, int sizeof_call_dummy_words); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIZEOF_CALL_DUMMY_WORDS) -#error "Non multi-arch definition of SIZEOF_CALL_DUMMY_WORDS" +extern int gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch); +extern void set_gdbarch_deprecated_sizeof_call_dummy_words (struct gdbarch *gdbarch, int deprecated_sizeof_call_dummy_words); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS) +#error "Non multi-arch definition of DEPRECATED_SIZEOF_CALL_DUMMY_WORDS" #endif -#if !defined (SIZEOF_CALL_DUMMY_WORDS) -#define SIZEOF_CALL_DUMMY_WORDS (gdbarch_sizeof_call_dummy_words (current_gdbarch)) +#if !defined (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS) +#define DEPRECATED_SIZEOF_CALL_DUMMY_WORDS (gdbarch_deprecated_sizeof_call_dummy_words (current_gdbarch)) #endif /* Replaced by push_dummy_code. */ @@ -1344,44 +1344,44 @@ extern void set_gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdba /* Replaced by push_dummy_code. */ -#if defined (FIX_CALL_DUMMY) -/* Legacy for systems yet to multi-arch FIX_CALL_DUMMY */ -#if !defined (FIX_CALL_DUMMY_P) -#define FIX_CALL_DUMMY_P() (1) +#if defined (DEPRECATED_FIX_CALL_DUMMY) +/* Legacy for systems yet to multi-arch DEPRECATED_FIX_CALL_DUMMY */ +#if !defined (DEPRECATED_FIX_CALL_DUMMY_P) +#define DEPRECATED_FIX_CALL_DUMMY_P() (1) #endif #endif /* Default predicate for non- multi-arch targets. */ -#if (!GDB_MULTI_ARCH) && !defined (FIX_CALL_DUMMY_P) -#define FIX_CALL_DUMMY_P() (0) +#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FIX_CALL_DUMMY_P) +#define DEPRECATED_FIX_CALL_DUMMY_P() (0) #endif -extern int gdbarch_fix_call_dummy_p (struct gdbarch *gdbarch); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FIX_CALL_DUMMY_P) -#error "Non multi-arch definition of FIX_CALL_DUMMY" +extern int gdbarch_deprecated_fix_call_dummy_p (struct gdbarch *gdbarch); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FIX_CALL_DUMMY_P) +#error "Non multi-arch definition of DEPRECATED_FIX_CALL_DUMMY" #endif -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FIX_CALL_DUMMY_P) -#define FIX_CALL_DUMMY_P() (gdbarch_fix_call_dummy_p (current_gdbarch)) +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FIX_CALL_DUMMY_P) +#define DEPRECATED_FIX_CALL_DUMMY_P() (gdbarch_deprecated_fix_call_dummy_p (current_gdbarch)) #endif /* Default (function) for non- multi-arch platforms. */ -#if (!GDB_MULTI_ARCH) && !defined (FIX_CALL_DUMMY) -#define FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p) (internal_error (__FILE__, __LINE__, "FIX_CALL_DUMMY"), 0) +#if (!GDB_MULTI_ARCH) && !defined (DEPRECATED_FIX_CALL_DUMMY) +#define DEPRECATED_FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p) (internal_error (__FILE__, __LINE__, "DEPRECATED_FIX_CALL_DUMMY"), 0) #endif -typedef void (gdbarch_fix_call_dummy_ftype) (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p); -extern void gdbarch_fix_call_dummy (struct gdbarch *gdbarch, char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p); -extern void set_gdbarch_fix_call_dummy (struct gdbarch *gdbarch, gdbarch_fix_call_dummy_ftype *fix_call_dummy); -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FIX_CALL_DUMMY) -#error "Non multi-arch definition of FIX_CALL_DUMMY" +typedef void (gdbarch_deprecated_fix_call_dummy_ftype) (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p); +extern void gdbarch_deprecated_fix_call_dummy (struct gdbarch *gdbarch, char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p); +extern void set_gdbarch_deprecated_fix_call_dummy (struct gdbarch *gdbarch, gdbarch_deprecated_fix_call_dummy_ftype *deprecated_fix_call_dummy); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FIX_CALL_DUMMY) +#error "Non multi-arch definition of DEPRECATED_FIX_CALL_DUMMY" #endif #if GDB_MULTI_ARCH -#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FIX_CALL_DUMMY) -#define FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p) (gdbarch_fix_call_dummy (current_gdbarch, dummy, pc, fun, nargs, args, type, gcc_p)) +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DEPRECATED_FIX_CALL_DUMMY) +#define DEPRECATED_FIX_CALL_DUMMY(dummy, pc, fun, nargs, args, type, gcc_p) (gdbarch_deprecated_fix_call_dummy (current_gdbarch, dummy, pc, fun, nargs, args, type, gcc_p)) #endif #endif -/* This is a replacement for FIX_CALL_DUMMY et.al. */ +/* This is a replacement for DEPRECATED_FIX_CALL_DUMMY et.al. */ extern int gdbarch_push_dummy_code_p (struct gdbarch *gdbarch); diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 8fa98dfc6bc..3a8e1648ec6 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -472,7 +472,7 @@ f:2:DWARF_REG_TO_REGNUM:int:dwarf_reg_to_regnum:int dwarf_regnr:dwarf_regnr:::no f:2:SDB_REG_TO_REGNUM:int:sdb_reg_to_regnum:int sdb_regnr:sdb_regnr:::no_op_reg_to_regnum::0 f:2:DWARF2_REG_TO_REGNUM:int:dwarf2_reg_to_regnum:int dwarf2_regnr:dwarf2_regnr:::no_op_reg_to_regnum::0 f:2:REGISTER_NAME:const char *:register_name:int regnr:regnr:::legacy_register_name::0 -v::REGISTER_SIZE:int:register_size +v::DEPRECATED_REGISTER_SIZE:int:deprecated_register_size v::REGISTER_BYTES:int:register_bytes # NOTE: cagney/2002-05-02: This function with predicate has a valid # (callable) initial value. As a consequence, even when the predicate @@ -533,11 +533,11 @@ v::CALL_DUMMY_LOCATION:int:call_dummy_location:::::AT_ENTRY_POINT::0 # Replaced by push_dummy_code. f::CALL_DUMMY_ADDRESS:CORE_ADDR:call_dummy_address:void::::entry_point_address::0 # Replaced by push_dummy_code. -v::CALL_DUMMY_START_OFFSET:CORE_ADDR:call_dummy_start_offset +v::DEPRECATED_CALL_DUMMY_START_OFFSET:CORE_ADDR:deprecated_call_dummy_start_offset # Replaced by push_dummy_code. -v::CALL_DUMMY_BREAKPOINT_OFFSET:CORE_ADDR:call_dummy_breakpoint_offset +v::DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET:CORE_ADDR:deprecated_call_dummy_breakpoint_offset # Replaced by push_dummy_code. -v::CALL_DUMMY_LENGTH:int:call_dummy_length +v::DEPRECATED_CALL_DUMMY_LENGTH:int:deprecated_call_dummy_length # NOTE: cagney/2002-11-24: This function with predicate has a valid # (callable) initial value. As a consequence, even when the predicate # is false, the corresponding function works. This simplifies the @@ -545,14 +545,14 @@ v::CALL_DUMMY_LENGTH:int:call_dummy_length # doesn't need to be modified. F::DEPRECATED_PC_IN_CALL_DUMMY:int:deprecated_pc_in_call_dummy:CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address:pc, sp, frame_address::generic_pc_in_call_dummy:generic_pc_in_call_dummy # Replaced by push_dummy_code. -v::CALL_DUMMY_WORDS:LONGEST *:call_dummy_words::::0:legacy_call_dummy_words::0:0x%08lx +v::DEPRECATED_CALL_DUMMY_WORDS:LONGEST *:deprecated_call_dummy_words::::0:legacy_call_dummy_words::0:0x%08lx # Replaced by push_dummy_code. -v::SIZEOF_CALL_DUMMY_WORDS:int:sizeof_call_dummy_words::::0:legacy_sizeof_call_dummy_words::0 +v::DEPRECATED_SIZEOF_CALL_DUMMY_WORDS:int:deprecated_sizeof_call_dummy_words::::0:legacy_sizeof_call_dummy_words::0 # Replaced by push_dummy_code. V:2:DEPRECATED_CALL_DUMMY_STACK_ADJUST:int:deprecated_call_dummy_stack_adjust::::0 # Replaced by push_dummy_code. -F::FIX_CALL_DUMMY:void:fix_call_dummy:char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p:dummy, pc, fun, nargs, args, type, gcc_p -# This is a replacement for FIX_CALL_DUMMY et.al. +F::DEPRECATED_FIX_CALL_DUMMY:void:deprecated_fix_call_dummy:char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p:dummy, pc, fun, nargs, args, type, gcc_p +# This is a replacement for DEPRECATED_FIX_CALL_DUMMY et.al. M::PUSH_DUMMY_CODE: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:sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr: F:2:DEPRECATED_INIT_FRAME_PC_FIRST:CORE_ADDR:deprecated_init_frame_pc_first:int fromleaf, struct frame_info *prev:fromleaf, prev F:2:DEPRECATED_INIT_FRAME_PC:CORE_ADDR:deprecated_init_frame_pc:int fromleaf, struct frame_info *prev:fromleaf, prev diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c index 614bc813e31..3e12afdb7ff 100644 --- a/gdb/h8300-tdep.c +++ b/gdb/h8300-tdep.c @@ -1104,7 +1104,7 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_deprecated_fp_regnum (gdbarch, E_FP_REGNUM); set_gdbarch_pc_regnum (gdbarch, E_PC_REGNUM); set_gdbarch_register_name (gdbarch, h8300_register_name); - set_gdbarch_register_size (gdbarch, BINWORD); + set_gdbarch_deprecated_register_size (gdbarch, BINWORD); set_gdbarch_register_bytes (gdbarch, E_NUM_REGS * BINWORD); set_gdbarch_register_byte (gdbarch, h8300_register_byte); set_gdbarch_register_raw_size (gdbarch, h8300_register_raw_size); @@ -1156,8 +1156,8 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_deprecated_store_return_value (gdbarch, h8300_store_return_value); set_gdbarch_deprecated_extract_struct_value_address (gdbarch, h8300_extract_struct_value_address); set_gdbarch_use_struct_convention (gdbarch, h8300_use_struct_convention); - set_gdbarch_call_dummy_words (gdbarch, call_dummy_words); - set_gdbarch_sizeof_call_dummy_words (gdbarch, 0); + set_gdbarch_deprecated_call_dummy_words (gdbarch, call_dummy_words); + set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, 0); set_gdbarch_breakpoint_from_pc (gdbarch, h8300_breakpoint_from_pc); set_gdbarch_int_bit (gdbarch, 2 * TARGET_CHAR_BIT); diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c index db761ac59e4..db8d5105542 100644 --- a/gdb/hppa-tdep.c +++ b/gdb/hppa-tdep.c @@ -200,7 +200,7 @@ extern int exception_catchpoints_are_fragile; int hppa_use_struct_convention (int gcc_p, struct type *type) { - return (TYPE_LENGTH (type) > 2 * REGISTER_SIZE); + return (TYPE_LENGTH (type) > 2 * DEPRECATED_REGISTER_SIZE); } @@ -904,16 +904,16 @@ hppa_frame_saved_pc (struct frame_info *frame) /* A call dummy is sized in words, but it is actually a series of instructions. Account for that scaling factor. */ - + ((REGISTER_SIZE / INSTRUCTION_SIZE) - * CALL_DUMMY_LENGTH) + + ((DEPRECATED_REGISTER_SIZE / INSTRUCTION_SIZE) + * DEPRECATED_CALL_DUMMY_LENGTH) /* Similarly we have to account for 64bit wide register saves. */ - + (32 * REGISTER_SIZE) + + (32 * DEPRECATED_REGISTER_SIZE) /* We always consider FP regs 8 bytes long. */ + (NUM_REGS - FP0_REGNUM) * 8 /* Similarly we have to account for 64bit wide register saves. */ - + (6 * REGISTER_SIZE))))) + + (6 * DEPRECATED_REGISTER_SIZE))))) { return read_memory_integer ((get_frame_base (frame) + (TARGET_PTR_BIT == 64 ? -16 : -20)), @@ -1467,24 +1467,24 @@ hppa_push_dummy_frame (void) /* The 32bit and 64bit ABIs save the return pointer into different stack slots. */ - if (REGISTER_SIZE == 8) - write_memory (sp - 16, (char *) &int_buffer, REGISTER_SIZE); + if (DEPRECATED_REGISTER_SIZE == 8) + write_memory (sp - 16, (char *) &int_buffer, DEPRECATED_REGISTER_SIZE); else - write_memory (sp - 20, (char *) &int_buffer, REGISTER_SIZE); + write_memory (sp - 20, (char *) &int_buffer, DEPRECATED_REGISTER_SIZE); int_buffer = deprecated_read_fp (); - write_memory (sp, (char *) &int_buffer, REGISTER_SIZE); + write_memory (sp, (char *) &int_buffer, DEPRECATED_REGISTER_SIZE); write_register (DEPRECATED_FP_REGNUM, sp); - sp += 2 * REGISTER_SIZE; + sp += 2 * DEPRECATED_REGISTER_SIZE; for (regnum = 1; regnum < 32; regnum++) if (regnum != RP_REGNUM && regnum != DEPRECATED_FP_REGNUM) sp = push_word (sp, read_register (regnum)); /* This is not necessary for the 64bit ABI. In fact it is dangerous. */ - if (REGISTER_SIZE != 8) + if (DEPRECATED_REGISTER_SIZE != 8) sp += 4; for (regnum = FP0_REGNUM; regnum < NUM_REGS; regnum++) @@ -1510,37 +1510,37 @@ find_dummy_frame_regs (struct frame_info *frame, int i; /* The 32bit and 64bit ABIs save RP into different locations. */ - if (REGISTER_SIZE == 8) + if (DEPRECATED_REGISTER_SIZE == 8) frame_saved_regs[RP_REGNUM] = (fp - 16) & ~0x3; else frame_saved_regs[RP_REGNUM] = (fp - 20) & ~0x3; frame_saved_regs[DEPRECATED_FP_REGNUM] = fp; - frame_saved_regs[1] = fp + (2 * REGISTER_SIZE); + frame_saved_regs[1] = fp + (2 * DEPRECATED_REGISTER_SIZE); - for (fp += 3 * REGISTER_SIZE, i = 3; i < 32; i++) + for (fp += 3 * DEPRECATED_REGISTER_SIZE, i = 3; i < 32; i++) { if (i != DEPRECATED_FP_REGNUM) { frame_saved_regs[i] = fp; - fp += REGISTER_SIZE; + fp += DEPRECATED_REGISTER_SIZE; } } /* This is not necessary or desirable for the 64bit ABI. */ - if (REGISTER_SIZE != 8) + if (DEPRECATED_REGISTER_SIZE != 8) fp += 4; for (i = FP0_REGNUM; i < NUM_REGS; i++, fp += 8) frame_saved_regs[i] = fp; frame_saved_regs[IPSW_REGNUM] = fp; - frame_saved_regs[SAR_REGNUM] = fp + REGISTER_SIZE; - frame_saved_regs[PCOQ_HEAD_REGNUM] = fp + 2 * REGISTER_SIZE; - frame_saved_regs[PCSQ_HEAD_REGNUM] = fp + 3 * REGISTER_SIZE; - frame_saved_regs[PCOQ_TAIL_REGNUM] = fp + 4 * REGISTER_SIZE; - frame_saved_regs[PCSQ_TAIL_REGNUM] = fp + 5 * REGISTER_SIZE; + frame_saved_regs[SAR_REGNUM] = fp + DEPRECATED_REGISTER_SIZE; + frame_saved_regs[PCOQ_HEAD_REGNUM] = fp + 2 * DEPRECATED_REGISTER_SIZE; + frame_saved_regs[PCSQ_HEAD_REGNUM] = fp + 3 * DEPRECATED_REGISTER_SIZE; + frame_saved_regs[PCOQ_TAIL_REGNUM] = fp + 4 * DEPRECATED_REGISTER_SIZE; + frame_saved_regs[PCSQ_TAIL_REGNUM] = fp + 5 * DEPRECATED_REGISTER_SIZE; } void @@ -1564,7 +1564,7 @@ hppa_pop_frame (void) for (regnum = 31; regnum > 0; regnum--) if (fsr[regnum]) write_register (regnum, read_memory_integer (fsr[regnum], - REGISTER_SIZE)); + DEPRECATED_REGISTER_SIZE)); for (regnum = NUM_REGS - 1; regnum >= FP0_REGNUM; regnum--) if (fsr[regnum]) @@ -1577,18 +1577,18 @@ hppa_pop_frame (void) if (fsr[IPSW_REGNUM]) write_register (IPSW_REGNUM, read_memory_integer (fsr[IPSW_REGNUM], - REGISTER_SIZE)); + DEPRECATED_REGISTER_SIZE)); if (fsr[SAR_REGNUM]) write_register (SAR_REGNUM, read_memory_integer (fsr[SAR_REGNUM], - REGISTER_SIZE)); + DEPRECATED_REGISTER_SIZE)); /* If the PC was explicitly saved, then just restore it. */ if (fsr[PCOQ_TAIL_REGNUM]) { npc = read_memory_integer (fsr[PCOQ_TAIL_REGNUM], - REGISTER_SIZE); + DEPRECATED_REGISTER_SIZE); write_register (PCOQ_TAIL_REGNUM, npc); } /* Else use the value in %rp to set the new PC. */ @@ -1598,7 +1598,7 @@ hppa_pop_frame (void) write_pc (npc); } - write_register (DEPRECATED_FP_REGNUM, read_memory_integer (fp, REGISTER_SIZE)); + write_register (DEPRECATED_FP_REGNUM, read_memory_integer (fp, DEPRECATED_REGISTER_SIZE)); if (fsr[IPSW_REGNUM]) /* call dummy */ write_register (SP_REGNUM, fp - 48); @@ -1667,7 +1667,7 @@ restore_pc_queue (CORE_ADDR *fsr) right place. */ write_register (21, read_memory_integer (fsr[PCSQ_HEAD_REGNUM], - REGISTER_SIZE)); + DEPRECATED_REGISTER_SIZE)); write_register (22, new_pc); for (insn_count = 0; insn_count < 3; insn_count++) @@ -1747,7 +1747,7 @@ hppa_push_arguments (int nargs, struct value **args, CORE_ADDR sp, the left. We do this by promoting them to full-width, although the ABI says to pad them with garbage. */ if (is_integral_type (arg_type) - && TYPE_LENGTH (arg_type) < REGISTER_SIZE) + && TYPE_LENGTH (arg_type) < DEPRECATED_REGISTER_SIZE) { args[i] = value_cast ((TYPE_UNSIGNED (arg_type) ? builtin_type_unsigned_long @@ -1760,7 +1760,7 @@ hppa_push_arguments (int nargs, struct value **args, CORE_ADDR sp, /* Align the size of the argument to the word size for this target. */ - bytes_reserved = (lengths[i] + REGISTER_SIZE - 1) & -REGISTER_SIZE; + bytes_reserved = (lengths[i] + DEPRECATED_REGISTER_SIZE - 1) & -DEPRECATED_REGISTER_SIZE; offset[i] = cum_bytes_reserved; @@ -1772,8 +1772,8 @@ hppa_push_arguments (int nargs, struct value **args, CORE_ADDR sp, if (bytes_reserved > 8) { /* Round up the offset to a multiple of two slots. */ - int new_offset = ((offset[i] + 2*REGISTER_SIZE-1) - & -(2*REGISTER_SIZE)); + int new_offset = ((offset[i] + 2*DEPRECATED_REGISTER_SIZE-1) + & -(2*DEPRECATED_REGISTER_SIZE)); /* Note the space we've wasted, if any. */ bytes_reserved += new_offset - offset[i]; @@ -1860,15 +1860,15 @@ hppa_push_arguments (int nargs, struct value **args, CORE_ADDR sp, /* Align the size of the argument to the word size for this target. */ - bytes_reserved = (lengths[i] + REGISTER_SIZE - 1) & -REGISTER_SIZE; + bytes_reserved = (lengths[i] + DEPRECATED_REGISTER_SIZE - 1) & -DEPRECATED_REGISTER_SIZE; offset[i] = (cum_bytes_reserved + (lengths[i] > 4 ? bytes_reserved : lengths[i])); /* If the argument is a double word argument, then it needs to be double word aligned. */ - if ((bytes_reserved == 2 * REGISTER_SIZE) - && (offset[i] % 2 * REGISTER_SIZE)) + if ((bytes_reserved == 2 * DEPRECATED_REGISTER_SIZE) + && (offset[i] % 2 * DEPRECATED_REGISTER_SIZE)) { int new_offset = 0; /* BYTES_RESERVED is already aligned to the word, so we put @@ -1876,13 +1876,13 @@ hppa_push_arguments (int nargs, struct value **args, CORE_ADDR sp, This will leave one empty word on the stack, and one unused register as mandated by the ABI. */ - new_offset = ((offset[i] + 2 * REGISTER_SIZE - 1) - & -(2 * REGISTER_SIZE)); + new_offset = ((offset[i] + 2 * DEPRECATED_REGISTER_SIZE - 1) + & -(2 * DEPRECATED_REGISTER_SIZE)); - if ((new_offset - offset[i]) >= 2 * REGISTER_SIZE) + if ((new_offset - offset[i]) >= 2 * DEPRECATED_REGISTER_SIZE) { - bytes_reserved += REGISTER_SIZE; - offset[i] += REGISTER_SIZE; + bytes_reserved += DEPRECATED_REGISTER_SIZE; + offset[i] += DEPRECATED_REGISTER_SIZE; } } @@ -2037,9 +2037,9 @@ cover_find_stub_with_shl_get (void *args_untyped) into a call sequence of the above form stored at DUMMYNAME. On the hppa we need to call the stack dummy through $$dyncall. - Therefore our version of FIX_CALL_DUMMY takes an extra argument, - real_pc, which is the location where gdb should start up the - inferior to do the function call. + Therefore our version of DEPRECATED_FIX_CALL_DUMMY takes an extra + argument, real_pc, which is the location where gdb should start up + the inferior to do the function call. This has to work across several versions of hpux, bsd, osf1. It has to work regardless of what compiler was used to build the inferior program. @@ -2195,7 +2195,7 @@ hppa_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, at *(fun+4). Note the call dummy is *NOT* allowed to trash %r19 before calling the target function. */ write_register (19, read_memory_integer ((fun & ~0x3) + 4, - REGISTER_SIZE)); + DEPRECATED_REGISTER_SIZE)); /* Now get the real address for the function we are calling, it's at *fun. */ @@ -3882,16 +3882,16 @@ hppa_frame_find_saved_regs (struct frame_info *frame_info, /* A call dummy is sized in words, but it is actually a series of instructions. Account for that scaling factor. */ - + ((REGISTER_SIZE / INSTRUCTION_SIZE) - * CALL_DUMMY_LENGTH) + + ((DEPRECATED_REGISTER_SIZE / INSTRUCTION_SIZE) + * DEPRECATED_CALL_DUMMY_LENGTH) /* Similarly we have to account for 64bit wide register saves. */ - + (32 * REGISTER_SIZE) + + (32 * DEPRECATED_REGISTER_SIZE) /* We always consider FP regs 8 bytes long. */ + (NUM_REGS - FP0_REGNUM) * 8 /* Similarly we have to account for 64bit wide register saves. */ - + (6 * REGISTER_SIZE))))) + + (6 * DEPRECATED_REGISTER_SIZE))))) find_dummy_frame_regs (frame_info, frame_saved_regs); /* Interrupt handlers are special too. They lay out the register @@ -4860,7 +4860,7 @@ int hppa_register_raw_size (int reg_nr) { /* All registers have the same size. */ - return REGISTER_SIZE; + return DEPRECATED_REGISTER_SIZE; } /* Index within the register vector of the first byte of the space i @@ -4989,7 +4989,7 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_inner_than (gdbarch, hppa_inner_than); set_gdbarch_stack_align (gdbarch, hppa_stack_align); set_gdbarch_decr_pc_after_break (gdbarch, 0); - set_gdbarch_register_size (gdbarch, 4); + set_gdbarch_deprecated_register_size (gdbarch, 4); set_gdbarch_num_regs (gdbarch, hppa_num_regs); set_gdbarch_deprecated_fp_regnum (gdbarch, 3); set_gdbarch_sp_regnum (gdbarch, 30); @@ -5023,8 +5023,8 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_frame_args_skip (gdbarch, 0); set_gdbarch_deprecated_push_dummy_frame (gdbarch, hppa_push_dummy_frame); set_gdbarch_deprecated_pop_frame (gdbarch, hppa_pop_frame); - set_gdbarch_call_dummy_length (gdbarch, INSTRUCTION_SIZE * 28); - /* set_gdbarch_fix_call_dummy (gdbarch, hppa_fix_call_dummy); */ + set_gdbarch_deprecated_call_dummy_length (gdbarch, INSTRUCTION_SIZE * 28); + /* set_gdbarch_deprecated_fix_call_dummy (gdbarch, hppa_fix_call_dummy); */ set_gdbarch_deprecated_push_arguments (gdbarch, hppa_push_arguments); set_gdbarch_smash_text_address (gdbarch, hppa_smash_text_address); set_gdbarch_believe_pcc_promotion (gdbarch, 1); diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 07c82b608f0..1eab5122c3a 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -1486,7 +1486,7 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) be in use on any of the supported i386 targets. */ set_gdbarch_register_name (gdbarch, i386_register_name); - set_gdbarch_register_size (gdbarch, 4); + set_gdbarch_deprecated_register_size (gdbarch, 4); set_gdbarch_register_bytes (gdbarch, I386_SIZEOF_GREGS + I386_SIZEOF_FREGS); set_gdbarch_register_type (gdbarch, i386_register_type); @@ -1495,8 +1495,8 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_get_longjmp_target (gdbarch, i386_get_longjmp_target); /* Call dummy code. */ - set_gdbarch_call_dummy_words (gdbarch, NULL); - set_gdbarch_sizeof_call_dummy_words (gdbarch, 0); + set_gdbarch_deprecated_call_dummy_words (gdbarch, NULL); + set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, 0); set_gdbarch_register_convertible (gdbarch, i386_register_convertible); set_gdbarch_register_convert_to_virtual (gdbarch, diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c index 7aff5b95171..b9cb6123484 100644 --- a/gdb/ia64-tdep.c +++ b/gdb/ia64-tdep.c @@ -2173,7 +2173,7 @@ 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); - set_gdbarch_register_size (gdbarch, 8); + set_gdbarch_deprecated_register_size (gdbarch, 8); set_gdbarch_register_bytes (gdbarch, ia64_num_regs * 8 + 128*8); set_gdbarch_register_byte (gdbarch, ia64_register_byte); set_gdbarch_register_raw_size (gdbarch, ia64_register_raw_size); @@ -2217,8 +2217,8 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_deprecated_push_return_address (gdbarch, ia64_push_return_address); set_gdbarch_deprecated_pop_frame (gdbarch, ia64_pop_frame); - set_gdbarch_call_dummy_words (gdbarch, ia64_call_dummy_words); - set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (ia64_call_dummy_words)); + set_gdbarch_deprecated_call_dummy_words (gdbarch, ia64_call_dummy_words); + set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof (ia64_call_dummy_words)); set_gdbarch_deprecated_init_extra_frame_info (gdbarch, ia64_init_extra_frame_info); set_gdbarch_frame_args_address (gdbarch, ia64_frame_args_address); set_gdbarch_frame_locals_address (gdbarch, ia64_frame_locals_address); diff --git a/gdb/infcall.c b/gdb/infcall.c index c2ee412306e..5f80e896bbc 100644 --- a/gdb/infcall.c +++ b/gdb/infcall.c @@ -222,22 +222,26 @@ legacy_push_dummy_code (struct gdbarch *gdbarch, struct type *value_type, CORE_ADDR *real_pc, CORE_ADDR *bp_addr) { - /* CALL_DUMMY is an array of words (REGISTER_SIZE), but each word is - in host byte order. Before calling FIX_CALL_DUMMY, we byteswap - it and remove any extra bytes which might exist because ULONGEST - is bigger than REGISTER_SIZE. */ + /* CALL_DUMMY is an array of words (DEPRECATED_REGISTER_SIZE), but + each word is in host byte order. Before calling + DEPRECATED_FIX_CALL_DUMMY, we byteswap it and remove any extra + bytes which might exist because ULONGEST is bigger than + DEPRECATED_REGISTER_SIZE. */ /* NOTE: This is pretty wierd, as the call dummy is actually a sequence of instructions. But CISC machines will have to pack - the instructions into REGISTER_SIZE units (and so will RISC - machines for which INSTRUCTION_SIZE is not REGISTER_SIZE). */ + the instructions into DEPRECATED_REGISTER_SIZE units (and so will + RISC machines for which INSTRUCTION_SIZE is not + DEPRECATED_REGISTER_SIZE). */ /* NOTE: This is pretty stupid. CALL_DUMMY should be in strict target byte order. */ CORE_ADDR start_sp; - ULONGEST *dummy = alloca (SIZEOF_CALL_DUMMY_WORDS); - int sizeof_dummy1 = (REGISTER_SIZE * SIZEOF_CALL_DUMMY_WORDS + ULONGEST *dummy = alloca (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS); + int sizeof_dummy1 = (DEPRECATED_REGISTER_SIZE + * DEPRECATED_SIZEOF_CALL_DUMMY_WORDS / sizeof (ULONGEST)); char *dummy1 = alloca (sizeof_dummy1); - memcpy (dummy, CALL_DUMMY_WORDS, SIZEOF_CALL_DUMMY_WORDS); + memcpy (dummy, DEPRECATED_CALL_DUMMY_WORDS, + DEPRECATED_SIZEOF_CALL_DUMMY_WORDS); if (INNER_THAN (1, 2)) { /* Stack grows down */ @@ -252,40 +256,40 @@ legacy_push_dummy_code (struct gdbarch *gdbarch, } /* NOTE: cagney/2002-09-10: Don't bother re-adjusting the stack after allocating space for the call dummy. A target can specify - a SIZEOF_DUMMY1 (via SIZEOF_CALL_DUMMY_WORDS) such that all local - alignment requirements are met. */ + a SIZEOF_DUMMY1 (via DEPRECATED_SIZEOF_CALL_DUMMY_WORDS) such + that all local alignment requirements are met. */ /* Create a call sequence customized for this function and the number of arguments for it. */ { int i; - for (i = 0; i < (int) (SIZEOF_CALL_DUMMY_WORDS / sizeof (dummy[0])); + for (i = 0; i < (int) (DEPRECATED_SIZEOF_CALL_DUMMY_WORDS / sizeof (dummy[0])); i++) - store_unsigned_integer (&dummy1[i * REGISTER_SIZE], - REGISTER_SIZE, + store_unsigned_integer (&dummy1[i * DEPRECATED_REGISTER_SIZE], + DEPRECATED_REGISTER_SIZE, (ULONGEST) dummy[i]); } /* NOTE: cagney/2003-04-22: This computation of REAL_PC, BP_ADDR and DUMMY_ADDR is pretty messed up. It comes from constant tinkering - with the values. Instead a FIX_CALL_DUMMY replacement + with the values. Instead a DEPRECATED_FIX_CALL_DUMMY replacement (PUSH_DUMMY_BREAKPOINT?) should just do everything. */ #ifdef GDB_TARGET_IS_HPPA - real_pc = FIX_CALL_DUMMY (dummy1, start_sp, funaddr, nargs, args, - value_type, using_gcc); + real_pc = DEPRECATED_FIX_CALL_DUMMY (dummy1, start_sp, funaddr, nargs, args, + value_type, using_gcc); #else - if (FIX_CALL_DUMMY_P ()) + if (DEPRECATED_FIX_CALL_DUMMY_P ()) { /* gdb_assert (CALL_DUMMY_LOCATION == ON_STACK) true? */ - FIX_CALL_DUMMY (dummy1, start_sp, funaddr, nargs, args, value_type, - using_gcc); + DEPRECATED_FIX_CALL_DUMMY (dummy1, start_sp, funaddr, nargs, args, + value_type, using_gcc); } (*real_pc) = start_sp; #endif /* Yes, the offset is applied to the real_pc and not the dummy addr. Ulgh! Blame the HP/UX target. */ - (*bp_addr) = (*real_pc) + CALL_DUMMY_BREAKPOINT_OFFSET; + (*bp_addr) = (*real_pc) + DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET; /* Yes, the offset is applied to the real_pc and not the dummy_addr. Ulgh! Blame the HP/UX target. */ - (*real_pc) += CALL_DUMMY_START_OFFSET; + (*real_pc) += DEPRECATED_CALL_DUMMY_START_OFFSET; write_memory (start_sp, (char *) dummy1, sizeof_dummy1); if (DEPRECATED_USE_GENERIC_DUMMY_FRAMES) generic_save_call_dummy_addr (start_sp, start_sp + sizeof_dummy1); @@ -328,8 +332,8 @@ generic_push_dummy_code (struct gdbarch *gdbarch, return sp; } -/* Provide backward compatibility. Once FIX_CALL_DUMMY is eliminated, - this can be simplified. */ +/* Provide backward compatibility. Once DEPRECATED_FIX_CALL_DUMMY is + eliminated, this can be simplified. */ static CORE_ADDR push_dummy_code (struct gdbarch *gdbarch, @@ -341,7 +345,7 @@ push_dummy_code (struct gdbarch *gdbarch, if (gdbarch_push_dummy_code_p (gdbarch)) return gdbarch_push_dummy_code (gdbarch, sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr); - else if (FIX_CALL_DUMMY_P ()) + else if (DEPRECATED_FIX_CALL_DUMMY_P ()) return legacy_push_dummy_code (gdbarch, sp, funaddr, using_gcc, args, nargs, value_type, real_pc, bp_addr); else diff --git a/gdb/inferior.h b/gdb/inferior.h index e4286e4a8f3..1de3b25e39b 100644 --- a/gdb/inferior.h +++ b/gdb/inferior.h @@ -485,13 +485,14 @@ extern int deprecated_pc_in_call_dummy_at_entry_point (CORE_ADDR pc, Note that this macro is intended for targets (like HP-UX) which require more than a single breakpoint in their call dummies, and - therefore cannot use the CALL_DUMMY_BREAKPOINT_OFFSET mechanism. - - If a target does define CALL_DUMMY_BREAKPOINT_OFFSET, then this - default implementation of CALL_DUMMY_HAS_COMPLETED is sufficient. - Else, a target may wish to supply an implementation that works in - the presense of multiple breakpoints in its call dummy. - */ + therefore cannot use the DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET + mechanism. + + If a target does define DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET, + then this default implementation of CALL_DUMMY_HAS_COMPLETED is + sufficient. Else, a target may wish to supply an implementation + that works in the presense of multiple breakpoints in its call + dummy. */ #if !defined(CALL_DUMMY_HAS_COMPLETED) #define CALL_DUMMY_HAS_COMPLETED(pc, sp, frame_address) \ DEPRECATED_PC_IN_CALL_DUMMY((pc), (sp), (frame_address)) diff --git a/gdb/m68hc11-tdep.c b/gdb/m68hc11-tdep.c index 8b69c1113ff..fb174206e2c 100644 --- a/gdb/m68hc11-tdep.c +++ b/gdb/m68hc11-tdep.c @@ -1373,16 +1373,15 @@ m68hc11_gdbarch_init (struct gdbarch_info info, set_gdbarch_sp_regnum (gdbarch, HARD_SP_REGNUM); set_gdbarch_deprecated_fp_regnum (gdbarch, SOFT_FP_REGNUM); set_gdbarch_register_name (gdbarch, m68hc11_register_name); - set_gdbarch_register_size (gdbarch, 2); + set_gdbarch_deprecated_register_size (gdbarch, 2); set_gdbarch_register_bytes (gdbarch, M68HC11_ALL_REGS * 2); set_gdbarch_register_virtual_type (gdbarch, m68hc11_register_virtual_type); set_gdbarch_pseudo_register_read (gdbarch, m68hc11_pseudo_register_read); set_gdbarch_pseudo_register_write (gdbarch, m68hc11_pseudo_register_write); set_gdbarch_call_dummy_address (gdbarch, m68hc11_call_dummy_address); - set_gdbarch_call_dummy_words (gdbarch, m68hc11_call_dummy_words); - set_gdbarch_sizeof_call_dummy_words (gdbarch, - sizeof (m68hc11_call_dummy_words)); + set_gdbarch_deprecated_call_dummy_words (gdbarch, m68hc11_call_dummy_words); + set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof (m68hc11_call_dummy_words)); set_gdbarch_deprecated_get_saved_register (gdbarch, deprecated_generic_get_saved_register); set_gdbarch_deprecated_extract_return_value (gdbarch, m68hc11_extract_return_value); set_gdbarch_deprecated_push_arguments (gdbarch, m68hc11_push_arguments); diff --git a/gdb/m68k-tdep.c b/gdb/m68k-tdep.c index 63d076883b1..aabb13ab597 100644 --- a/gdb/m68k-tdep.c +++ b/gdb/m68k-tdep.c @@ -429,9 +429,9 @@ void m68k_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p) { - bfd_putb32 (fun, (unsigned char *) dummy + CALL_DUMMY_START_OFFSET + 2); + bfd_putb32 (fun, (unsigned char *) dummy + DEPRECATED_CALL_DUMMY_START_OFFSET + 2); bfd_putb32 (nargs * 4, - (unsigned char *) dummy + CALL_DUMMY_START_OFFSET + 8); + (unsigned char *) dummy + DEPRECATED_CALL_DUMMY_START_OFFSET + 8); } @@ -1025,7 +1025,7 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_deprecated_max_register_virtual_size (gdbarch, 12); set_gdbarch_register_virtual_type (gdbarch, m68k_register_virtual_type); set_gdbarch_register_name (gdbarch, m68k_register_name); - set_gdbarch_register_size (gdbarch, 4); + set_gdbarch_deprecated_register_size (gdbarch, 4); set_gdbarch_register_byte (gdbarch, m68k_register_byte); set_gdbarch_num_regs (gdbarch, 29); set_gdbarch_register_bytes_ok (gdbarch, m68k_register_bytes_ok); @@ -1038,14 +1038,14 @@ m68k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_deprecated_use_generic_dummy_frames (gdbarch, 0); set_gdbarch_call_dummy_location (gdbarch, ON_STACK); - set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 24); + set_gdbarch_deprecated_call_dummy_breakpoint_offset (gdbarch, 24); set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_on_stack); - set_gdbarch_call_dummy_length (gdbarch, 28); - set_gdbarch_call_dummy_start_offset (gdbarch, 12); + set_gdbarch_deprecated_call_dummy_length (gdbarch, 28); + set_gdbarch_deprecated_call_dummy_start_offset (gdbarch, 12); - set_gdbarch_call_dummy_words (gdbarch, call_dummy_words); - set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (call_dummy_words)); - set_gdbarch_fix_call_dummy (gdbarch, m68k_fix_call_dummy); + set_gdbarch_deprecated_call_dummy_words (gdbarch, call_dummy_words); + set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof (call_dummy_words)); + set_gdbarch_deprecated_fix_call_dummy (gdbarch, m68k_fix_call_dummy); set_gdbarch_deprecated_push_dummy_frame (gdbarch, m68k_push_dummy_frame); set_gdbarch_deprecated_pop_frame (gdbarch, m68k_pop_frame); diff --git a/gdb/mcore-tdep.c b/gdb/mcore-tdep.c index bc6e47553e4..484c1ec9d22 100644 --- a/gdb/mcore-tdep.c +++ b/gdb/mcore-tdep.c @@ -683,7 +683,8 @@ mcore_frame_chain (struct frame_info * fi) { /* The "FP" was saved on the stack. Don't forget to adjust the "FP" with the framesize to get a real FP. */ - callers_addr = read_memory_integer (get_frame_saved_regs (fi)[fp], REGISTER_SIZE) + callers_addr = read_memory_integer (get_frame_saved_regs (fi)[fp], + DEPRECATED_REGISTER_SIZE) + get_frame_extra_info (dummy)->framesize; } else @@ -767,7 +768,7 @@ mcore_find_callers_reg (struct frame_info *fi, int regnum) get_frame_base (fi), regnum); else if (get_frame_saved_regs (fi)[regnum] != 0) return read_memory_integer (get_frame_saved_regs (fi)[regnum], - REGISTER_SIZE); + DEPRECATED_REGISTER_SIZE); } return read_register (regnum); @@ -814,7 +815,7 @@ mcore_pop_frame (void) ULONGEST value; value = read_memory_unsigned_integer (get_frame_saved_regs (fi)[rn], - REGISTER_SIZE); + DEPRECATED_REGISTER_SIZE); write_register (rn, value); } } @@ -830,9 +831,9 @@ mcore_pop_frame (void) /* Setup arguments and PR for a call to the target. First six arguments go in FIRST_ARGREG -> LAST_ARGREG, subsequent args go on to the stack. - * Types with lengths greater than REGISTER_SIZE may not be split - between registers and the stack, and they must start in an even-numbered - register. Subsequent args will go onto the stack. + - Types with lengths greater than DEPRECATED_REGISTER_SIZE may not + be split between registers and the stack, and they must start in an + even-numbered register. Subsequent args will go onto the stack. * Structs may be split between registers and stack, left-aligned. @@ -884,21 +885,21 @@ mcore_push_arguments (int nargs, struct value **args, CORE_ADDR sp, numbered register. */ olen = len; - if (TYPE_CODE (type) != TYPE_CODE_STRUCT && len > REGISTER_SIZE && argreg % 2) + if (TYPE_CODE (type) != TYPE_CODE_STRUCT && len > DEPRECATED_REGISTER_SIZE && argreg % 2) { - mcore_insn_debug (("MCORE PUSH: %d > REGISTER_SIZE: and %s is not even\n", + mcore_insn_debug (("MCORE PUSH: %d > DEPRECATED_REGISTER_SIZE: and %s is not even\n", len, mcore_register_names[argreg])); argreg++; } - if ((argreg <= LAST_ARGREG && len <= (LAST_ARGREG - argreg + 1) * REGISTER_SIZE) + if ((argreg <= LAST_ARGREG && len <= (LAST_ARGREG - argreg + 1) * DEPRECATED_REGISTER_SIZE) || (TYPE_CODE (type) == TYPE_CODE_STRUCT)) { /* Something that will fit entirely into registers (or a struct which may be split between registers and stack). */ mcore_insn_debug (("MCORE PUSH: arg %d going into regs\n", argnum)); - if (TYPE_CODE (type) == TYPE_CODE_STRUCT && olen < REGISTER_SIZE) + if (TYPE_CODE (type) == TYPE_CODE_STRUCT && olen < DEPRECATED_REGISTER_SIZE) { /* Small structs must be right aligned within the register, the most significant bits are undefined. */ @@ -909,16 +910,16 @@ mcore_push_arguments (int nargs, struct value **args, CORE_ADDR sp, while (len > 0 && argreg <= LAST_ARGREG) { - write_register (argreg, extract_unsigned_integer (val, REGISTER_SIZE)); + write_register (argreg, extract_unsigned_integer (val, DEPRECATED_REGISTER_SIZE)); argreg++; - val += REGISTER_SIZE; - len -= REGISTER_SIZE; + val += DEPRECATED_REGISTER_SIZE; + len -= DEPRECATED_REGISTER_SIZE; } /* Any remainder for the stack is noted below... */ } else if (TYPE_CODE (VALUE_TYPE (args[argnum])) != TYPE_CODE_STRUCT - && len > REGISTER_SIZE) + && len > DEPRECATED_REGISTER_SIZE) { /* All subsequent args go onto the stack. */ mcore_insn_debug (("MCORE PUSH: does not fit into regs, going onto stack\n")); @@ -991,7 +992,7 @@ mcore_use_struct_convention (int gcc_p, struct type *type) CORE_ADDR mcore_extract_struct_value_address (char *regbuf) { - return extract_address (regbuf + REGISTER_BYTE (FIRST_ARGREG), REGISTER_SIZE); + return extract_address (regbuf + REGISTER_BYTE (FIRST_ARGREG), DEPRECATED_REGISTER_SIZE); } /* Given a function which returns a value of type TYPE, extract the @@ -1029,7 +1030,7 @@ mcore_store_return_value (struct type *type, char *valbuf) value_size = TYPE_LENGTH (type); /* Return value fits into registers. */ - return_size = (value_size + REGISTER_SIZE - 1) & ~(REGISTER_SIZE - 1); + return_size = (value_size + DEPRECATED_REGISTER_SIZE - 1) & ~(DEPRECATED_REGISTER_SIZE - 1); offset = REGISTER_BYTE (RETVAL_REGNUM) + (return_size - value_size); zeros = alloca (return_size); memset (zeros, 0, return_size); @@ -1101,7 +1102,7 @@ mcore_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Registers: */ /* All registers are 32 bits */ - set_gdbarch_register_size (gdbarch, MCORE_REG_SIZE); + set_gdbarch_deprecated_register_size (gdbarch, MCORE_REG_SIZE); set_gdbarch_deprecated_max_register_raw_size (gdbarch, MCORE_REG_SIZE); set_gdbarch_deprecated_max_register_virtual_size (gdbarch, MCORE_REG_SIZE); set_gdbarch_register_name (gdbarch, mcore_register_name); @@ -1117,8 +1118,8 @@ mcore_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* Call Dummies: */ - set_gdbarch_call_dummy_words (gdbarch, call_dummy_words); - set_gdbarch_sizeof_call_dummy_words (gdbarch, 0); + set_gdbarch_deprecated_call_dummy_words (gdbarch, call_dummy_words); + set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, 0); set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos); set_gdbarch_deprecated_saved_pc_after_call (gdbarch, mcore_saved_pc_after_call); set_gdbarch_function_start_offset (gdbarch, 0); diff --git a/gdb/mi/ChangeLog b/gdb/mi/ChangeLog index 765143d80ce..dc6669bca0a 100644 --- a/gdb/mi/ChangeLog +++ b/gdb/mi/ChangeLog @@ -1,3 +1,8 @@ +2003-05-05 Andrew Cagney <cagney@redhat.com> + + * mi-main.c (mi_cmd_data_write_register_values): Replace + REGISTER_SIZE with DEPRECATED_REGISTER_SIZE. + 2003-05-03 J. Brobecker <brobecker@gnat.com> From Thierry Schneider <tpschneider1@yahoo.com>: diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index 6ba069821ea..e13516a2dac 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -636,9 +636,9 @@ mi_cmd_data_write_register_values (char *command, char **argv, int argc) /* Get the value as a number */ value = parse_and_eval_address (argv[i + 1]); /* Get the value into an array */ - buffer = xmalloc (REGISTER_SIZE); + buffer = xmalloc (DEPRECATED_REGISTER_SIZE); old_chain = make_cleanup (xfree, buffer); - store_signed_integer (buffer, REGISTER_SIZE, value); + store_signed_integer (buffer, DEPRECATED_REGISTER_SIZE, value); /* Write it down */ deprecated_write_register_bytes (REGISTER_BYTE (regnum), buffer, REGISTER_RAW_SIZE (regnum)); /* Free the buffer. */ diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index e04283cf4d2..61f6c6c5544 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -5908,9 +5908,9 @@ mips_gdbarch_init (struct gdbarch_info info, set_gdbarch_call_dummy_address (gdbarch, mips_call_dummy_address); set_gdbarch_deprecated_push_return_address (gdbarch, mips_push_return_address); set_gdbarch_deprecated_pop_frame (gdbarch, mips_pop_frame); - set_gdbarch_fix_call_dummy (gdbarch, mips_fix_call_dummy); - set_gdbarch_call_dummy_words (gdbarch, mips_call_dummy_words); - set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (mips_call_dummy_words)); + set_gdbarch_deprecated_fix_call_dummy (gdbarch, mips_fix_call_dummy); + set_gdbarch_deprecated_call_dummy_words (gdbarch, mips_call_dummy_words); + set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof (mips_call_dummy_words)); set_gdbarch_deprecated_push_return_address (gdbarch, mips_push_return_address); set_gdbarch_frame_align (gdbarch, mips_frame_align); set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos); diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c index 8d7de772992..2f88fef5d95 100644 --- a/gdb/mn10300-tdep.c +++ b/gdb/mn10300-tdep.c @@ -695,7 +695,8 @@ mn10300_frame_chain (struct frame_info *fi) /* Our caller has a frame pointer. So find the frame in $a3 or in the stack. */ if (get_frame_saved_regs (fi)[A3_REGNUM]) - return (read_memory_integer (get_frame_saved_regs (fi)[A3_REGNUM], REGISTER_SIZE)); + return (read_memory_integer (get_frame_saved_regs (fi)[A3_REGNUM], + DEPRECATED_REGISTER_SIZE)); else return read_register (A3_REGNUM); } @@ -879,7 +880,8 @@ mn10300_frame_saved_pc (struct frame_info *fi) { int adjust = saved_regs_size (fi); - return (read_memory_integer (get_frame_base (fi) + adjust, REGISTER_SIZE)); + return (read_memory_integer (get_frame_base (fi) + adjust, + DEPRECATED_REGISTER_SIZE)); } /* Function: mn10300_init_extra_frame_info @@ -1144,9 +1146,8 @@ mn10300_gdbarch_init (struct gdbarch_info info, /* Registers. */ set_gdbarch_num_regs (gdbarch, num_regs); set_gdbarch_register_name (gdbarch, register_name); - set_gdbarch_register_size (gdbarch, 4); - set_gdbarch_register_bytes (gdbarch, - num_regs * gdbarch_register_size (gdbarch)); + set_gdbarch_deprecated_register_size (gdbarch, 4); + set_gdbarch_register_bytes (gdbarch, num_regs * gdbarch_deprecated_register_size (gdbarch)); set_gdbarch_deprecated_max_register_raw_size (gdbarch, 4); set_gdbarch_register_raw_size (gdbarch, mn10300_register_raw_size); set_gdbarch_register_byte (gdbarch, mn10300_register_byte); @@ -1186,9 +1187,8 @@ mn10300_gdbarch_init (struct gdbarch_info info, set_gdbarch_deprecated_target_read_fp (gdbarch, generic_target_read_sp); /* Calling functions in the inferior from GDB. */ - set_gdbarch_call_dummy_words (gdbarch, mn10300_call_dummy_words); - set_gdbarch_sizeof_call_dummy_words (gdbarch, - sizeof (mn10300_call_dummy_words)); + set_gdbarch_deprecated_call_dummy_words (gdbarch, mn10300_call_dummy_words); + set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof (mn10300_call_dummy_words)); set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point); set_gdbarch_deprecated_push_arguments (gdbarch, mn10300_push_arguments); set_gdbarch_reg_struct_has_addr (gdbarch, mn10300_reg_struct_has_addr); diff --git a/gdb/ns32k-tdep.c b/gdb/ns32k-tdep.c index 27d75999bca..ef2752d0b77 100644 --- a/gdb/ns32k-tdep.c +++ b/gdb/ns32k-tdep.c @@ -556,7 +556,7 @@ ns32k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_num_regs (gdbarch, NS32K_PC_REGNUM); set_gdbarch_num_regs (gdbarch, NS32K_PS_REGNUM); - set_gdbarch_register_size (gdbarch, NS32K_REGISTER_SIZE); + set_gdbarch_deprecated_register_size (gdbarch, NS32K_REGISTER_SIZE); set_gdbarch_register_raw_size (gdbarch, ns32k_register_raw_size); set_gdbarch_deprecated_max_register_raw_size (gdbarch, NS32K_MAX_REGISTER_RAW_SIZE); set_gdbarch_register_virtual_size (gdbarch, ns32k_register_virtual_size); @@ -595,11 +595,11 @@ ns32k_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_deprecated_push_dummy_frame (gdbarch, ns32k_push_dummy_frame); set_gdbarch_deprecated_pop_frame (gdbarch, ns32k_pop_frame); set_gdbarch_call_dummy_location (gdbarch, ON_STACK); - set_gdbarch_call_dummy_words (gdbarch, ns32k_call_dummy_words); - set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof_ns32k_call_dummy_words); - set_gdbarch_fix_call_dummy (gdbarch, ns32k_fix_call_dummy); - set_gdbarch_call_dummy_start_offset (gdbarch, 3); - set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 15); + set_gdbarch_deprecated_call_dummy_words (gdbarch, ns32k_call_dummy_words); + set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof_ns32k_call_dummy_words); + set_gdbarch_deprecated_fix_call_dummy (gdbarch, ns32k_fix_call_dummy); + set_gdbarch_deprecated_call_dummy_start_offset (gdbarch, 3); + set_gdbarch_deprecated_call_dummy_breakpoint_offset (gdbarch, 15); set_gdbarch_deprecated_use_generic_dummy_frames (gdbarch, 0); set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_on_stack); diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c index 019284901ac..7a692e7b285 100644 --- a/gdb/rs6000-tdep.c +++ b/gdb/rs6000-tdep.c @@ -2878,7 +2878,7 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_num_regs (gdbarch, v->nregs); set_gdbarch_num_pseudo_regs (gdbarch, v->npregs); set_gdbarch_register_name (gdbarch, rs6000_register_name); - set_gdbarch_register_size (gdbarch, wordsize); + set_gdbarch_deprecated_register_size (gdbarch, wordsize); set_gdbarch_register_bytes (gdbarch, off); set_gdbarch_register_byte (gdbarch, rs6000_register_byte); set_gdbarch_register_raw_size (gdbarch, rs6000_register_raw_size); @@ -2900,7 +2900,7 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_long_double_bit (gdbarch, 8 * TARGET_CHAR_BIT); set_gdbarch_char_signed (gdbarch, 0); - set_gdbarch_fix_call_dummy (gdbarch, rs6000_fix_call_dummy); + set_gdbarch_deprecated_fix_call_dummy (gdbarch, rs6000_fix_call_dummy); set_gdbarch_frame_align (gdbarch, rs6000_frame_align); set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos); set_gdbarch_deprecated_push_return_address (gdbarch, ppc_push_return_address); diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c index f5a424de397..f836c1b0516 100644 --- a/gdb/s390-tdep.c +++ b/gdb/s390-tdep.c @@ -1150,7 +1150,7 @@ void s390_store_return_value (struct type *valtype, char *valbuf) { int arglen; - char *reg_buff = alloca (max (S390_FPR_SIZE, REGISTER_SIZE)), *value; + char *reg_buff = alloca (max (S390_FPR_SIZE, DEPRECATED_REGISTER_SIZE)), *value; if (TYPE_CODE (valtype) == TYPE_CODE_FLT) { @@ -1876,14 +1876,13 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos); set_gdbarch_deprecated_push_return_address (gdbarch, s390_push_return_address); - set_gdbarch_sizeof_call_dummy_words (gdbarch, - sizeof (s390_call_dummy_words)); - set_gdbarch_call_dummy_words (gdbarch, s390_call_dummy_words); + set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof (s390_call_dummy_words)); + set_gdbarch_deprecated_call_dummy_words (gdbarch, s390_call_dummy_words); switch (info.bfd_arch_info->mach) { case bfd_mach_s390_31: - set_gdbarch_register_size (gdbarch, 4); + set_gdbarch_deprecated_register_size (gdbarch, 4); set_gdbarch_register_raw_size (gdbarch, s390_register_raw_size); set_gdbarch_register_virtual_size (gdbarch, s390_register_raw_size); set_gdbarch_register_virtual_type (gdbarch, s390_register_virtual_type); @@ -1892,7 +1891,7 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_register_bytes (gdbarch, S390_REGISTER_BYTES); break; case bfd_mach_s390_64: - set_gdbarch_register_size (gdbarch, 8); + set_gdbarch_deprecated_register_size (gdbarch, 8); set_gdbarch_register_raw_size (gdbarch, s390x_register_raw_size); set_gdbarch_register_virtual_size (gdbarch, s390x_register_raw_size); set_gdbarch_register_virtual_type (gdbarch, diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c index 6bb0237cccd..00b52b6465f 100644 --- a/gdb/sh-tdep.c +++ b/gdb/sh-tdep.c @@ -1770,7 +1770,7 @@ sh_init_extra_frame_info (int fromleaf, struct frame_info *fi) get_frame_extra_info (fi)->return_pc = deprecated_read_register_dummy (get_frame_pc (fi), get_frame_base (fi), PC_REGNUM); - get_frame_extra_info (fi)->f_offset = -(CALL_DUMMY_LENGTH + 4); + get_frame_extra_info (fi)->f_offset = -(DEPRECATED_CALL_DUMMY_LENGTH + 4); get_frame_extra_info (fi)->leaf_function = 0; return; } @@ -1801,7 +1801,7 @@ sh64_init_extra_frame_info (int fromleaf, struct frame_info *fi) get_frame_extra_info (fi)->return_pc = deprecated_read_register_dummy (get_frame_pc (fi), get_frame_base (fi), PC_REGNUM); - get_frame_extra_info (fi)->f_offset = -(CALL_DUMMY_LENGTH + 4); + get_frame_extra_info (fi)->f_offset = -(DEPRECATED_CALL_DUMMY_LENGTH + 4); get_frame_extra_info (fi)->leaf_function = 0; return; } @@ -4367,7 +4367,7 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_sp_regnum (gdbarch, 15); set_gdbarch_deprecated_fp_regnum (gdbarch, 14); set_gdbarch_pc_regnum (gdbarch, 16); - set_gdbarch_register_size (gdbarch, 4); + set_gdbarch_deprecated_register_size (gdbarch, 4); set_gdbarch_register_bytes (gdbarch, SH_DEFAULT_NUM_REGS * 4); set_gdbarch_deprecated_do_registers_info (gdbarch, sh_do_registers_info); set_gdbarch_breakpoint_from_pc (gdbarch, sh_breakpoint_from_pc); @@ -4586,7 +4586,7 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) /* the number of real registers is the same whether we are in ISA16(compact) or ISA32(media). */ set_gdbarch_num_regs (gdbarch, SIM_SH64_NR_REGS); - set_gdbarch_register_size (gdbarch, 8); /*????*/ + set_gdbarch_deprecated_register_size (gdbarch, 8); /*????*/ set_gdbarch_register_bytes (gdbarch, ((SIM_SH64_NR_FP_REGS + 1) * 4) + (SIM_SH64_NR_REGS - SIM_SH64_NR_FP_REGS -1) * 8); @@ -4652,8 +4652,8 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_double_bit (gdbarch, 8 * TARGET_CHAR_BIT); set_gdbarch_long_double_bit (gdbarch, 8 * TARGET_CHAR_BIT); - set_gdbarch_call_dummy_words (gdbarch, sh_call_dummy_words); - set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (sh_call_dummy_words)); + set_gdbarch_deprecated_call_dummy_words (gdbarch, sh_call_dummy_words); + set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof (sh_call_dummy_words)); set_gdbarch_deprecated_push_return_address (gdbarch, sh_push_return_address); diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c index 1d379e9ec19..8e2c4ad57a8 100644 --- a/gdb/sol-thread.c +++ b/gdb/sol-thread.c @@ -647,9 +647,9 @@ sol_thread_store_registers (int regno) if (regno != -1) { /* Not writing all the regs */ /* save new register value */ - char* old_value = (char*) alloca (REGISTER_SIZE); + char* old_value = (char*) alloca (DEPRECATED_REGISTER_SIZE); memcpy (old_value, &deprecated_registers[REGISTER_BYTE (regno)], - REGISTER_SIZE); + DEPRECATED_REGISTER_SIZE); val = p_td_thr_getgregs (&thandle, gregset); if (val != TD_OK) @@ -662,7 +662,7 @@ sol_thread_store_registers (int regno) /* restore new register value */ memcpy (&deprecated_registers[REGISTER_BYTE (regno)], old_value, - REGISTER_SIZE); + DEPRECATED_REGISTER_SIZE); #if 0 /* thread_db doesn't seem to handle this right */ diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c index b3081cd40ed..00f9f1687b4 100644 --- a/gdb/sparc-tdep.c +++ b/gdb/sparc-tdep.c @@ -2357,9 +2357,10 @@ sparc_store_return_value (struct type *type, char *valbuf) For structs and unions, if the function was compiled with Sun cc, it expects 'unimp' after the call. But gcc doesn't use that - (twisted) convention. So leave a nop there for gcc (FIX_CALL_DUMMY - can assume it is operating on a pristine CALL_DUMMY, not one that - has already been customized for a different function). */ + (twisted) convention. So leave a nop there for gcc + (DEPRECATED_FIX_CALL_DUMMY can assume it is operating on a pristine + CALL_DUMMY, not one that has already been customized for a + different function). */ void sparc_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, @@ -2392,10 +2393,10 @@ sparc_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, { store_unsigned_integer (dummy + CALL_DUMMY_CALL_OFFSET + 8, 4, TYPE_LENGTH (value_type) & 0x1fff); - set_gdbarch_call_dummy_breakpoint_offset (current_gdbarch, 0x30); + set_gdbarch_deprecated_call_dummy_breakpoint_offset (current_gdbarch, 0x30); } else - set_gdbarch_call_dummy_breakpoint_offset (current_gdbarch, 0x2c); + set_gdbarch_deprecated_call_dummy_breakpoint_offset (current_gdbarch, 0x2c); if (!(GDB_TARGET_IS_SPARC64)) { @@ -3054,7 +3055,7 @@ sparc_gdbarch_fix_call_dummy (char *dummy, static CORE_ADDR sparc_call_dummy_address (void) { - return (CALL_DUMMY_START_OFFSET) + CALL_DUMMY_BREAKPOINT_OFFSET; + return (DEPRECATED_CALL_DUMMY_START_OFFSET) + DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET; } /* Supply the Y register number to those that need it. */ @@ -3163,7 +3164,7 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_decr_pc_after_break (gdbarch, 0); set_gdbarch_double_bit (gdbarch, 8 * TARGET_CHAR_BIT); set_gdbarch_deprecated_extract_struct_value_address (gdbarch, sparc_extract_struct_value_address); - set_gdbarch_fix_call_dummy (gdbarch, sparc_gdbarch_fix_call_dummy); + set_gdbarch_deprecated_fix_call_dummy (gdbarch, sparc_gdbarch_fix_call_dummy); set_gdbarch_float_bit (gdbarch, 4 * TARGET_CHAR_BIT); set_gdbarch_deprecated_fp_regnum (gdbarch, SPARC_FP_REGNUM); set_gdbarch_fp0_regnum (gdbarch, SPARC_FP0_REGNUM); @@ -3221,8 +3222,8 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) #ifdef SPARC32_CALL_DUMMY_ON_STACK set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_on_stack); set_gdbarch_call_dummy_address (gdbarch, sparc_call_dummy_address); - set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0x30); - set_gdbarch_call_dummy_length (gdbarch, 0x38); + set_gdbarch_deprecated_call_dummy_breakpoint_offset (gdbarch, 0x30); + set_gdbarch_deprecated_call_dummy_length (gdbarch, 0x38); /* NOTE: cagney/2003-05-01: Using the just added push_dummy_code architecture method, it is now possible to implement a @@ -3276,10 +3277,10 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) are explained in Appendix D.3. */ set_gdbarch_call_dummy_location (gdbarch, ON_STACK); - set_gdbarch_call_dummy_words (gdbarch, call_dummy_32); + set_gdbarch_deprecated_call_dummy_words (gdbarch, call_dummy_32); #else set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point); - set_gdbarch_call_dummy_words (gdbarch, call_dummy_nil); + set_gdbarch_deprecated_call_dummy_words (gdbarch, call_dummy_nil); #endif set_gdbarch_deprecated_call_dummy_stack_adjust (gdbarch, 68); set_gdbarch_frame_args_skip (gdbarch, 68); @@ -3293,14 +3294,14 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_register_byte (gdbarch, sparc32_register_byte); set_gdbarch_register_raw_size (gdbarch, sparc32_register_size); - set_gdbarch_register_size (gdbarch, 4); + set_gdbarch_deprecated_register_size (gdbarch, 4); set_gdbarch_register_virtual_size (gdbarch, sparc32_register_size); set_gdbarch_register_virtual_type (gdbarch, sparc32_register_virtual_type); #ifdef SPARC32_CALL_DUMMY_ON_STACK - set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (call_dummy_32)); + set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof (call_dummy_32)); #else - set_gdbarch_sizeof_call_dummy_words (gdbarch, 0); + set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, 0); #endif set_gdbarch_stack_align (gdbarch, sparc32_stack_align); set_gdbarch_deprecated_extra_stack_alignment_needed (gdbarch, 1); @@ -3323,14 +3324,14 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) #ifdef SPARC64_CALL_DUMMY_ON_STACK set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_on_stack); set_gdbarch_call_dummy_address (gdbarch, sparc_call_dummy_address); - set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 8 * 4); - set_gdbarch_call_dummy_length (gdbarch, 192); + set_gdbarch_deprecated_call_dummy_breakpoint_offset (gdbarch, 8 * 4); + set_gdbarch_deprecated_call_dummy_length (gdbarch, 192); set_gdbarch_call_dummy_location (gdbarch, ON_STACK); - set_gdbarch_call_dummy_start_offset (gdbarch, 148); - set_gdbarch_call_dummy_words (gdbarch, call_dummy_64); + set_gdbarch_deprecated_call_dummy_start_offset (gdbarch, 148); + set_gdbarch_deprecated_call_dummy_words (gdbarch, call_dummy_64); #else set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point); - set_gdbarch_call_dummy_words (gdbarch, call_dummy_nil); + set_gdbarch_deprecated_call_dummy_words (gdbarch, call_dummy_nil); #endif set_gdbarch_deprecated_call_dummy_stack_adjust (gdbarch, 128); set_gdbarch_frame_args_skip (gdbarch, 136); @@ -3347,14 +3348,14 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) to assume they all are (since most of them are). */ set_gdbarch_register_byte (gdbarch, sparc64_register_byte); set_gdbarch_register_raw_size (gdbarch, sparc64_register_size); - set_gdbarch_register_size (gdbarch, 8); + set_gdbarch_deprecated_register_size (gdbarch, 8); set_gdbarch_register_virtual_size (gdbarch, sparc64_register_size); set_gdbarch_register_virtual_type (gdbarch, sparc64_register_virtual_type); #ifdef SPARC64_CALL_DUMMY_ON_STACK - set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (call_dummy_64)); + set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof (call_dummy_64)); #else - set_gdbarch_sizeof_call_dummy_words (gdbarch, 0); + set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, 0); #endif set_gdbarch_stack_align (gdbarch, sparc64_stack_align); set_gdbarch_deprecated_extra_stack_alignment_needed (gdbarch, 1); diff --git a/gdb/target.c b/gdb/target.c index 4de246cc174..885e3efd353 100644 --- a/gdb/target.c +++ b/gdb/target.c @@ -1215,7 +1215,7 @@ find_default_create_inferior (char *exec_file, char *allargs, char **env) static int default_region_size_ok_for_hw_watchpoint (int byte_count) { - return (byte_count <= REGISTER_SIZE); + return (byte_count <= DEPRECATED_REGISTER_SIZE); } static int diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index cdef9e05dc6..a9a0436bd94 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2003-05-05 Andrew Cagney <cagney@redhat.com> + + * gdb.base/watchpoint.exp: Rename CALL_DUMMY_BREAKPOINT_OFFSET to + DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET in comments. + 2003-05-02 Elena Zannoni <ezannoni@redhat.com> * gdb.base/charset.exp: Update based on new behavior of set/show diff --git a/gdb/testsuite/gdb.base/watchpoint.exp b/gdb/testsuite/gdb.base/watchpoint.exp index c5e37d451a5..fd5d8f286b2 100644 --- a/gdb/testsuite/gdb.base/watchpoint.exp +++ b/gdb/testsuite/gdb.base/watchpoint.exp @@ -377,7 +377,7 @@ proc test_stepping {} { # The problem is that GDB confuses stepping through the call # dummy with hitting the breakpoint at the end of the call dummy. # Will be fixed once all architectures define - # CALL_DUMMY_BREAKPOINT_OFFSET. + # DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET. setup_xfail "*-*-*" # This doesn't occur if the call dummy starts with a call, # because we are out of the dummy by the first time the inferior @@ -388,7 +388,7 @@ proc test_stepping {} { clear_xfail "m68*-*-*" clear_xfail "i*86*-*-*" clear_xfail "vax-*-*" - # The following architectures define CALL_DUMMY_BREAKPOINT_OFFSET. + # The following architectures define DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET. clear_xfail "alpha-*-*" clear_xfail "mips*-*-*" clear_xfail "sparc-*-*" diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c index edfec072979..1828d1c74df 100644 --- a/gdb/v850-tdep.c +++ b/gdb/v850-tdep.c @@ -1229,7 +1229,7 @@ v850_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_deprecated_fp_regnum (gdbarch, E_FP_REGNUM); set_gdbarch_pc_regnum (gdbarch, E_PC_REGNUM); set_gdbarch_register_name (gdbarch, v850_register_name); - set_gdbarch_register_size (gdbarch, v850_reg_size); + set_gdbarch_deprecated_register_size (gdbarch, v850_reg_size); set_gdbarch_register_bytes (gdbarch, E_ALL_REGS_SIZE); set_gdbarch_register_byte (gdbarch, v850_register_byte); set_gdbarch_register_raw_size (gdbarch, v850_register_raw_size); @@ -1277,9 +1277,9 @@ v850_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_deprecated_store_return_value (gdbarch, v850_store_return_value); set_gdbarch_deprecated_extract_struct_value_address (gdbarch, v850_extract_struct_value_address); set_gdbarch_use_struct_convention (gdbarch, v850_use_struct_convention); - set_gdbarch_call_dummy_words (gdbarch, call_dummy_nil); - set_gdbarch_sizeof_call_dummy_words (gdbarch, 0); - set_gdbarch_fix_call_dummy (gdbarch, v850_fix_call_dummy); + set_gdbarch_deprecated_call_dummy_words (gdbarch, call_dummy_nil); + set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, 0); + set_gdbarch_deprecated_fix_call_dummy (gdbarch, v850_fix_call_dummy); set_gdbarch_breakpoint_from_pc (gdbarch, v850_breakpoint_from_pc); set_gdbarch_int_bit (gdbarch, 4 * TARGET_CHAR_BIT); diff --git a/gdb/valops.c b/gdb/valops.c index d8261c822f0..5523c5dbedb 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -962,7 +962,7 @@ value_ind (struct value *arg1) CORE_ADDR push_word (CORE_ADDR sp, ULONGEST word) { - register int len = REGISTER_SIZE; + register int len = DEPRECATED_REGISTER_SIZE; char *buffer = alloca (MAX_REGISTER_RAW_SIZE); store_unsigned_integer (buffer, len, word); diff --git a/gdb/vax-tdep.c b/gdb/vax-tdep.c index 4f1fcc9ab2c..54ca48dd58a 100644 --- a/gdb/vax-tdep.c +++ b/gdb/vax-tdep.c @@ -50,7 +50,6 @@ static gdbarch_deprecated_extract_struct_value_address_ftype vax_extract_struct_value_address; static gdbarch_deprecated_push_dummy_frame_ftype vax_push_dummy_frame; -static gdbarch_fix_call_dummy_ftype vax_fix_call_dummy; /* Return 1 if P points to an invalid floating point value. LEN is the length in bytes -- not relevant on the Vax. */ @@ -627,7 +626,7 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_ps_regnum (gdbarch, VAX_PS_REGNUM); set_gdbarch_register_name (gdbarch, vax_register_name); - set_gdbarch_register_size (gdbarch, VAX_REGISTER_SIZE); + set_gdbarch_deprecated_register_size (gdbarch, VAX_REGISTER_SIZE); set_gdbarch_register_bytes (gdbarch, VAX_REGISTER_BYTES); set_gdbarch_register_byte (gdbarch, vax_register_byte); set_gdbarch_register_raw_size (gdbarch, vax_register_raw_size); @@ -667,10 +666,10 @@ vax_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_deprecated_push_dummy_frame (gdbarch, vax_push_dummy_frame); set_gdbarch_deprecated_pop_frame (gdbarch, vax_pop_frame); set_gdbarch_call_dummy_location (gdbarch, ON_STACK); - set_gdbarch_call_dummy_words (gdbarch, vax_call_dummy_words); - set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof_vax_call_dummy_words); - set_gdbarch_fix_call_dummy (gdbarch, vax_fix_call_dummy); - set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 7); + set_gdbarch_deprecated_call_dummy_words (gdbarch, vax_call_dummy_words); + set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, sizeof_vax_call_dummy_words); + set_gdbarch_deprecated_fix_call_dummy (gdbarch, vax_fix_call_dummy); + set_gdbarch_deprecated_call_dummy_breakpoint_offset (gdbarch, 7); set_gdbarch_deprecated_use_generic_dummy_frames (gdbarch, 0); set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_on_stack); diff --git a/gdb/x86-64-tdep.c b/gdb/x86-64-tdep.c index 5872d5411bf..7dd5f1e11d2 100644 --- a/gdb/x86-64-tdep.c +++ b/gdb/x86-64-tdep.c @@ -954,7 +954,7 @@ x86_64_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) in use on any of the supported x86-64 targets. */ set_gdbarch_register_name (gdbarch, x86_64_register_name); - set_gdbarch_register_size (gdbarch, 8); + set_gdbarch_deprecated_register_size (gdbarch, 8); /* Total amount of space needed to store our copies of the machine's register (SIZEOF_GREGS + SIZEOF_FPU_REGS + SIZEOF_FPU_CTRL_REGS + diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c index 1ff96a4ec22..d6aa0183e1e 100644 --- a/gdb/xstormy16-tdep.c +++ b/gdb/xstormy16-tdep.c @@ -1038,7 +1038,7 @@ xstormy16_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_deprecated_fp_regnum (gdbarch, E_FP_REGNUM); set_gdbarch_pc_regnum (gdbarch, E_PC_REGNUM); set_gdbarch_register_name (gdbarch, xstormy16_register_name); - set_gdbarch_register_size (gdbarch, xstormy16_reg_size); + set_gdbarch_deprecated_register_size (gdbarch, xstormy16_reg_size); set_gdbarch_register_bytes (gdbarch, E_ALL_REGS_SIZE); set_gdbarch_register_byte (gdbarch, xstormy16_register_byte); set_gdbarch_register_raw_size (gdbarch, xstormy16_register_raw_size); @@ -1092,8 +1092,8 @@ xstormy16_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) set_gdbarch_deprecated_extract_struct_value_address (gdbarch, xstormy16_extract_struct_value_address); set_gdbarch_use_struct_convention (gdbarch, xstormy16_use_struct_convention); - set_gdbarch_call_dummy_words (gdbarch, call_dummy_words); - set_gdbarch_sizeof_call_dummy_words (gdbarch, 0); + set_gdbarch_deprecated_call_dummy_words (gdbarch, call_dummy_words); + set_gdbarch_deprecated_sizeof_call_dummy_words (gdbarch, 0); set_gdbarch_breakpoint_from_pc (gdbarch, xstormy16_breakpoint_from_pc); set_gdbarch_char_signed (gdbarch, 0); |