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] Switch mainline unwind predicates to sniffers


Hello,

This is the next step in `fixing' the dwarf2 backtrace problem. It's highly mechanical - replace XXX_frame_p(pc) with XXX_frame_sniffer(next_frame). I've rebuilt all the cross targets and checked that i386 results didn't change.

committed to mainline only,
Andrew
2003-07-16  Andrew Cagney  <cagney@redhat.com>

	* frame-base.h (frame_base_p_ftype): Delete definition.
	(frame_base_append_predicate): Delete declaration.
	* frame-unwind.h (frame_unwind_p_ftype): Delete definition.
	(frame_unwind_append_predicate): Delete declaration.
	* frame-unwind.c (struct frame_unwind_table): Delete field "p".
	(append_predicate): Delete parameter "p".
	(frame_unwind_append_predicate): Delete function.
	(frame_unwind_append_sniffer): Update call to append_predicate.
	(frame_unwind_free): Delete function.
	(_initialize_frame_unwind): Pass NULL as "free" to
	register_gdbarch_data.
	(frame_unwind_init): Append the dummy_frame_sniffer.
	(frame_unwind_find_by_frame): Simplify.
	* frame-base.c (struct frame_base_table): Delete field "p".
	(append_predicate): Delete parameter "p".
	(frame_base_append_predicate): Delete function.
	(frame_base_append_sniffer): Update call to append_predicate.
	(frame_base_free): Delete function.
	(frame_base_find_by_frame): Simplify.
	(_initialize_frame_base): Pass NULL as "free" to
	register_gdbarch_data.
	* x86-64-tdep.c (x86_64_frame_sniffer): Replace "x86_64_frame_p".
	(x86_64_sigtramp_frame_sniffer): Replace
	"x86_64_sigtramp_frame_p".
	(x86_64_init_abi): Set the frame unwind sniffers.
	* m68k-tdep.c (m68k_frame_sniffer): Replace "m68k_frame_p".
	(m68k_sigtramp_frame_sniffer): Replace "m68k_sigtramp_frame_p"
	(m68k_gdbarch_init): Set the frame unwind sniffers.
	* i386-tdep.c (i386_sigtramp_frame_sniffer): Replace
	"i386_sigtramp_frame_p".
	(i386_frame_sniffer): Replace "i386_frame_p".
	(i386_gdbarch_init): Set the frame unwind sniffers.
	* avr-tdep.c (avr_frame_sniffer): Replace "avr_frame_sniffer".
	(avr_gdbarch_init): Set the frame unwind sniffers.
	* alpha-tdep.c (alpha_sigtramp_frame_sniffer): Replace
	"alpha_sigtramp_frame_p"
	(alpha_heuristic_frame_sniffer): Replace
	"alpha_heuristic_frame_p".
	(alpha_gdbarch_init): Set the frame unwind sniffers.
	(alpha_dwarf2_init_abi): Ditto.
	* alpha-mdebug-tdep.c (alpha_mdebug_frame_sniffer): Replace
	"alpha_debug_frame_p".
	(alpha_mdebug_frame_base_sniffer): Replace
	"alpha_mdebug_frame_base_p".
	(alpha_mdebug_init_abi): Set the frame unwind sniffers.
	* d10v-tdep.c (d10v_frame_sniffer): Replace "d10v_frame_p".
	(d10v_gdbarch_init): Set the frame unwind sniffer.
	* dwarf2-frame.c (dwarf2_frame_sniffer): Replace "dwarf2_frame_p".
	(dwarf2_frame_base_sniffer): Replace "dwarf2_frame_base_p".
	* dwarf2-frame.h (dwarf2_frame_sniffer): Replace "dwarf2_frame_p".
	(dwarf2_frame_base_sniffer): Replace "dwarf2_frame_base_p".
	* dummy-frame.c (dummy_frame_sniffer): Replace "dummy_frame_p".
	* dummy-frame.h (dummy_frame_sniffer): Replace "dummy_frame_p".

Index: alpha-mdebug-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/alpha-mdebug-tdep.c,v
retrieving revision 1.6
diff -u -r1.6 alpha-mdebug-tdep.c
--- alpha-mdebug-tdep.c	26 Jun 2003 17:18:41 -0000	1.6
+++ alpha-mdebug-tdep.c	16 Jul 2003 22:26:36 -0000
@@ -304,8 +304,9 @@
 };
 
 const struct frame_unwind *
-alpha_mdebug_frame_p (CORE_ADDR pc)
+alpha_mdebug_frame_sniffer (struct frame_info *next_frame)
 {
+  CORE_ADDR pc = frame_pc_unwind (next_frame);
   alpha_extra_func_info_t proc_desc;
 
   /* If this PC does not map to a PDR, then clearly this isn't an
@@ -360,8 +361,9 @@
 };
 
 static const struct frame_base *
-alpha_mdebug_frame_base_p (CORE_ADDR pc)
+alpha_mdebug_frame_base_sniffer (struct frame_info *next_frame)
 {
+  CORE_ADDR pc = frame_pc_unwind (next_frame);
   alpha_extra_func_info_t proc_desc;
 
   /* If this PC does not map to a PDR, then clearly this isn't an
@@ -379,6 +381,6 @@
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
 
-  frame_unwind_append_predicate (gdbarch, alpha_mdebug_frame_p);
-  frame_base_append_predicate (gdbarch, alpha_mdebug_frame_base_p);
+  frame_unwind_append_sniffer (gdbarch, alpha_mdebug_frame_sniffer);
+  frame_base_append_sniffer (gdbarch, alpha_mdebug_frame_base_sniffer);
 }
Index: alpha-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/alpha-tdep.c,v
retrieving revision 1.117
diff -u -r1.117 alpha-tdep.c
--- alpha-tdep.c	11 Jul 2003 21:49:04 -0000	1.117
+++ alpha-tdep.c	16 Jul 2003 22:26:36 -0000
@@ -858,8 +858,9 @@
 };
 
 static const struct frame_unwind *
-alpha_sigtramp_frame_p (CORE_ADDR pc)
+alpha_sigtramp_frame_sniffer (struct frame_info *next_frame)
 {
+  CORE_ADDR pc = frame_pc_unwind (next_frame);
   char *name;
 
   /* We shouldn't even bother to try if the OSABI didn't register
@@ -1199,7 +1200,7 @@
 };
 
 static const struct frame_unwind *
-alpha_heuristic_frame_p (CORE_ADDR pc)
+alpha_heuristic_frame_sniffer (struct frame_info *next_frame)
 {
   return &alpha_heuristic_frame_unwind;
 }
@@ -1571,8 +1572,8 @@
   if (tdep->jb_pc >= 0)
     set_gdbarch_get_longjmp_target (gdbarch, alpha_get_longjmp_target);
 
-  frame_unwind_append_predicate (gdbarch, alpha_sigtramp_frame_p);
-  frame_unwind_append_predicate (gdbarch, alpha_heuristic_frame_p);
+  frame_unwind_append_sniffer (gdbarch, alpha_sigtramp_frame_sniffer);
+  frame_unwind_append_sniffer (gdbarch, alpha_heuristic_frame_sniffer);
 
   frame_base_set_default (gdbarch, &alpha_heuristic_frame_base);
 
@@ -1582,8 +1583,8 @@
 void
 alpha_dwarf2_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
 {
-  frame_unwind_append_predicate (gdbarch, dwarf2_frame_p);
-  frame_base_append_predicate (gdbarch, dwarf2_frame_base_p);
+  frame_unwind_append_sniffer (gdbarch, dwarf2_frame_sniffer);
+  frame_base_append_sniffer (gdbarch, dwarf2_frame_base_sniffer);
   set_gdbarch_dwarf2_build_frame_info (gdbarch, dwarf2_build_frame_info);
 }
 
Index: avr-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/avr-tdep.c,v
retrieving revision 1.67
diff -u -r1.67 avr-tdep.c
--- avr-tdep.c	27 Jun 2003 16:15:09 -0000	1.67
+++ avr-tdep.c	16 Jul 2003 22:26:36 -0000
@@ -1080,7 +1080,7 @@
 };
 
 const struct frame_unwind *
-avr_frame_p (CORE_ADDR pc)
+avr_frame_sniffer (struct frame_info *next_frame)
 {
   return &avr_frame_unwind;
 }
@@ -1350,7 +1350,7 @@
   set_gdbarch_frameless_function_invocation (gdbarch,
                                              frameless_look_for_prologue);
 
-  frame_unwind_append_predicate (gdbarch, avr_frame_p);
+  frame_unwind_append_sniffer (gdbarch, avr_frame_sniffer);
   frame_base_set_default (gdbarch, &avr_frame_base);
 
   set_gdbarch_unwind_dummy_id (gdbarch, avr_unwind_dummy_id);
Index: d10v-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/d10v-tdep.c,v
retrieving revision 1.128
diff -u -r1.128 d10v-tdep.c
--- d10v-tdep.c	15 Jul 2003 17:23:31 -0000	1.128
+++ d10v-tdep.c	16 Jul 2003 22:26:37 -0000
@@ -1440,7 +1440,7 @@
 };
 
 static const struct frame_unwind *
-d10v_frame_p (CORE_ADDR pc)
+d10v_frame_sniffer (struct frame_info *next_frame)
 {
   return &d10v_frame_unwind;
 }
@@ -1580,7 +1580,7 @@
 
   set_gdbarch_print_registers_info (gdbarch, d10v_print_registers_info);
 
-  frame_unwind_append_predicate (gdbarch, d10v_frame_p);
+  frame_unwind_append_sniffer (gdbarch, d10v_frame_sniffer);
   frame_base_set_default (gdbarch, &d10v_frame_base);
 
   /* Methods for saving / extracting a dummy frame's ID.  The ID's
Index: dummy-frame.c
===================================================================
RCS file: /cvs/src/src/gdb/dummy-frame.c,v
retrieving revision 1.25
diff -u -r1.25 dummy-frame.c
--- dummy-frame.c	16 Jun 2003 16:47:41 -0000	1.25
+++ dummy-frame.c	16 Jul 2003 22:26:37 -0000
@@ -408,8 +408,9 @@
 };
 
 const struct frame_unwind *
-dummy_frame_p (CORE_ADDR pc)
+dummy_frame_sniffer (struct frame_info *next_frame)
 {
+  CORE_ADDR pc = frame_pc_unwind (next_frame);
   if (DEPRECATED_PC_IN_CALL_DUMMY_P ()
       ? DEPRECATED_PC_IN_CALL_DUMMY (pc, 0, 0)
       : pc_in_dummy_frame (pc))
Index: dummy-frame.h
===================================================================
RCS file: /cvs/src/src/gdb/dummy-frame.h,v
retrieving revision 1.11
diff -u -r1.11 dummy-frame.h
--- dummy-frame.h	15 May 2003 19:04:29 -0000	1.11
+++ dummy-frame.h	16 Jul 2003 22:26:37 -0000
@@ -48,7 +48,7 @@
 /* If the PC falls in a dummy frame, return a dummy frame
    unwinder.  */
 
-extern const struct frame_unwind *dummy_frame_p (CORE_ADDR pc);
+extern const struct frame_unwind *dummy_frame_sniffer (struct frame_info *next_frame);
 
 /* Does the PC fall in a dummy frame?
 
Index: dwarf2-frame.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2-frame.c,v
retrieving revision 1.8
diff -u -r1.8 dwarf2-frame.c
--- dwarf2-frame.c	11 Jul 2003 16:22:17 -0000	1.8
+++ dwarf2-frame.c	16 Jul 2003 22:26:37 -0000
@@ -708,8 +708,9 @@
 };
 
 const struct frame_unwind *
-dwarf2_frame_p (CORE_ADDR pc)
+dwarf2_frame_sniffer (struct frame_info *next_frame)
 {
+  CORE_ADDR pc = frame_pc_unwind (next_frame);
   /* The way GDB works, this function can be called with PC just after
      the last instruction of the function we're supposed to return the
      unwind methods for.  In that case we won't find the correct FDE;
@@ -748,8 +749,9 @@
 };
 
 const struct frame_base *
-dwarf2_frame_base_p (CORE_ADDR pc)
+dwarf2_frame_base_sniffer (struct frame_info *next_frame)
 {
+  CORE_ADDR pc = frame_pc_unwind (next_frame);
   if (dwarf2_frame_find_fde (&pc))
     return &dwarf2_frame_base;
 
Index: dwarf2-frame.h
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2-frame.h,v
retrieving revision 1.1
diff -u -r1.1 dwarf2-frame.h
--- dwarf2-frame.h	31 May 2003 19:18:05 -0000	1.1
+++ dwarf2-frame.h	16 Jul 2003 22:26:37 -0000
@@ -29,12 +29,12 @@
 /* Return the frame unwind methods for the function that contains PC,
    or NULL if it can't be handled by DWARF CFI frame unwinder.  */
 
-const struct frame_unwind *dwarf2_frame_p (CORE_ADDR pc);
+const struct frame_unwind *dwarf2_frame_sniffer (struct frame_info *next_frame);
 
 /* Return the frame base methods for the function that contains PC, or
    NULL if it can't be handled by the DWARF CFI frame unwinder.  */
 
-const struct frame_base *dwarf2_frame_base_p (CORE_ADDR pc);
+const struct frame_base *dwarf2_frame_base_sniffer (struct frame_info *next_frame);
 
 /* Register the DWARF CFI for OBJFILE.  */
 
Index: frame-base.c
===================================================================
RCS file: /cvs/src/src/gdb/frame-base.c,v
retrieving revision 1.6
diff -u -r1.6 frame-base.c
--- frame-base.c	15 Jul 2003 17:35:00 -0000	1.6
+++ frame-base.c	16 Jul 2003 22:26:37 -0000
@@ -70,7 +70,6 @@
 
 struct frame_base_table
 {
-  frame_base_p_ftype **p;
   frame_base_sniffer_ftype **sniffer;
   const struct frame_base *default_base;
   int nr;
@@ -84,16 +83,6 @@
   return table;
 }
 
-static void
-frame_base_free (struct gdbarch *gdbarch, void *data)
-{
-  struct frame_base_table *table =
-    gdbarch_data (gdbarch, frame_base_data);
-  xfree (table->p);
-  xfree (table->sniffer);
-  xfree (table);
-}
-
 static struct frame_base_table *
 frame_base_table (struct gdbarch *gdbarch)
 {
@@ -110,33 +99,22 @@
 
 /* Append a predicate to the end of the table.  */
 static void
-append_predicate (struct frame_base_table *table, frame_base_p_ftype *p,
+append_predicate (struct frame_base_table *table,
 		  frame_base_sniffer_ftype *sniffer)
 {
-  table->p = xrealloc (table->p, ((table->nr + 1)
-				  * sizeof (frame_base_p_ftype *)));
   table->sniffer = xrealloc (table->sniffer,
 			     ((table->nr + 1)
 			      * sizeof (frame_base_sniffer_ftype *)));
-  table->p[table->nr] = p;
   table->sniffer[table->nr] = sniffer;
   table->nr++;
 }
 
 void
-frame_base_append_predicate (struct gdbarch *gdbarch,
-			     frame_base_p_ftype *p)
-{
-  struct frame_base_table *table = frame_base_table (gdbarch);
-  append_predicate (table, p, NULL);
-}
-
-void
 frame_base_append_sniffer (struct gdbarch *gdbarch,
 			   frame_base_sniffer_ftype *sniffer)
 {
   struct frame_base_table *table = frame_base_table (gdbarch);
-  append_predicate (table, NULL, sniffer);
+  append_predicate (table, sniffer);
 }
 
 void
@@ -156,10 +134,7 @@
   for (i = 0; i < table->nr; i++)
     {
       const struct frame_base *desc = NULL;
-      if (table->p[i] != NULL)
-	desc = table->p[i] (frame_pc_unwind (next_frame));
-      else if (table->sniffer[i] != NULL)
-	desc = table->sniffer[i] (next_frame);
+      desc = table->sniffer[i] (next_frame);
       if (desc != NULL)
 	return desc;
     }
@@ -171,6 +146,5 @@
 void
 _initialize_frame_base (void)
 {
-  frame_base_data = register_gdbarch_data (frame_base_init,
-					   frame_base_free);
+  frame_base_data = register_gdbarch_data (frame_base_init, NULL);
 }
Index: frame-base.h
===================================================================
RCS file: /cvs/src/src/gdb/frame-base.h,v
retrieving revision 1.2
diff -u -r1.2 frame-base.h
--- frame-base.h	15 Jul 2003 17:35:00 -0000	1.2
+++ frame-base.h	16 Jul 2003 22:26:37 -0000
@@ -29,12 +29,6 @@
 struct gdbarch;
 struct regcache;
 
-/* For compatibility.  */
-
-typedef const struct frame_base *(frame_base_p_ftype) (CORE_ADDR pc);
-extern void frame_base_append_predicate (struct gdbarch *gdbarch,
-					 frame_base_p_ftype *p);
-
 /* Assuming the frame chain: (outer) prev <-> this <-> next (inner);
    and that this is a `normal frame'; use the NEXT frame, and its
    register unwind method, to determine the address of THIS frame's
Index: frame-unwind.c
===================================================================
RCS file: /cvs/src/src/gdb/frame-unwind.c,v
retrieving revision 1.5
diff -u -r1.5 frame-unwind.c
--- frame-unwind.c	15 Jul 2003 17:35:00 -0000	1.5
+++ frame-unwind.c	16 Jul 2003 22:26:37 -0000
@@ -29,21 +29,17 @@
 
 struct frame_unwind_table
 {
-  frame_unwind_p_ftype **p;
   frame_unwind_sniffer_ftype **sniffer;
   int nr;
 };
 
 /* Append a predicate to the end of the table.  */
 static void
-append_predicate (struct frame_unwind_table *table, frame_unwind_p_ftype *p,
+append_predicate (struct frame_unwind_table *table,
 		  frame_unwind_sniffer_ftype *sniffer)
 {
-  table->p = xrealloc (table->p, ((table->nr + 1)
-				  * sizeof (frame_unwind_p_ftype *)));
   table->sniffer = xrealloc (table->sniffer, ((table->nr + 1)
 					      * sizeof (frame_unwind_sniffer_ftype *)));
-  table->p[table->nr] = p;
   table->sniffer[table->nr] = sniffer;
   table->nr++;
 }
@@ -52,36 +48,10 @@
 frame_unwind_init (struct gdbarch *gdbarch)
 {
   struct frame_unwind_table *table = XCALLOC (1, struct frame_unwind_table);
-  append_predicate (table, dummy_frame_p, NULL);
+  append_predicate (table, dummy_frame_sniffer);
   return table;
 }
 
-static void
-frame_unwind_free (struct gdbarch *gdbarch, void *data)
-{
-  struct frame_unwind_table *table =
-    gdbarch_data (gdbarch, frame_unwind_data);
-  xfree (table->p);
-  xfree (table->sniffer);
-  xfree (table);
-}
-
-void
-frame_unwind_append_predicate (struct gdbarch *gdbarch,
-			       frame_unwind_p_ftype *p)
-{
-  struct frame_unwind_table *table =
-    gdbarch_data (gdbarch, frame_unwind_data);
-  if (table == NULL)
-    {
-      /* ULGH, called during architecture initialization.  Patch
-         things up.  */
-      table = frame_unwind_init (gdbarch);
-      set_gdbarch_data (gdbarch, frame_unwind_data, table);
-    }
-  append_predicate (table, p, NULL);
-}
-
 void
 frame_unwind_append_sniffer (struct gdbarch *gdbarch,
 			     frame_unwind_sniffer_ftype *sniffer)
@@ -95,7 +65,7 @@
       table = frame_unwind_init (gdbarch);
       set_gdbarch_data (gdbarch, frame_unwind_data, table);
     }
-  append_predicate (table, NULL, sniffer);
+  append_predicate (table, sniffer);
 }
 
 const struct frame_unwind *
@@ -113,12 +83,7 @@
   for (i = 0; i < table->nr; i++)
     {
       const struct frame_unwind *desc;
-      if (table->p[i] != NULL)
-	desc = table->p[i] (frame_pc_unwind (next_frame));
-      else if (table->sniffer[i] != NULL)
-	desc = table->sniffer[i] (next_frame);
-      else
-	internal_error (__FILE__, __LINE__, "Missing sniffer?");
+      desc = table->sniffer[i] (next_frame);
       if (desc != NULL)
 	return desc;
     }
@@ -130,6 +95,5 @@
 void
 _initialize_frame_unwind (void)
 {
-  frame_unwind_data = register_gdbarch_data (frame_unwind_init,
-					     frame_unwind_free);
+  frame_unwind_data = register_gdbarch_data (frame_unwind_init, NULL);
 }
Index: frame-unwind.h
===================================================================
RCS file: /cvs/src/src/gdb/frame-unwind.h,v
retrieving revision 1.8
diff -u -r1.8 frame-unwind.h
--- frame-unwind.h	15 Jul 2003 17:35:00 -0000	1.8
+++ frame-unwind.h	16 Jul 2003 22:26:37 -0000
@@ -30,12 +30,6 @@
 
 #include "frame.h"		/* For enum frame_type.  */
 
-/* For compatibility with the old frame code.  See end of header for
-   new methods.  */
-typedef const struct frame_unwind *(frame_unwind_p_ftype) (CORE_ADDR pc);
-extern void frame_unwind_append_predicate (struct gdbarch *gdbarch,
-					   frame_unwind_p_ftype *p);
-
 /* The following unwind functions assume a chain of frames forming the
    sequence: (outer) prev <-> this <-> next (inner).  All the
    functions are called with called with the next frame's `struct
Index: i386-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-tdep.c,v
retrieving revision 1.160
diff -u -r1.160 i386-tdep.c
--- i386-tdep.c	2 Jul 2003 17:20:24 -0000	1.160
+++ i386-tdep.c	16 Jul 2003 22:26:38 -0000
@@ -851,7 +851,7 @@
 };
 
 static const struct frame_unwind *
-i386_frame_p (CORE_ADDR pc)
+i386_frame_sniffer (struct frame_info *next_frame)
 {
   return &i386_frame_unwind;
 }
@@ -929,8 +929,9 @@
 };
 
 static const struct frame_unwind *
-i386_sigtramp_frame_p (CORE_ADDR pc)
+i386_sigtramp_frame_sniffer (struct frame_info *next_frame)
 {
+  CORE_ADDR pc = frame_pc_unwind (next_frame);
   char *name;
 
   /* We shouldn't even bother to try if the OSABI didn't register
@@ -1811,7 +1812,7 @@
   set_gdbarch_fetch_pointer_argument (gdbarch, i386_fetch_pointer_argument);
 
   /* Hook in the DWARF CFI frame unwinder.  */
-  frame_unwind_append_predicate (gdbarch, dwarf2_frame_p);
+  frame_unwind_append_sniffer (gdbarch, dwarf2_frame_sniffer);
   set_gdbarch_dwarf2_build_frame_info (gdbarch, dwarf2_build_frame_info);
 
   frame_base_set_default (gdbarch, &i386_frame_base);
@@ -1819,8 +1820,8 @@
   /* Hook in ABI-specific overrides, if they have been registered.  */
   gdbarch_init_osabi (info, gdbarch);
 
-  frame_unwind_append_predicate (gdbarch, i386_sigtramp_frame_p);
-  frame_unwind_append_predicate (gdbarch, i386_frame_p);
+  frame_unwind_append_sniffer (gdbarch, i386_sigtramp_frame_sniffer);
+  frame_unwind_append_sniffer (gdbarch, i386_frame_sniffer);
 
   return gdbarch;
 }
Index: m68k-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/m68k-tdep.c,v
retrieving revision 1.71
diff -u -r1.71 m68k-tdep.c
--- m68k-tdep.c	9 Jul 2003 21:36:08 -0000	1.71
+++ m68k-tdep.c	16 Jul 2003 22:26:38 -0000
@@ -784,7 +784,7 @@
 };
 
 static const struct frame_unwind *
-m68k_frame_p (CORE_ADDR pc)
+m68k_frame_sniffer (struct frame_info *next_frame)
 {
   return &m68k_frame_unwind;
 }
@@ -851,8 +851,9 @@
 };
 
 static const struct frame_unwind *
-m68k_sigtramp_frame_p (CORE_ADDR pc)
+m68k_sigtramp_frame_sniffer (struct frame_info *next_frame)
 {
+  CORE_ADDR pc = frame_pc_unwind (next_frame);
   char *name;
 
   /* We shouldn't even bother to try if the OSABI didn't register
@@ -1162,8 +1163,8 @@
   if (tdep->jb_pc >= 0)
     set_gdbarch_get_longjmp_target (gdbarch, m68k_get_longjmp_target);
 
-  frame_unwind_append_predicate (gdbarch, m68k_sigtramp_frame_p);
-  frame_unwind_append_predicate (gdbarch, m68k_frame_p);
+  frame_unwind_append_sniffer (gdbarch, m68k_sigtramp_frame_sniffer);
+  frame_unwind_append_sniffer (gdbarch, m68k_frame_sniffer);
 
   return gdbarch;
 }
Index: x86-64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/x86-64-tdep.c,v
retrieving revision 1.84
diff -u -r1.84 x86-64-tdep.c
--- x86-64-tdep.c	13 Jul 2003 16:38:04 -0000	1.84
+++ x86-64-tdep.c	16 Jul 2003 22:26:38 -0000
@@ -1077,7 +1077,7 @@
 };
 
 static const struct frame_unwind *
-x86_64_frame_p (CORE_ADDR pc)
+x86_64_frame_sniffer (struct frame_info *next_frame)
 {
   return &x86_64_frame_unwind;
 }
@@ -1149,8 +1149,9 @@
 };
 
 static const struct frame_unwind *
-x86_64_sigtramp_frame_p (CORE_ADDR pc)
+x86_64_sigtramp_frame_sniffer (struct frame_info *next_frame)
 {
+  CORE_ADDR pc = frame_pc_unwind (next_frame);
   char *name;
 
   find_pc_partial_function (pc, &name, NULL, NULL);
@@ -1260,8 +1261,8 @@
      in the future.  */
   set_gdbarch_in_solib_call_trampoline (gdbarch, in_plt_section);
 
-  frame_unwind_append_predicate (gdbarch, x86_64_sigtramp_frame_p);
-  frame_unwind_append_predicate (gdbarch, x86_64_frame_p);
+  frame_unwind_append_sniffer (gdbarch, x86_64_sigtramp_frame_sniffer);
+  frame_unwind_append_sniffer (gdbarch, x86_64_frame_sniffer);
   frame_base_set_default (gdbarch, &x86_64_frame_base);
 }
 

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