This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[obish] Garbage collect deprecated_frameless_function_invocation


While still being set, it is no longer called. This removes it and the corresponding dead code.

committed,
Andrew
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.

Index: arm-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/arm-tdep.c,v
retrieving revision 1.181
diff -p -u -r1.181 arm-tdep.c
--- arm-tdep.c	1 Aug 2004 19:34:50 -0000	1.181
+++ arm-tdep.c	2 Aug 2004 19:42:54 -0000
@@ -269,39 +269,6 @@ arm_saved_pc_after_call (struct frame_in
   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 in
   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: avr-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/avr-tdep.c,v
retrieving revision 1.82
diff -p -u -r1.82 avr-tdep.c
--- avr-tdep.c	31 Jul 2004 21:53:16 -0000	1.82
+++ avr-tdep.c	2 Aug 2004 19:42:54 -0000
@@ -1297,8 +1297,6 @@ avr_gdbarch_init (struct gdbarch_info in
 
   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: blockframe.c
===================================================================
RCS file: /cvs/src/src/gdb/blockframe.c,v
retrieving revision 1.105
diff -p -u -r1.105 blockframe.c
--- blockframe.c	2 Aug 2004 18:58:20 -0000	1.105
+++ blockframe.c	2 Aug 2004 19:42:54 -0000
@@ -135,44 +135,6 @@ inside_entry_func (struct frame_info *th
   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: frame.h
===================================================================
RCS file: /cvs/src/src/gdb/frame.h,v
retrieving revision 1.141
diff -p -u -r1.141 frame.h
--- frame.h	2 Aug 2004 17:39:53 -0000	1.141
+++ frame.h	2 Aug 2004 19:42:54 -0000
@@ -556,8 +556,6 @@ extern struct symbol *get_frame_function
 
 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: frv-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/frv-tdep.c,v
retrieving revision 1.88
diff -p -u -r1.88 frv-tdep.c
--- frv-tdep.c	31 Jul 2004 21:53:17 -0000	1.88
+++ frv-tdep.c	2 Aug 2004 19:42:54 -0000
@@ -1066,12 +1066,6 @@ frv_store_struct_return (CORE_ADDR addr,
   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 in
   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: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.337
diff -p -u -r1.337 gdbarch.sh
--- gdbarch.sh	26 Jul 2004 14:53:00 -0000	1.337
+++ gdbarch.sh	2 Aug 2004 19:42:54 -0000
@@ -607,10 +607,6 @@ v:=:CORE_ADDR:deprecated_function_start_
 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: h8300-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/h8300-tdep.c,v
retrieving revision 1.96
diff -p -u -r1.96 h8300-tdep.c
--- h8300-tdep.c	20 Jun 2004 17:18:05 -0000	1.96
+++ h8300-tdep.c	2 Aug 2004 19:42:54 -0000
@@ -1317,7 +1317,6 @@ h8300_gdbarch_init (struct gdbarch_info 
    */
   /* 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: m32r-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/m32r-tdep.c,v
retrieving revision 1.29
diff -p -u -r1.29 m32r-tdep.c
--- m32r-tdep.c	31 Jul 2004 21:53:17 -0000	1.29
+++ m32r-tdep.c	2 Aug 2004 19:42:54 -0000
@@ -940,8 +940,6 @@ m32r_gdbarch_init (struct gdbarch_info i
   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: sh-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sh-tdep.c,v
retrieving revision 1.171
diff -p -u -r1.171 sh-tdep.c
--- sh-tdep.c	1 Aug 2004 21:38:03 -0000	1.171
+++ sh-tdep.c	2 Aug 2004 19:42:54 -0000
@@ -2233,7 +2233,6 @@ sh_gdbarch_init (struct gdbarch_info inf
 
   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: sh64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sh64-tdep.c,v
retrieving revision 1.29
diff -p -u -r1.29 sh64-tdep.c
--- sh64-tdep.c	20 Jun 2004 17:18:06 -0000	1.29
+++ sh64-tdep.c	2 Aug 2004 19:42:58 -0000
@@ -2837,7 +2837,6 @@ sh64_gdbarch_init (struct gdbarch_info i
   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);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]