diff options
Diffstat (limited to 'gdb/frame-unwind.h')
-rw-r--r-- | gdb/frame-unwind.h | 51 |
1 files changed, 25 insertions, 26 deletions
diff --git a/gdb/frame-unwind.h b/gdb/frame-unwind.h index 9e97889..53fcd68 100644 --- a/gdb/frame-unwind.h +++ b/gdb/frame-unwind.h @@ -50,37 +50,37 @@ struct value; to set *THIS_PROLOGUE_CACHE to NULL. */ typedef int (frame_sniffer_ftype) (const struct frame_unwind *self, - frame_info_ptr this_frame, + const frame_info_ptr &this_frame, void **this_prologue_cache); -typedef enum unwind_stop_reason (frame_unwind_stop_reason_ftype) - (frame_info_ptr this_frame, void **this_prologue_cache); +typedef unwind_stop_reason (frame_unwind_stop_reason_ftype) + (const frame_info_ptr &this_frame, void **this_prologue_cache); /* A default frame sniffer which always accepts the frame. Used by fallback prologue unwinders. */ int default_frame_sniffer (const struct frame_unwind *self, - frame_info_ptr this_frame, + const frame_info_ptr &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 (frame_info_ptr this_frame, + default_frame_unwind_stop_reason (const frame_info_ptr &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, - frame_info_ptr next_frame); + const frame_info_ptr &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, - frame_info_ptr next_frame); + const frame_info_ptr &next_frame); /* Assuming the frame chain: (outer) prev <-> this <-> next (inner); use THIS frame, and through it the NEXT frame's register unwind @@ -105,7 +105,7 @@ extern CORE_ADDR default_unwind_sp (struct gdbarch *gdbarch, with the other unwind methods. Memory for that cache should be allocated using FRAME_OBSTACK_ZALLOC(). */ -typedef void (frame_this_id_ftype) (frame_info_ptr this_frame, +typedef void (frame_this_id_ftype) (const frame_info_ptr &this_frame, void **this_prologue_cache, struct frame_id *this_id); @@ -140,9 +140,9 @@ typedef void (frame_this_id_ftype) (frame_info_ptr this_frame, with the other unwind methods. Memory for that cache should be allocated using FRAME_OBSTACK_ZALLOC(). */ -typedef struct value * (frame_prev_register_ftype) - (frame_info_ptr this_frame, void **this_prologue_cache, - int regnum); +typedef value *(frame_prev_register_ftype) (const frame_info_ptr &this_frame, + void **this_prologue_cache, + int regnum); /* Deallocate extra memory associated with the frame cache if any. */ @@ -153,8 +153,8 @@ typedef void (frame_dealloc_cache_ftype) (frame_info *self, use THIS frame, and implicitly the NEXT frame's register unwind method, return PREV frame's architecture. */ -typedef struct gdbarch *(frame_prev_arch_ftype) (frame_info_ptr this_frame, - void **this_prologue_cache); +typedef gdbarch *(frame_prev_arch_ftype) (const frame_info_ptr &this_frame, + void **this_prologue_cache); struct frame_unwind { @@ -193,7 +193,7 @@ extern void frame_unwind_append_unwinder (struct gdbarch *gdbarch, unwinder implementation. THIS_FRAME->UNWIND must be NULL, it will get set by this function. Possibly initialize THIS_CACHE. */ -extern void frame_unwind_find_by_frame (frame_info_ptr this_frame, +extern void frame_unwind_find_by_frame (const frame_info_ptr &this_frame, void **this_cache); /* Helper functions for value-based register unwinding. These return @@ -201,39 +201,38 @@ extern void frame_unwind_find_by_frame (frame_info_ptr this_frame, /* Return a value which indicates that FRAME did not save REGNUM. */ -struct value *frame_unwind_got_optimized (frame_info_ptr frame, - int regnum); +value *frame_unwind_got_optimized (const frame_info_ptr &frame, int regnum); /* Return a value which indicates that FRAME copied REGNUM into register NEW_REGNUM. */ -struct value *frame_unwind_got_register (frame_info_ptr frame, int regnum, - int new_regnum); +value *frame_unwind_got_register (const frame_info_ptr &frame, int regnum, + int new_regnum); /* Return a value which indicates that FRAME saved REGNUM in memory at ADDR. */ -struct value *frame_unwind_got_memory (frame_info_ptr frame, int regnum, - CORE_ADDR addr); +value *frame_unwind_got_memory (const frame_info_ptr &frame, int regnum, + CORE_ADDR addr); /* Return a value which indicates that FRAME's saved version of REGNUM has a known constant (computed) value of VAL. */ -struct value *frame_unwind_got_constant (frame_info_ptr frame, int regnum, - ULONGEST val); +value *frame_unwind_got_constant (const frame_info_ptr &frame, int regnum, + ULONGEST val); /* Return a value which indicates that FRAME's saved version of REGNUM has a known constant (computed) value which is stored inside BUF. */ -struct value *frame_unwind_got_bytes (frame_info_ptr frame, int regnum, - const gdb_byte *buf); +value *frame_unwind_got_bytes (const frame_info_ptr &frame, int regnum, + const gdb_byte *buf); /* Return a value which indicates that FRAME's saved version of REGNUM has a known constant (computed) value of ADDR. Convert the CORE_ADDR to a target address if necessary. */ -struct value *frame_unwind_got_address (frame_info_ptr frame, int regnum, - CORE_ADDR addr); +value *frame_unwind_got_address (const frame_info_ptr &frame, int regnum, + CORE_ADDR addr); #endif |