2004-08-02 Andrew Cagney <cagney@gnu.org>
authorAndrew Cagney <cagney@redhat.com>
Mon, 2 Aug 2004 19:44:40 +0000 (19:44 +0000)
committerAndrew Cagney <cagney@redhat.com>
Mon, 2 Aug 2004 19:44:40 +0000 (19:44 +0000)
* gdbarch.sh (deprecated_frameless_function_invocation): Delete.
* gdbarch.h, gdbarch.c: Re-generate.
* arm-tdep.c  (arm_frameless_function_invocation): Delete.
(arm_gdbarch_init) Do not set frameless function invocation.
* frame.h (legacy_frameless_look_for_prologue): Delete declaration.
* blockframe.c (legacy_frameless_look_for_prologue): Delete function.
* frv-tdep.c (frv_frameless_function_invocation): Delete.
(frv_gdbarch_init): Do not set frameless function invocation.
* sh64-tdep.c (sh64_gdbarch_init): Ditto.
* sh-tdep.c (sh_gdbarch_init): Ditto.
* m32r-tdep.c (m32r_gdbarch_init): Ditto.
* h8300-tdep.c (h8300_gdbarch_init): Ditto.
* avr-tdep.c (avr_gdbarch_init): Ditto.

13 files changed:
gdb/ChangeLog
gdb/arm-tdep.c
gdb/avr-tdep.c
gdb/blockframe.c
gdb/frame.h
gdb/frv-tdep.c
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/h8300-tdep.c
gdb/m32r-tdep.c
gdb/sh-tdep.c
gdb/sh64-tdep.c

index e2caf80..3a19835 100644 (file)
@@ -1,5 +1,19 @@
 2004-08-02  Andrew Cagney  <cagney@gnu.org>
 
+       * gdbarch.sh (deprecated_frameless_function_invocation): Delete.
+       * gdbarch.h, gdbarch.c: Re-generate.
+       * arm-tdep.c    (arm_frameless_function_invocation): Delete.
+       (arm_gdbarch_init) Do not set frameless function invocation.
+       * frame.h (legacy_frameless_look_for_prologue): Delete declaration.
+       * blockframe.c (legacy_frameless_look_for_prologue): Delete function.
+       * frv-tdep.c (frv_frameless_function_invocation): Delete.
+       (frv_gdbarch_init): Do not set frameless function invocation.
+       * sh64-tdep.c (sh64_gdbarch_init): Ditto.
+       * sh-tdep.c (sh_gdbarch_init): Ditto.
+       * m32r-tdep.c (m32r_gdbarch_init): Ditto.
+       * h8300-tdep.c (h8300_gdbarch_init): Ditto.
+       * avr-tdep.c (avr_gdbarch_init): Ditto.
+
        * blockframe.c (legacy_frame_chain_valid): Delete function.
 
        * dummy-frame.c (struct dummy_frame): Delete call_lo, call_hi, top
index 9a758b3..952b18f 100644 (file)
@@ -269,39 +269,6 @@ arm_saved_pc_after_call (struct frame_info *frame)
   return ADDR_BITS_REMOVE (read_register (ARM_LR_REGNUM));
 }
 
-/* Determine whether the function invocation represented by FI has a
-   frame on the stack associated with it.  If it does return zero,
-   otherwise return 1.  */
-
-static int
-arm_frameless_function_invocation (struct frame_info *fi)
-{
-  CORE_ADDR func_start, after_prologue;
-  int frameless;
-
-  /* Sometimes we have functions that do a little setup (like saving the
-     vN registers with the stmdb instruction, but DO NOT set up a frame.
-     The symbol table will report this as a prologue.  However, it is
-     important not to try to parse these partial frames as frames, or we
-     will get really confused.
-
-     So I will demand 3 instructions between the start & end of the
-     prologue before I call it a real prologue, i.e. at least
-       mov ip, sp,
-       stmdb sp!, {}
-       sub sp, ip, #4.  */
-
-  func_start = (get_frame_func (fi) + DEPRECATED_FUNCTION_START_OFFSET);
-  after_prologue = SKIP_PROLOGUE (func_start);
-
-  /* There are some frameless functions whose first two instructions
-     follow the standard APCS form, in which case after_prologue will
-     be func_start + 8.  */
-
-  frameless = (after_prologue < func_start + 12);
-  return frameless;
-}
-
 /* A typical Thumb prologue looks like this:
    push    {r7, lr}
    add     sp, sp, #-28
@@ -2719,8 +2686,6 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_unwind_pc (gdbarch, arm_unwind_pc);
   set_gdbarch_unwind_sp (gdbarch, arm_unwind_sp);
 
-  set_gdbarch_deprecated_frameless_function_invocation (gdbarch, arm_frameless_function_invocation);
-
   frame_base_set_default (gdbarch, &arm_normal_base);
 
   /* Address manipulation.  */
index d64596f..563ecf2 100644 (file)
@@ -1297,8 +1297,6 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
   set_gdbarch_breakpoint_from_pc (gdbarch, avr_breakpoint_from_pc);
 
-  set_gdbarch_deprecated_frameless_function_invocation (gdbarch, legacy_frameless_look_for_prologue);
-
   frame_unwind_append_sniffer (gdbarch, avr_frame_sniffer);
   frame_base_set_default (gdbarch, &avr_frame_base);
 
index 7b48194..7d9618f 100644 (file)
@@ -135,44 +135,6 @@ inside_entry_func (struct frame_info *this_frame)
   return (get_frame_func (this_frame) == entry_point_address ());
 }
 
-/* Return nonzero if the function for this frame lacks a prologue.
-   Many machines can define DEPRECATED_FRAMELESS_FUNCTION_INVOCATION
-   to just call this function.  */
-
-int
-legacy_frameless_look_for_prologue (struct frame_info *frame)
-{
-  CORE_ADDR func_start;
-
-  func_start = get_frame_func (frame);
-  if (func_start)
-    {
-      func_start += DEPRECATED_FUNCTION_START_OFFSET;
-      /* NOTE: cagney/2004-02-09: Eliminated per-architecture
-         PROLOGUE_FRAMELESS_P call as architectures with custom
-         implementations had all been deleted.  Eventually even this
-         function can go - GDB no longer tries to differentiate
-         between framed, frameless and stackless functions.  They are
-         all now considered equally evil :-^.  */
-      /* If skipping the prologue ends up skips nothing, there must be
-         no prologue and hence no code creating a frame.  There for
-         the function is "frameless" :-/.  */
-      return func_start == SKIP_PROLOGUE (func_start);
-    }
-  else if (get_frame_pc (frame) == 0)
-    /* A frame with a zero PC is usually created by dereferencing a
-       NULL function pointer, normally causing an immediate core dump
-       of the inferior. Mark function as frameless, as the inferior
-       has no chance of setting up a stack frame.  */
-    return 1;
-  else
-    /* If we can't find the start of the function, we don't really
-       know whether the function is frameless, but we should be able
-       to get a reasonable (i.e. best we can do under the
-       circumstances) backtrace by saying that it isn't.  */
-    return 0;
-}
-
 /* Return the innermost lexical block in execution
    in a specified stack frame.  The frame address is assumed valid.
 
index 942f7b1..6dda5ff 100644 (file)
@@ -556,8 +556,6 @@ extern struct symbol *get_frame_function (struct frame_info *);
 
 extern CORE_ADDR get_pc_function_start (CORE_ADDR);
 
-extern int legacy_frameless_look_for_prologue (struct frame_info *);
-
 extern struct frame_info *find_relative_frame (struct frame_info *, int *);
 
 extern void show_and_print_stack_frame (struct frame_info *fi, int print_level,
index dc423f8..7bc09f0 100644 (file)
@@ -1066,12 +1066,6 @@ frv_store_struct_return (CORE_ADDR addr, CORE_ADDR sp)
   write_register (struct_return_regnum, addr);
 }
 
-static int
-frv_frameless_function_invocation (struct frame_info *frame)
-{
-  return legacy_frameless_look_for_prologue (frame);
-}
-
 static CORE_ADDR
 frv_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
 {
@@ -1496,8 +1490,6 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_breakpoint_from_pc (gdbarch, frv_breakpoint_from_pc);
   set_gdbarch_adjust_breakpoint_address (gdbarch, frv_gdbarch_adjust_breakpoint_address);
 
-  set_gdbarch_deprecated_frameless_function_invocation (gdbarch, frv_frameless_function_invocation);
-
   set_gdbarch_deprecated_use_struct_convention (gdbarch, always_use_struct_convention);
   set_gdbarch_extract_return_value (gdbarch, frv_extract_return_value);
 
index af6b0a3..0345070 100644 (file)
@@ -200,7 +200,6 @@ struct gdbarch
   CORE_ADDR deprecated_function_start_offset;
   gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address;
   CORE_ADDR frame_args_skip;
-  gdbarch_deprecated_frameless_function_invocation_ftype *deprecated_frameless_function_invocation;
   gdbarch_deprecated_frame_chain_ftype *deprecated_frame_chain;
   gdbarch_deprecated_frame_chain_valid_ftype *deprecated_frame_chain_valid;
   gdbarch_deprecated_frame_saved_pc_ftype *deprecated_frame_saved_pc;
@@ -346,7 +345,6 @@ struct gdbarch startup_gdbarch =
   0,  /* deprecated_function_start_offset */
   generic_remote_translate_xfer_address,  /* remote_translate_xfer_address */
   0,  /* frame_args_skip */
-  0,  /* deprecated_frameless_function_invocation */
   0,  /* deprecated_frame_chain */
   0,  /* deprecated_frame_chain_valid */
   0,  /* deprecated_frame_saved_pc */
@@ -625,7 +623,6 @@ verify_gdbarch (struct gdbarch *current_gdbarch)
   /* Skip verify of deprecated_function_start_offset, invalid_p == 0 */
   /* Skip verify of remote_translate_xfer_address, invalid_p == 0 */
   /* Skip verify of frame_args_skip, invalid_p == 0 */
-  /* Skip verify of deprecated_frameless_function_invocation, has predicate */
   /* Skip verify of deprecated_frame_chain, has predicate */
   /* Skip verify of deprecated_frame_chain_valid, has predicate */
   /* Skip verify of deprecated_frame_saved_pc, has predicate */
@@ -1049,24 +1046,6 @@ gdbarch_dump (struct gdbarch *current_gdbarch, struct ui_file *file)
   fprintf_unfiltered (file,
                       "gdbarch_dump: deprecated_frame_saved_pc = <0x%lx>\n",
                       (long) current_gdbarch->deprecated_frame_saved_pc);
-#ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P()",
-                      XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P ()));
-#endif
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: gdbarch_deprecated_frameless_function_invocation_p() = %d\n",
-                      gdbarch_deprecated_frameless_function_invocation_p (current_gdbarch));
-#ifdef DEPRECATED_FRAMELESS_FUNCTION_INVOCATION
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "DEPRECATED_FRAMELESS_FUNCTION_INVOCATION(fi)",
-                      XSTRING (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION (fi)));
-#endif
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: deprecated_frameless_function_invocation = <0x%lx>\n",
-                      (long) current_gdbarch->deprecated_frameless_function_invocation);
 #ifdef DEPRECATED_FUNCTION_START_OFFSET
   fprintf_unfiltered (file,
                       "gdbarch_dump: DEPRECATED_FUNCTION_START_OFFSET # %s\n",
@@ -3743,30 +3722,6 @@ set_gdbarch_frame_args_skip (struct gdbarch *gdbarch,
 }
 
 int
-gdbarch_deprecated_frameless_function_invocation_p (struct gdbarch *gdbarch)
-{
-  gdb_assert (gdbarch != NULL);
-  return gdbarch->deprecated_frameless_function_invocation != NULL;
-}
-
-int
-gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi)
-{
-  gdb_assert (gdbarch != NULL);
-  gdb_assert (gdbarch->deprecated_frameless_function_invocation != NULL);
-  if (gdbarch_debug >= 2)
-    fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_frameless_function_invocation called\n");
-  return gdbarch->deprecated_frameless_function_invocation (fi);
-}
-
-void
-set_gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch,
-                                                      gdbarch_deprecated_frameless_function_invocation_ftype deprecated_frameless_function_invocation)
-{
-  gdbarch->deprecated_frameless_function_invocation = deprecated_frameless_function_invocation;
-}
-
-int
 gdbarch_deprecated_frame_chain_p (struct gdbarch *gdbarch)
 {
   gdb_assert (gdbarch != NULL);
index c87886c..afddb7a 100644 (file)
@@ -1347,35 +1347,6 @@ extern void set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, CORE_ADDR fram
 #define FRAME_ARGS_SKIP (gdbarch_frame_args_skip (current_gdbarch))
 #endif
 
-/* DEPRECATED_FRAMELESS_FUNCTION_INVOCATION is not needed.  The new
-   frame code works regardless of the type of frame - frameless,
-   stackless, or normal. */
-
-#if defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION)
-/* Legacy for systems yet to multi-arch DEPRECATED_FRAMELESS_FUNCTION_INVOCATION */
-#if !defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P)
-#define DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P() (1)
-#endif
-#endif
-
-extern int gdbarch_deprecated_frameless_function_invocation_p (struct gdbarch *gdbarch);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P)
-#error "Non multi-arch definition of DEPRECATED_FRAMELESS_FUNCTION_INVOCATION"
-#endif
-#if !defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P)
-#define DEPRECATED_FRAMELESS_FUNCTION_INVOCATION_P() (gdbarch_deprecated_frameless_function_invocation_p (current_gdbarch))
-#endif
-
-typedef int (gdbarch_deprecated_frameless_function_invocation_ftype) (struct frame_info *fi);
-extern int gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch, struct frame_info *fi);
-extern void set_gdbarch_deprecated_frameless_function_invocation (struct gdbarch *gdbarch, gdbarch_deprecated_frameless_function_invocation_ftype *deprecated_frameless_function_invocation);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION)
-#error "Non multi-arch definition of DEPRECATED_FRAMELESS_FUNCTION_INVOCATION"
-#endif
-#if !defined (DEPRECATED_FRAMELESS_FUNCTION_INVOCATION)
-#define DEPRECATED_FRAMELESS_FUNCTION_INVOCATION(fi) (gdbarch_deprecated_frameless_function_invocation (current_gdbarch, fi))
-#endif
-
 #if defined (DEPRECATED_FRAME_CHAIN)
 /* Legacy for systems yet to multi-arch DEPRECATED_FRAME_CHAIN */
 #if !defined (DEPRECATED_FRAME_CHAIN_P)
index be18fb8..563781d 100755 (executable)
@@ -607,10 +607,6 @@ v:=:CORE_ADDR:deprecated_function_start_offset::::0:::0
 m::void:remote_translate_xfer_address:struct regcache *regcache, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len:regcache, gdb_addr, gdb_len, rem_addr, rem_len:::generic_remote_translate_xfer_address::0
 #
 v:=:CORE_ADDR:frame_args_skip::::0:::0
-# DEPRECATED_FRAMELESS_FUNCTION_INVOCATION is not needed.  The new
-# frame code works regardless of the type of frame - frameless,
-# stackless, or normal.
-F:=:int:deprecated_frameless_function_invocation:struct frame_info *fi:fi
 F:=:CORE_ADDR:deprecated_frame_chain:struct frame_info *frame:frame
 F:=:int:deprecated_frame_chain_valid:CORE_ADDR chain, struct frame_info *thisframe:chain, thisframe
 # DEPRECATED_FRAME_SAVED_PC has been replaced by UNWIND_PC.  Please
index 300b99b..0d6c3bc 100644 (file)
@@ -1317,7 +1317,6 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
    */
   /* Stack grows up. */
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
-  set_gdbarch_deprecated_frameless_function_invocation (gdbarch, legacy_frameless_look_for_prologue);
 
   set_gdbarch_deprecated_extract_struct_value_address (gdbarch, h8300_extract_struct_value_address);
   set_gdbarch_deprecated_use_struct_convention (gdbarch, always_use_struct_convention);
index 7094c64..fd5e9dc 100644 (file)
@@ -940,8 +940,6 @@ m32r_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_memory_remove_breakpoint (gdbarch,
                                        m32r_memory_remove_breakpoint);
 
-  set_gdbarch_deprecated_frameless_function_invocation (gdbarch, legacy_frameless_look_for_prologue);
-
   set_gdbarch_frame_align (gdbarch, m32r_frame_align);
 
   frame_unwind_append_sniffer (gdbarch, m32r_frame_sniffer);
index 90e25c6..9cce79b 100644 (file)
@@ -2233,7 +2233,6 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
   set_gdbarch_push_dummy_call (gdbarch, sh_push_dummy_call_nofpu);
 
-  set_gdbarch_deprecated_frameless_function_invocation (gdbarch, legacy_frameless_look_for_prologue);
   set_gdbarch_believe_pcc_promotion (gdbarch, 1);
 
   set_gdbarch_frame_align (gdbarch, sh_frame_align);
index 5809a01..a753213 100644 (file)
@@ -2837,7 +2837,6 @@ sh64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_skip_prologue (gdbarch, sh_skip_prologue);
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
 
-  set_gdbarch_deprecated_frameless_function_invocation (gdbarch, legacy_frameless_look_for_prologue);
   set_gdbarch_believe_pcc_promotion (gdbarch, 1);
 
   set_gdbarch_deprecated_frame_saved_pc (gdbarch, sh_frame_saved_pc);