aboutsummaryrefslogtreecommitdiff
path: root/gdb/frame.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-07-11 14:52:17 +0000
committerAndrew Cagney <cagney@redhat.com>2003-07-11 14:52:17 +0000
commit8edd5d01538ad56dcaf67b8d35bef65748ab62b4 (patch)
treef5f95c0df5404e4f552a84c87b7ee89aeb590f1f /gdb/frame.h
parentc6baf75ed1463f657d61784cf9e5db2c89228482 (diff)
downloadgdb-8edd5d01538ad56dcaf67b8d35bef65748ab62b4.zip
gdb-8edd5d01538ad56dcaf67b8d35bef65748ab62b4.tar.gz
gdb-8edd5d01538ad56dcaf67b8d35bef65748ab62b4.tar.bz2
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.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/gdb/frame.h b/gdb/frame.h
index e821db6..56cb72e 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);