]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2004-02-12 Andrew Cagney <cagney@redhat.com>
authorAndrew Cagney <cagney@redhat.com>
Thu, 12 Feb 2004 18:43:09 +0000 (18:43 +0000)
committerAndrew Cagney <cagney@redhat.com>
Thu, 12 Feb 2004 18:43:09 +0000 (18:43 +0000)
* 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.

gdb/ChangeLog
gdb/arm-tdep.c
gdb/cris-tdep.c
gdb/remote-rdi.c
gdb/rs6000-tdep.c
gdb/s390-tdep.c

index 8040ed1d5531a357b2308da0ae85a296815b3a1c..31a3ff8636174bc185d04228a267ff10aafcc015 100644 (file)
@@ -1,3 +1,19 @@
+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.
index 7c2e74faa7c0687c69880883506f27ec40aad264..52b57f73de394b54461249b800610af4ab17a35c 100644 (file)
@@ -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.  */
 
index 5b1f9db682f26656aa26b0aeeeebbaf249c7631d..2e55c9b88f2312dbe23854a0572c5838f92a6ace 100644 (file)
@@ -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;
@@ -292,18 +286,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)
 {
@@ -328,12 +310,6 @@ cris_get_asr_shift_steps (unsigned long value)
   return (value & 0x3F);
 }
 
-static int
-cris_get_asr_quick_shift_steps (unsigned short insn)
-{
-  return (insn & 0x1F);
-}
-
 static int
 cris_get_clear_size (unsigned short insn)
 {
@@ -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.  */
 
index aa005a7f52ba38475624ea9dffe9f6ac172accef..268ed328f6c944e2c80e4437e63526dc93bd0e9c 100644 (file)
@@ -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;
 \f
-
-/* 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)
     }
 }
 \f
-/* 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).  */
index 17436435c05b98b723f77f643d3b63160615c2cd..438b7a44491609c07b2585c8021cf4bc5ffc99cb 100644 (file)
@@ -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
index a0a055d8b613519caa8799989bf82e212a2afd9f..d85e640ae42a3a57f615c14aa0e8bbafbfb3c352 100644 (file)
@@ -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)
 {