X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fframe-unwind.h;h=9543dddd62632ab9c36181379590f53f6e8e11e8;hb=7abb8d81115a2a748443f041e37cc13a70b34faa;hp=f82d76366bb26c8ad088728bdf305b6ded60723a;hpb=0b30217134add051e159a192066a1e568ebd837f;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/frame-unwind.h b/gdb/frame-unwind.h index f82d76366b..9543dddd62 100644 --- a/gdb/frame-unwind.h +++ b/gdb/frame-unwind.h @@ -1,6 +1,6 @@ /* Definitions for a frame unwinder, for GDB, the GNU debugger. - Copyright (C) 2003-2004, 2007-2012 Free Software Foundation, Inc. + Copyright (C) 2003-2019 Free Software Foundation, Inc. This file is part of GDB. @@ -44,7 +44,10 @@ 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, @@ -67,6 +70,18 @@ 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.