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]

[patch/rfc] Delete prologue_frameless_p


This patch replaces a call to PROLOGUE_FRAMELESS_P with the default implementation. Turns out that the only architecture setting this method (cris) was setting it to the default anyway.

I'll commit in a few days,
Andrew
2004-02-09  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
	to generic_prologue_frameless_p.
	* arch-utils.h (generic_prologue_frameless_p): Delete declaration.
	* arch-utils.c (generic_prologue_frameless_p): Delete function.

Index: arch-utils.c
===================================================================
RCS file: /cvs/src/src/gdb/arch-utils.c,v
retrieving revision 1.108
diff -u -r1.108 arch-utils.c
--- arch-utils.c	14 Nov 2003 21:22:42 -0000	1.108
+++ arch-utils.c	9 Feb 2004 21:27:10 -0000
@@ -143,12 +143,6 @@
   *rem_len = gdb_len;
 }
 
-int
-generic_prologue_frameless_p (CORE_ADDR ip)
-{
-  return ip == SKIP_PROLOGUE (ip);
-}
-
 /* Helper functions for INNER_THAN */
 
 int
Index: arch-utils.h
===================================================================
RCS file: /cvs/src/src/gdb/arch-utils.h,v
retrieving revision 1.65
diff -u -r1.65 arch-utils.h
--- arch-utils.h	23 Nov 2003 21:32:42 -0000	1.65
+++ arch-utils.h	9 Feb 2004 21:27:10 -0000
@@ -61,11 +61,6 @@
 /* Typical remote_translate_xfer_address */
 extern gdbarch_remote_translate_xfer_address_ftype generic_remote_translate_xfer_address;
 
-/* Generic implementation of prologue_frameless_p.  Just calls
-   SKIP_PROLOG and checks the return value to see if it actually
-   changed. */
-extern gdbarch_prologue_frameless_p_ftype generic_prologue_frameless_p;
-
 /* The only possible cases for inner_than. */
 extern int core_addr_lessthan (CORE_ADDR lhs, CORE_ADDR rhs);
 extern int core_addr_greaterthan (CORE_ADDR lhs, CORE_ADDR rhs);
Index: blockframe.c
===================================================================
RCS file: /cvs/src/src/gdb/blockframe.c,v
retrieving revision 1.87
diff -u -r1.87 blockframe.c
--- blockframe.c	4 Feb 2004 16:34:51 -0000	1.87
+++ blockframe.c	9 Feb 2004 21:27:10 -0000
@@ -199,9 +199,16 @@
   if (func_start)
     {
       func_start += FUNCTION_START_OFFSET;
-      /* This is faster, since only care whether there *is* a
-         prologue, not how long it is.  */
-      return PROLOGUE_FRAMELESS_P (func_start);
+      /* 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
Index: cris-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/cris-tdep.c,v
retrieving revision 1.96
diff -u -r1.96 cris-tdep.c
--- cris-tdep.c	18 Jan 2004 00:01:32 -0000	1.96
+++ cris-tdep.c	9 Feb 2004 21:27:10 -0000
@@ -4259,7 +4259,6 @@
   set_gdbarch_deprecated_frame_init_saved_regs (gdbarch, cris_frame_init_saved_regs);
   set_gdbarch_deprecated_init_extra_frame_info (gdbarch, cris_init_extra_frame_info);
   set_gdbarch_skip_prologue (gdbarch, cris_skip_prologue);
-  set_gdbarch_prologue_frameless_p (gdbarch, generic_prologue_frameless_p);
   
   /* The stack grows downward.  */
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.294
diff -u -r1.294 gdbarch.sh
--- gdbarch.sh	26 Jan 2004 20:52:10 -0000	1.294
+++ gdbarch.sh	9 Feb 2004 21:27:14 -0000
@@ -640,7 +640,6 @@
 F:2:DEPRECATED_INIT_EXTRA_FRAME_INFO:void:deprecated_init_extra_frame_info:int fromleaf, struct frame_info *frame:fromleaf, frame
 #
 f:2:SKIP_PROLOGUE:CORE_ADDR:skip_prologue:CORE_ADDR ip:ip::0:0
-f:2:PROLOGUE_FRAMELESS_P:int:prologue_frameless_p:CORE_ADDR ip:ip::0:generic_prologue_frameless_p::0
 f:2:INNER_THAN:int:inner_than:CORE_ADDR lhs, CORE_ADDR rhs:lhs, rhs::0:0
 f::BREAKPOINT_FROM_PC:const unsigned char *:breakpoint_from_pc:CORE_ADDR *pcptr, int *lenptr:pcptr, lenptr:::0:
 M:2:ADJUST_BREAKPOINT_ADDRESS:CORE_ADDR:adjust_breakpoint_address:CORE_ADDR bpaddr:bpaddr

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