diff options
author | Andrew Cagney <cagney@redhat.com> | 2004-02-12 18:43:09 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2004-02-12 18:43:09 +0000 |
commit | 6a7760b682901be7ae970252843156da407a6d5d (patch) | |
tree | 5522a905930b3b1b08c8a675df5396564d9c2ba4 /gdb/arm-tdep.c | |
parent | 49efadf5a0ebdf0300cc8dfb2a42bf4603037ae1 (diff) | |
download | gdb-6a7760b682901be7ae970252843156da407a6d5d.zip gdb-6a7760b682901be7ae970252843156da407a6d5d.tar.gz gdb-6a7760b682901be7ae970252843156da407a6d5d.tar.bz2 |
2004-02-12 Andrew Cagney <cagney@redhat.com>
* remote-rdi.c (arm_rdi_start_remote): Delete unused function.
(arm_rdi_interrupt, arm_rdi_interrupt_twice): Ditto.
(interrupt_query): Ditto.
(ofunc): Delete unused variable.
* cris-tdep.c (cris_abi): Delete unused function.
(reg_pop_op, move_reg_to_mem_index_inc_op): Ditto.
(cris_get_wide_opcode, cris_get_short_size): Ditto.
(cris_get_asr_quick_shift_steps): Ditto.
(cris_skip_prologue_frameless_p): Ditto.
* arm-tdep.c (arm_push_return_address): Delete unused function.
(arm_push_dummy_frame, arm_fix_call_dummy): Ditto.
* rs6000-tdep.c (rs6000_pc_in_call_dummy): Delete unused function.
* s390-tdep.c (s390_function_start): Delete unused function.
Diffstat (limited to 'gdb/arm-tdep.c')
-rw-r--r-- | gdb/arm-tdep.c | 109 |
1 files changed, 0 insertions, 109 deletions
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 7c2e74f..52b57f7 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -1188,51 +1188,6 @@ arm_unwind_sp (struct gdbarch *gdbarch, struct frame_info *this_frame) return frame_unwind_register_unsigned (this_frame, ARM_SP_REGNUM); } -/* Set the return address for a generic dummy frame. ARM uses the - entry point. */ - -static CORE_ADDR -arm_push_return_address (CORE_ADDR pc, CORE_ADDR sp) -{ - write_register (ARM_LR_REGNUM, entry_point_address ()); - return sp; -} - -/* Push an empty stack frame, to record the current PC, etc. */ - -static void -arm_push_dummy_frame (void) -{ - CORE_ADDR old_sp = read_register (ARM_SP_REGNUM); - CORE_ADDR sp = old_sp; - CORE_ADDR fp, prologue_start; - int regnum; - - /* Push the two dummy prologue instructions in reverse order, - so that they'll be in the correct low-to-high order in memory. */ - /* sub fp, ip, #4 */ - sp = push_word (sp, 0xe24cb004); - /* stmdb sp!, {r0-r10, fp, ip, lr, pc} */ - prologue_start = sp = push_word (sp, 0xe92ddfff); - - /* Push a pointer to the dummy prologue + 12, because when stm - instruction stores the PC, it stores the address of the stm - instruction itself plus 12. */ - fp = sp = push_word (sp, prologue_start + 12); - - /* Push the processor status. */ - sp = push_word (sp, read_register (ARM_PS_REGNUM)); - - /* Push all 16 registers starting with r15. */ - for (regnum = ARM_PC_REGNUM; regnum >= 0; regnum--) - sp = push_word (sp, read_register (regnum)); - - /* Update fp (for both Thumb and ARM) and sp. */ - write_register (ARM_FP_REGNUM, fp); - write_register (THUMB_FP_REGNUM, fp); - write_register (ARM_SP_REGNUM, sp); -} - /* DEPRECATED_CALL_DUMMY_WORDS: This sequence of words is the instructions @@ -1266,70 +1221,6 @@ arm_set_call_dummy_breakpoint_offset (void) set_gdbarch_deprecated_call_dummy_breakpoint_offset (current_gdbarch, 8); } -/* Fix up the call dummy, based on whether the processor is currently - in Thumb or ARM mode, and whether the target function is Thumb or - ARM. There are three different situations requiring three - different dummies: - - * ARM calling ARM: uses the call dummy in tm-arm.h, which has already - been copied into the dummy parameter to this function. - * ARM calling Thumb: uses the call dummy in tm-arm.h, but with the - "mov pc,r4" instruction patched to be a "bx r4" instead. - * Thumb calling anything: uses the Thumb dummy defined below, which - works for calling both ARM and Thumb functions. - - All three call dummies expect to receive the target function - address in R4, with the low bit set if it's a Thumb function. */ - -static void -arm_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, - struct value **args, struct type *type, int gcc_p) -{ - static short thumb_dummy[4] = - { - 0xf000, 0xf801, /* bl label */ - 0xdf18, /* swi 24 */ - 0x4720, /* label: bx r4 */ - }; - static unsigned long arm_bx_r4 = 0xe12fff14; /* bx r4 instruction */ - - /* Set flag indicating whether the current PC is in a Thumb function. */ - caller_is_thumb = arm_pc_is_thumb (read_pc ()); - arm_set_call_dummy_breakpoint_offset (); - - /* If the target function is Thumb, set the low bit of the function - address. And if the CPU is currently in ARM mode, patch the - second instruction of call dummy to use a BX instruction to - switch to Thumb mode. */ - target_is_thumb = arm_pc_is_thumb (fun); - if (target_is_thumb) - { - fun |= 1; - if (!caller_is_thumb) - store_unsigned_integer (dummy + 4, sizeof (arm_bx_r4), arm_bx_r4); - } - - /* If the CPU is currently in Thumb mode, use the Thumb call dummy - instead of the ARM one that's already been copied. This will - work for both Thumb and ARM target functions. */ - if (caller_is_thumb) - { - int i; - char *p = dummy; - int len = sizeof (thumb_dummy) / sizeof (thumb_dummy[0]); - - for (i = 0; i < len; i++) - { - store_unsigned_integer (p, sizeof (thumb_dummy[0]), thumb_dummy[i]); - p += sizeof (thumb_dummy[0]); - } - } - - /* Put the target address in r4; the call dummy will copy this to - the PC. */ - write_register (4, fun); -} - /* When arguments must be pushed onto the stack, they go on in reverse order. The code below implements a FILO (stack) to do this. */ |