aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-02-12 18:43:09 +0000
committerAndrew Cagney <cagney@redhat.com>2004-02-12 18:43:09 +0000
commit6a7760b682901be7ae970252843156da407a6d5d (patch)
tree5522a905930b3b1b08c8a675df5396564d9c2ba4
parent49efadf5a0ebdf0300cc8dfb2a42bf4603037ae1 (diff)
downloadgdb-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.
-rw-r--r--gdb/ChangeLog16
-rw-r--r--gdb/arm-tdep.c109
-rw-r--r--gdb/cris-tdep.c91
-rw-r--r--gdb/remote-rdi.c40
-rw-r--r--gdb/rs6000-tdep.c11
-rw-r--r--gdb/s390-tdep.c16
6 files changed, 16 insertions, 267 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 8040ed1..31a3ff8 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,21 @@
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.
+
+2004-02-12 Andrew Cagney <cagney@redhat.com>
+
* gdbarch.sh (PROLOGUE_FRAMELESS_P): Delete.
gdbarch.h, gdbarch.c: Re-generate.
* cris-tdep.c (cris_gdbarch_init): Do not set prologue_frameless_p
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. */
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index 5b1f9db..2e55c9b 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -172,12 +172,6 @@ cris_mode (void)
return (gdbarch_tdep (current_gdbarch)->cris_mode);
}
-static const char *
-cris_abi (void)
-{
- return (gdbarch_tdep (current_gdbarch)->cris_abi);
-}
-
struct frame_extra_info
{
CORE_ADDR return_pc;
@@ -293,18 +287,6 @@ cris_get_operand1 (unsigned short insn)
/* Additional functions in order to handle opcodes. */
static int
-cris_get_wide_opcode (unsigned short insn)
-{
- return ((insn & 0x03E0) >> 5);
-}
-
-static int
-cris_get_short_size (unsigned short insn)
-{
- return ((insn & 0x0010) >> 4);
-}
-
-static int
cris_get_quick_value (unsigned short insn)
{
return (insn & 0x003F);
@@ -329,12 +311,6 @@ cris_get_asr_shift_steps (unsigned long value)
}
static int
-cris_get_asr_quick_shift_steps (unsigned short insn)
-{
- return (insn & 0x1F);
-}
-
-static int
cris_get_clear_size (unsigned short insn)
{
return ((insn) & 0xC000);
@@ -717,16 +693,6 @@ cris_skip_prologue (CORE_ADDR pc)
return cris_skip_prologue_main (pc, 0);
}
-/* As cris_skip_prologue, but stops as soon as it knows that the function
- has a frame. Its result is equal to its input pc if the function is
- frameless, unequal otherwise. */
-
-static CORE_ADDR
-cris_skip_prologue_frameless_p (CORE_ADDR pc)
-{
- return cris_skip_prologue_main (pc, 1);
-}
-
/* Given a PC value corresponding to the start of a function, return the PC
of the first instruction after the function prologue. */
@@ -2776,63 +2742,6 @@ move_reg_to_mem_movem_op (unsigned short inst, inst_env_type *inst_env)
inst_env->disable_interrupt = 0;
}
-/* Handles the pop instruction to a general register.
- POP is a assembler macro for MOVE.D [SP+], Rd. */
-
-static void
-reg_pop_op (unsigned short inst, inst_env_type *inst_env)
-{
- /* POP can't have a prefix. */
- if (inst_env->prefix_found)
- {
- inst_env->invalid = 1;
- return;
- }
- if (cris_get_operand2 (inst) == REG_PC)
- {
- /* It's invalid to change the PC in a delay slot. */
- if (inst_env->slot_needed)
- {
- inst_env->invalid = 1;
- return;
- }
- inst_env->reg[REG_PC] =
- read_memory_unsigned_integer (inst_env->reg[REG_SP], 4);
- }
- inst_env->slot_needed = 0;
- inst_env->prefix_found = 0;
- inst_env->xflag_found = 0;
- inst_env->disable_interrupt = 0;
-}
-
-/* Handles moves from register to memory. */
-
-static void
-move_reg_to_mem_index_inc_op (unsigned short inst, inst_env_type *inst_env)
-{
- /* Check if we have a prefix. */
- if (inst_env->prefix_found)
- {
- /* The only thing that can change the PC is an assign. */
- check_assign (inst, inst_env);
- }
- else if ((cris_get_operand1 (inst) == REG_PC)
- && (cris_get_mode (inst) == AUTOINC_MODE))
- {
- /* It's invalid to change the PC in a delay slot. */
- if (inst_env->slot_needed)
- {
- inst_env->invalid = 1;
- return;
- }
- process_autoincrement (cris_get_size (inst), inst, inst_env);
- }
- inst_env->slot_needed = 0;
- inst_env->prefix_found = 0;
- inst_env->xflag_found = 0;
- inst_env->disable_interrupt = 0;
-}
-
/* Handles the intructions that's not yet implemented, by setting
inst_env->invalid to true. */
diff --git a/gdb/remote-rdi.c b/gdb/remote-rdi.c
index aa005a7..268ed32 100644
--- a/gdb/remote-rdi.c
+++ b/gdb/remote-rdi.c
@@ -66,8 +66,6 @@ static void arm_rdi_fetch_registers (int regno);
static void arm_rdi_resume (ptid_t pid, int step,
enum target_signal siggnal);
-static int arm_rdi_start_remote (char *dummy);
-
static void arm_rdi_open (char *name, int from_tty);
static void arm_rdi_create_inferior (char *exec_file, char *args, char **env);
@@ -82,12 +80,6 @@ static void arm_rdi_kill (void);
static void arm_rdi_detach (char *args, int from_tty);
-static void arm_rdi_interrupt (int signo);
-
-static void arm_rdi_interrupt_twice (int signo);
-
-static void interrupt_query (void);
-
static int arm_rdi_insert_breakpoint (CORE_ADDR, char *);
static int arm_rdi_remove_breakpoint (CORE_ADDR, char *);
@@ -130,15 +122,6 @@ static struct local_bp_list_entry
}
*local_bp_list;
-
-/* Stub for catch_errors. */
-
-static int
-arm_rdi_start_remote (char *dummy)
-{
- return 1;
-}
-
/* Helper callbacks for the "host interface" structure. RDI functions call
these to forward output from the target system and so forth. */
@@ -479,29 +462,6 @@ arm_rdi_resume (ptid_t ptid, int step, enum target_signal siggnal)
}
}
-/* Send ^C to target to halt it. Target will respond, and send us a
- packet. */
-
-static void
-arm_rdi_interrupt (int signo)
-{
-}
-
-static void (*ofunc) ();
-
-/* The user typed ^C twice. */
-static void
-arm_rdi_interrupt_twice (int signo)
-{
-}
-
-/* Ask the user what to do when an interrupt is received. */
-
-static void
-interrupt_query (void)
-{
-}
-
/* Wait until the remote machine stops, then return, storing status in
STATUS just as `wait' would. Returns "pid" (though it's not clear
what, if anything, that means in the case of this target). */
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 1743643..438b7a4 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -2046,17 +2046,6 @@ rs6000_extract_struct_value_address (struct regcache *regcache)
return 0;
}
-/* Return whether PC is in a dummy function call.
-
- FIXME: This just checks for the end of the stack, which is broken
- for things like stepping through gcc nested function stubs. */
-
-static int
-rs6000_pc_in_call_dummy (CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR fp)
-{
- return sp < pc && pc < fp;
-}
-
/* Hook called when a new child process is started. */
void
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index a0a055d..d85e640 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -1565,22 +1565,6 @@ s390_sniff_pc_function_start (CORE_ADDR pc, struct frame_info *fi)
}
-
-static CORE_ADDR
-s390_function_start (struct frame_info *fi)
-{
- CORE_ADDR function_start = 0;
-
- if (get_frame_extra_info (fi) && get_frame_extra_info (fi)->initialised)
- function_start = get_frame_extra_info (fi)->function_start;
- else if (get_frame_pc (fi))
- function_start = get_frame_func (fi);
- return function_start;
-}
-
-
-
-
static int
s390_frameless_function_invocation (struct frame_info *fi)
{