mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-09-10 03:42:22 +08:00
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.
This commit is contained in:
102
gdb/hppa-tdep.c
102
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);
|
||||
|
Reference in New Issue
Block a user