diff options
Diffstat (limited to 'gdb/frame.h')
-rw-r--r-- | gdb/frame.h | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/gdb/frame.h b/gdb/frame.h index 2208a3f767c..27a13dc6e01 100644 --- a/gdb/frame.h +++ b/gdb/frame.h @@ -214,6 +214,22 @@ extern struct frame_info *frame_find_by_id (struct frame_id id); This replaced: frame->pc; */ extern CORE_ADDR get_frame_pc (struct frame_info *); +/* An address (not necessarily alligned to an instruction boundary) + that falls within THIS frame's code block. + + When a function call is the last statement in a block, the return + address for the call may land at the start of the next block. + Similarly, if a no-return function call is the last statement in + the function, the return address may end up pointing beyond the + function, and possibly at the start of the next function. + + These methods make an allowance for this. For call frames, this + function returns the frame's PC-1 which "should" be an address in + the frame's block. */ + +extern CORE_ADDR get_frame_address_in_block (struct frame_info *this_frame); +extern CORE_ADDR frame_unwind_address_in_block (struct frame_info *next_frame); + /* The frame's inner-most bound. AKA the stack-pointer. Confusingly known as top-of-stack. */ @@ -409,8 +425,10 @@ extern void put_frame_register (struct frame_info *frame, int regnum, includes builtin registers. If NAMELEN is negative, use the NAME's length when doing the comparison. */ -extern int frame_map_name_to_regnum (const char *name, int namelen); -extern const char *frame_map_regnum_to_name (int regnum); +extern int frame_map_name_to_regnum (struct frame_info *frame, + const char *name, int namelen); +extern const char *frame_map_regnum_to_name (struct frame_info *frame, + int regnum); /* Unwind the PC. Strictly speaking return the resume address of the calling frame. For GDB, `pc' is the resume address and not a @@ -524,8 +542,6 @@ extern struct block *get_selected_block (CORE_ADDR *addr_in_block); extern struct symbol *get_frame_function (struct frame_info *); -extern CORE_ADDR frame_address_in_block (struct frame_info *); - extern CORE_ADDR get_pc_function_start (CORE_ADDR); extern int frameless_look_for_prologue (struct frame_info *); |