diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-07-11 14:52:17 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-07-11 14:52:17 +0000 |
commit | a95504160dbb45d1716497659cf76d620ee8cebb (patch) | |
tree | 9a9ddbba3df7283bf65e285eecb060734686649c /gdb/frame.h | |
parent | 40f0e33f2c5577f6eac7fbbcbca602dd1bcf91d7 (diff) | |
download | gdb-a95504160dbb45d1716497659cf76d620ee8cebb.tar.gz |
2003-07-11 Andrew Cagney <cagney@redhat.com>
* frame.h (get_frame_address_in_block): Declare.
(frame_unwind_address_in_block): Declare.
* frame.c (frame_unwind_address_in_block): New function.
(get_frame_address_in_block): New function.
Diffstat (limited to 'gdb/frame.h')
-rw-r--r-- | gdb/frame.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gdb/frame.h b/gdb/frame.h index e821db6912b..56cb72e1250 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. */ @@ -526,6 +542,8 @@ extern struct block *get_selected_block (CORE_ADDR *addr_in_block); extern struct symbol *get_frame_function (struct frame_info *); +/* DEPRECATED: Replaced by tye pair get_frame_address_in_block and + frame_unwind_address_in_block. */ extern CORE_ADDR frame_address_in_block (struct frame_info *); extern CORE_ADDR get_pc_function_start (CORE_ADDR); |