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]

[commit] simplify dummy frame sniffer


Hello,

This patch simplifies the dummy frame sniffer a little by always checking the dummy frame stack for entries.

For the !DEPRECATED_USE_GENERIC_DUMMY_FRAMES case, since that stack is empty, the search never succeeds and hence the sniff always fails (retaining old behavior).

committed,
Andrew
2004-04-03  Andrew Cagney  <cagney@redhat.com>

	* frame-unwind.c (frame_unwind_find_by_frame): Delete check for
	generic dummy frames.
	* dummy-frame.c: Update copyright.
	(dummy_frame_sniffer): Delete check for generic dummy frames.

Index: dummy-frame.c
===================================================================
RCS file: /cvs/src/src/gdb/dummy-frame.c,v
retrieving revision 1.29
diff -u -r1.29 dummy-frame.c
--- dummy-frame.c	22 Mar 2004 16:58:07 -0000	1.29
+++ dummy-frame.c	3 Apr 2004 20:00:03 -0000
@@ -1,8 +1,8 @@
 /* Code dealing with dummy stack frames, for GDB, the GNU debugger.
 
    Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
-   1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software
-   Foundation, Inc.
+   1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free
+   Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -398,7 +398,6 @@
 dummy_frame_sniffer (struct frame_info *next_frame)
 {
   CORE_ADDR pc = frame_pc_unwind (next_frame);
-  gdb_assert (DEPRECATED_USE_GENERIC_DUMMY_FRAMES);
   if (pc_in_dummy_frame (pc))
     return &dummy_frame_unwind;
   else
Index: frame-unwind.c
===================================================================
RCS file: /cvs/src/src/gdb/frame-unwind.c,v
retrieving revision 1.11
diff -u -r1.11 frame-unwind.c
--- frame-unwind.c	21 Mar 2004 22:28:52 -0000	1.11
+++ frame-unwind.c	3 Apr 2004 20:00:04 -0000
@@ -80,12 +80,6 @@
   struct gdbarch *gdbarch = get_frame_arch (next_frame);
   struct frame_unwind_table *table = gdbarch_data (gdbarch, frame_unwind_data);
   struct frame_unwind_table_entry *entry;
-  if (!DEPRECATED_USE_GENERIC_DUMMY_FRAMES && legacy_frame_p (gdbarch))
-    /* Seriously old code.  Don't even try to use this new mechanism.
-       (Note: The variable USE_GENERIC_DUMMY_FRAMES is deprecated, not
-       the dummy frame mechanism.  All architectures should be using
-       generic dummy frames).  */
-    return legacy_saved_regs_unwind;
   for (entry = table->head; entry != NULL; entry = entry->next)
     {
       if (entry->sniffer != NULL)

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