aboutsummaryrefslogtreecommitdiff
path: root/gdb/frame.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-11-15 22:16:25 +0000
committerAndrew Cagney <cagney@redhat.com>2002-11-15 22:16:25 +0000
commitf18c5a73039533b1d9e2f4f2044ec39627bbf8b4 (patch)
treebdf028073b5d33bf857ec528aff113fc536f59b8 /gdb/frame.h
parentd9285969ae7ac75f10cdd4f6fc3c5ff5335133eb (diff)
downloadfsf-binutils-gdb-f18c5a73039533b1d9e2f4f2044ec39627bbf8b4.zip
fsf-binutils-gdb-f18c5a73039533b1d9e2f4f2044ec39627bbf8b4.tar.gz
fsf-binutils-gdb-f18c5a73039533b1d9e2f4f2044ec39627bbf8b4.tar.bz2
2002-11-15 Andrew Cagney <ac131313@redhat.com>
* frame.c (frame_pc_unwind): New function. (frame_saved_regs_pc_unwind): New function. (frame_register_unwind): Pass unwind_cache instead of register_unwind_cache. (set_unwind_by_pc): Add unwind_pc parameter, set. (create_new_frame): Pass frame->pc_unwind to set_unwind_by_pc. (get_prev_frame): Ditto. * frame.h (frame_pc_unwind_ftype): Declare. (struct frame_info): Add pc_unwind, pc_unwind_cache_p and pc_unwind_cache. Rename register_unwind_cache to unwind_cache. (frame_pc_unwind): Declare. * dummy-frame.c (dummy_frame_pc_unwind): New function. (struct dummy_frame): Add comment mentioning that values are for previous frame. * dummy-frame.h (dummy_frame_pc_unwind): Declare. * blockframe.c (file_frame_chain_valid): Use frame_pc_unwind. (generic_file_frame_chain_valid): Ditto. * stack.c (frame_info): Ditto.
Diffstat (limited to 'gdb/frame.h')
-rw-r--r--gdb/frame.h26
1 files changed, 23 insertions, 3 deletions
diff --git a/gdb/frame.h b/gdb/frame.h
index 70d85f1..a371a58 100644
--- a/gdb/frame.h
+++ b/gdb/frame.h
@@ -139,6 +139,12 @@ extern void frame_read_unsigned_register (struct frame_info *frame,
extern int frame_map_name_to_regnum (const char *name, int strlen);
extern const char *frame_map_regnum_to_name (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
+ specific register. */
+
+extern CORE_ADDR frame_pc_unwind (struct frame_info *frame);
+
/* Return the location (and possibly value) of REGNUM for the previous
(older, up) frame. All parameters except VALUEP can be assumed to
@@ -163,6 +169,12 @@ typedef void (frame_register_unwind_ftype) (struct frame_info *frame,
int *realnump,
void *valuep);
+/* Same as for registers above, but return the address at which the
+ calling frame would resume. */
+
+typedef CORE_ADDR (frame_pc_unwind_ftype) (struct frame_info *frame,
+ void **unwind_cache);
+
/* Describe the saved registers of a frame. */
#if defined (EXTRA_FRAME_INFO) || defined (FRAME_FIND_SAVED_REGS)
@@ -252,10 +264,18 @@ struct frame_info
related unwind data. */
struct context *context;
- /* See description above. Return the register value for the
- previous frame. */
+ /* Unwind cache shared between the unwind functions - they had
+ better all agree as to the contents. */
+ void *unwind_cache;
+
+ /* See description above. The previous frame's registers. */
frame_register_unwind_ftype *register_unwind;
- void *register_unwind_cache;
+
+ /* See description above. The previous frame's resume address.
+ Save the previous PC in a local cache. */
+ frame_pc_unwind_ftype *pc_unwind;
+ int pc_unwind_cache_p;
+ CORE_ADDR pc_unwind_cache;
/* Pointers to the next (down, inner, younger) and previous (up,
outer, older) frame_info's in the frame cache. */