Remove "boolean" and "var_boolean" checks from ARI
[deliverable/binutils-gdb.git] / gdb / frame-unwind.h
index e449766b253b24bdc48f5e0c6ebdc1b4bebf0711..9543dddd62632ab9c36181379590f53f6e8e11e8 100644 (file)
@@ -1,7 +1,6 @@
 /* Definitions for a frame unwinder, for GDB, the GNU debugger.
 
-   Copyright (C) 2003, 2004, 2007, 2008, 2009, 2010, 2011
-   Free Software Foundation, Inc.
+   Copyright (C) 2003-2019 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -45,12 +44,18 @@ struct value;
 
 /* Given THIS frame, take a whiff of its registers (namely
    the PC and attributes) and if SELF is the applicable unwinder,
-   return non-zero.  Possibly also initialize THIS_PROLOGUE_CACHE.  */
+   return non-zero.  Possibly also initialize THIS_PROLOGUE_CACHE; but
+   only if returning 1.  Initializing THIS_PROLOGUE_CACHE in other
+   cases (0 return) is invalid.  In case of exception, the caller has
+   to set *THIS_PROLOGUE_CACHE to NULL.  */
 
 typedef int (frame_sniffer_ftype) (const struct frame_unwind *self,
                                   struct frame_info *this_frame,
                                   void **this_prologue_cache);
 
+typedef enum unwind_stop_reason (frame_unwind_stop_reason_ftype)
+  (struct frame_info *this_frame, void **this_prologue_cache);
+
 /* A default frame sniffer which always accepts the frame.  Used by
    fallback prologue unwinders.  */
 
@@ -58,6 +63,25 @@ int default_frame_sniffer (const struct frame_unwind *self,
                           struct frame_info *this_frame,
                           void **this_prologue_cache);
 
+/* A default stop_reason callback which always claims the frame is
+   unwindable.  */
+
+enum unwind_stop_reason
+  default_frame_unwind_stop_reason (struct frame_info *this_frame,
+                                   void **this_cache);
+
+/* A default unwind_pc callback that simply unwinds the register identified
+   by GDBARCH_PC_REGNUM.  */
+
+extern CORE_ADDR default_unwind_pc (struct gdbarch *gdbarch,
+                                   struct frame_info *next_frame);
+
+/* A default unwind_sp callback that simply unwinds the register identified
+   by GDBARCH_SP_REGNUM.  */
+
+extern CORE_ADDR default_unwind_sp (struct gdbarch *gdbarch,
+                                   struct frame_info *next_frame);
+
 /* Assuming the frame chain: (outer) prev <-> this <-> next (inner);
    use THIS frame, and through it the NEXT frame's register unwind
    method, to determine the frame ID of THIS frame.
@@ -136,6 +160,7 @@ struct frame_unwind
   enum frame_type type;
   /* Should an attribute indicating the frame's address-in-block go
      here?  */
+  frame_unwind_stop_reason_ftype *stop_reason;
   frame_this_id_ftype *this_id;
   frame_prev_register_ftype *prev_register;
   const struct frame_data *unwind_data;
This page took 0.023881 seconds and 4 git commands to generate.