aboutsummaryrefslogtreecommitdiff
path: root/gdb/frame-unwind.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-01-19 17:39:16 +0000
committerAndrew Cagney <cagney@redhat.com>2003-01-19 17:39:16 +0000
commitdbe9fe588fc696a5d74b3a5c3208f2568b9fb7aa (patch)
tree2d995d5a3e6b2d1b7fc8ccda1b5cf3b523c8c83e /gdb/frame-unwind.h
parentb4fc4eff63f50b61e744a5ad0bdac77e40441739 (diff)
downloadgdb-dbe9fe588fc696a5d74b3a5c3208f2568b9fb7aa.zip
gdb-dbe9fe588fc696a5d74b3a5c3208f2568b9fb7aa.tar.gz
gdb-dbe9fe588fc696a5d74b3a5c3208f2568b9fb7aa.tar.bz2
2003-01-19 Andrew Cagney <ac131313@redhat.com>
* frame-unwind.h (frame_unwind_pop_ftype): Declare. (struct frame_unwind): Add field pop. * frame.h (frame_pop): Declare. * frame.c (frame_saved_regs_pop): New function. (trad_frame_unwinder): Add frame_saved_regs_pop. (frame_pop): New function. * dummy-frame.c (dummy_frame_pop): New function. (discard_innermost_dummy): New function. (generic_pop_dummy_frame): Use discard_innermost_dummy. (dummy_frame_unwind): Add dummy_frame_pop. * infrun.c (normal_stop): Call frame_pop instead of POP_FRAME. * valops.c (hand_function_call): Ditto. * stack.c (return_command): Ditto.
Diffstat (limited to 'gdb/frame-unwind.h')
-rw-r--r--gdb/frame-unwind.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/gdb/frame-unwind.h b/gdb/frame-unwind.h
index 863f259..2c67c96 100644
--- a/gdb/frame-unwind.h
+++ b/gdb/frame-unwind.h
@@ -82,12 +82,27 @@ typedef void (frame_unwind_id_ftype) (struct frame_info * frame,
void **unwind_cache,
struct frame_id * id);
+/* Discard the frame by restoring the registers (in regcache) back to
+ that of the caller. */
+/* NOTE: cagney/2003-01-19: While at present the callers all pop each
+ frame in turn, the implementor should try to code things so that
+ any frame can be popped directly. */
+/* FIXME: cagney/2003-01-19: Since both FRAME and REGCACHE refer to a
+ common register cache, care must be taken when restoring the
+ registers. The `correct fix' is to first first save the registers
+ in a scratch cache, and second write that scratch cache back to to
+ the real register cache. */
+
+typedef void (frame_unwind_pop_ftype) (struct frame_info *frame,
+ void **unwind_cache,
+ struct regcache *regcache);
struct frame_unwind
{
/* Should the frame's type go here? */
/* Should an attribute indicating the frame's address-in-block go
here? */
+ frame_unwind_pop_ftype *pop;
frame_unwind_pc_ftype *pc;
frame_unwind_id_ftype *id;
frame_unwind_reg_ftype *reg;