This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[patch] Deprecate frame_in_dummy()
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Sun, 10 Nov 2002 10:34:56 -0500
- Subject: [patch] Deprecate frame_in_dummy()
Hello,
Stumbled across this function. The opening stanza is:
if (USE_GENERIC_DUMMY_FRAMES)
return an_alterate_interface ()
and all architectures should be updated to generic dummy frames.
Unfortunatly a few, eg SPARC, still haven't and that's all that is
stopping me zap the function entirely :-)
The comments that go with it drop a hint as to a patch I'm currently
brewing ;-)
committed,
Andrew
2002-11-10 Andrew Cagney <ac131313@redhat.com>
* breakpoint.h (deprecated_frame_in_dummy): Rename frame_in_dummy.
* stack.c (print_frame_info_base): Update.
(print_frame_info_base, frame_info): Update.
* sparc-tdep.c (sparc_init_extra_frame_info): Update.
(sparc_frame_saved_pc): Update.
* ada-lang.c (find_printable_frame): Update.
* breakpoint.c (deprecated_frame_in_dummy): Update.
Index: ada-lang.c
===================================================================
RCS file: /cvs/src/src/gdb/ada-lang.c,v
retrieving revision 1.10
diff -u -r1.10 ada-lang.c
--- ada-lang.c 24 Oct 2002 21:02:53 -0000 1.10
+++ ada-lang.c 10 Nov 2002 15:25:45 -0000
@@ -5040,7 +5040,7 @@
find_pc_line (fi->pc,
fi->next != NULL
&& !fi->next->signal_handler_caller
- && !frame_in_dummy (fi->next));
+ && !deprecated_frame_in_dummy (fi->next));
if (sal.symtab && !is_ada_runtime_file (sal.symtab->filename))
{
#if defined(__alpha__) && defined(__osf__) && !defined(VXWORKS_TARGET)
Index: breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.92
diff -u -r1.92 breakpoint.c
--- breakpoint.c 24 Oct 2002 21:02:53 -0000 1.92
+++ breakpoint.c 10 Nov 2002 15:25:51 -0000
@@ -1688,7 +1688,7 @@
bp_call_dummy breakpoint. */
int
-frame_in_dummy (struct frame_info *frame)
+deprecated_frame_in_dummy (struct frame_info *frame)
{
struct breakpoint *b;
Index: breakpoint.h
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.h,v
retrieving revision 1.13
diff -u -r1.13 breakpoint.h
--- breakpoint.h 16 Aug 2002 15:37:54 -0000 1.13
+++ breakpoint.h 10 Nov 2002 15:25:52 -0000
@@ -528,7 +528,16 @@
extern int breakpoint_inserted_here_p (CORE_ADDR);
-extern int frame_in_dummy (struct frame_info *);
+/* FIXME: cagney/2002-11-10: The current [generic] dummy-frame code
+ implements a functional superset of this function. The only reason
+ it hasn't been removed is because some architectures still don't
+ use the new framework. Once they have been fixed, this can go. */
+/* FIXME: cagney/2002-11-10: There should be a function (hmm,
+ something like, enum { NORMAL_FRAME, DUMMY_FRAME, SIGTRAMP_FRAME }
+ get_frame_type() ...) that the caller can use to determine the
+ frame's type. This could replace this function, PC_IN_CALL_DUMMY,
+ and fi->signal_handler_caller. */
+extern int deprecated_frame_in_dummy (struct frame_info *);
extern int breakpoint_thread_match (CORE_ADDR, ptid_t);
Index: sparc-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sparc-tdep.c,v
retrieving revision 1.41
diff -u -r1.41 sparc-tdep.c
--- sparc-tdep.c 5 Nov 2002 20:43:35 -0000 1.41
+++ sparc-tdep.c 10 Nov 2002 15:25:53 -0000
@@ -315,7 +315,7 @@
it later. */
if (fi->next->next != NULL
&& (fi->next->next->signal_handler_caller
- || frame_in_dummy (fi->next->next))
+ || deprecated_frame_in_dummy (fi->next->next))
&& frameless_look_for_prologue (fi->next))
{
/* A frameless function interrupted by a signal did not change
@@ -488,7 +488,7 @@
else if (frame->extra_info->in_prologue ||
(frame->next != NULL &&
(frame->next->signal_handler_caller ||
- frame_in_dummy (frame->next)) &&
+ deprecated_frame_in_dummy (frame->next)) &&
frameless_look_for_prologue (frame)))
{
/* A frameless function interrupted by a signal did not save
Index: stack.c
===================================================================
RCS file: /cvs/src/src/gdb/stack.c,v
retrieving revision 1.46
diff -u -r1.46 stack.c
--- stack.c 3 Oct 2002 22:34:58 -0000 1.46
+++ stack.c 10 Nov 2002 15:25:54 -0000
@@ -350,7 +350,7 @@
to check for a bp_call_dummy breakpoint. */
if (PC_IN_CALL_DUMMY (fi->pc, sp, fi->frame))
#else
- if (frame_in_dummy (fi))
+ if (deprecated_frame_in_dummy (fi))
#endif
{
annotate_frame_begin (level == -1 ? 0 : level, fi->pc);
@@ -394,7 +394,7 @@
find_pc_line (fi->pc,
fi->next != NULL
&& !fi->next->signal_handler_caller
- && !frame_in_dummy (fi->next));
+ && !deprecated_frame_in_dummy (fi->next));
location_print = (source == LOCATION
|| source == LOC_AND_ADDRESS
@@ -794,7 +794,7 @@
sal = find_pc_line (fi->pc,
fi->next != NULL
&& !fi->next->signal_handler_caller
- && !frame_in_dummy (fi->next));
+ && !deprecated_frame_in_dummy (fi->next));
func = get_frame_function (fi);
s = find_pc_symtab (fi->pc);
if (func)
Index: tui/ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/tui/ChangeLog,v
retrieving revision 1.98
diff -u -r1.98 ChangeLog
--- tui/ChangeLog 26 Oct 2002 10:38:57 -0000 1.98
+++ tui/ChangeLog 10 Nov 2002 15:25:55 -0000
@@ -1,3 +1,8 @@
+2002-11-10 Andrew Cagney <ac131313@redhat.com>
+
+ * tuiStack.c (tuiShowFrameInfo): Replace frame_in_dummy with
+ deprecated_frame_in_dummy.
+
2002-10-26 Stephane Carrez <stcarrez@nerim.fr>
* tuiIO.c (tui_prep_terminal): Save the prompt registered in readline.
Index: tui/tuiStack.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tuiStack.c,v
retrieving revision 1.21
diff -u -r1.21 tuiStack.c
--- tui/tuiStack.c 13 Sep 2002 19:37:47 -0000 1.21
+++ tui/tuiStack.c 10 Nov 2002 15:25:55 -0000
@@ -352,7 +352,7 @@
sal = find_pc_line (fi->pc,
(fi->next != (struct frame_info *) NULL &&
!fi->next->signal_handler_caller &&
- !frame_in_dummy (fi->next)));
+ !deprecated_frame_in_dummy (fi->next)));
sourceAlreadyDisplayed = sal.symtab != 0
&& tuiSourceIsDisplayed (sal.symtab->filename);