diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-01-18 17:25:23 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-01-18 17:25:23 +0000 |
commit | 494cca16bdd872bee43d180d3f786d1955d1eb01 (patch) | |
tree | f7c150ffd3dc867d280bbf81999d036f2b454e40 /gdb/frame.h | |
parent | 4efb68b1ad0f40fa002c954c213a516d1e39cfb3 (diff) | |
download | gdb-494cca16bdd872bee43d180d3f786d1955d1eb01.zip gdb-494cca16bdd872bee43d180d3f786d1955d1eb01.tar.gz gdb-494cca16bdd872bee43d180d3f786d1955d1eb01.tar.bz2 |
2003-01-18 Andrew Cagney <ac131313@redhat.com>
* dummy-frame.h (dummy_frame_id_unwind): Delete declaration.
(dummy_frame_pc_unwind, dummy_frame_register_unwind): Ditto.
(struct frame_unwind): Declare opaque.
(dummy_frame_p): Declare function.
* dummy-frame.c (dummy_frame_id_unwind): Make static.
(dummy_frame_pc_unwind, dummy_frame_register_unwind): Ditto.
* dummy-frame.c: Include "frame-unwind.h".
(dummy_frame_p): New function.
(dummy_frame_unwind): New variable.
* frame.c: Include "frame-unwind.h".
(frame_pc_unwind, frame_id_unwind, frame_register_unwind): Update
to use the new unwind field.
(set_unwind_by_pc): Delete function.
(create_new_frame, get_prev_frame): Set unwind field using
frame_unwind_find_by_pc.
(trad_frame_unwind, trad_frame_unwinder): New variables.
* frame.h (trad_frame_unwind): Declare variable.
(frame_id_unwind_ftype): Delete declaration.
(frame_pc_unwind_ftype, frame_register_unwind_ftype): Ditto.
(struct frame_unwind): Declare opaque.
(struct frame_info): Replace the fields id_unwind, pc_unwind and
register_unwind with a single unwind pointer.
* frame-unwind.h, frame-unwind.c: New files.
* Makefile.in (SFILES): Add frame-unwind.c.
(frame_unwind_h): Define.
(COMMON_OBS): Add frame-unwind.o.
(frame-unwind.o): Specify dependencies.
(frame.o, dummy-frame.o): Update dependencies.
Diffstat (limited to 'gdb/frame.h')
-rw-r--r-- | gdb/frame.h | 53 |
1 files changed, 8 insertions, 45 deletions
diff --git a/gdb/frame.h b/gdb/frame.h index 09df2b8..9cbdaa4 100644 --- a/gdb/frame.h +++ b/gdb/frame.h @@ -24,6 +24,10 @@ #define FRAME_H 1 struct symtab_and_line; +struct frame_unwind; + +/* The traditional frame unwinder. */ +extern const struct frame_unwind *trad_frame_unwind; /* The frame object. */ @@ -302,43 +306,6 @@ extern CORE_ADDR frame_pc_unwind (struct frame_info *frame); caller's frame. */ extern struct frame_id frame_id_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 - be non NULL. When VALUEP is NULL, just the location of the - register should be returned. - - UNWIND_CACHE is provided as mechanism for implementing a per-frame - local cache. It's initial value being NULL. Memory for that cache - should be allocated using frame_obstack_zalloc(). - - Register window architectures (eg SPARC) should note that REGNUM - identifies the register for the previous frame. For instance, a - request for the value of "o1" for the previous frame would be found - in the register "i1" in this FRAME. */ - -typedef void (frame_register_unwind_ftype) (struct frame_info *frame, - void **unwind_cache, - int regnum, - int *optimized, - enum lval_type *lvalp, - CORE_ADDR *addrp, - 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); - -/* Same as for registers above, but return the ID of the frame that - called this one. */ - -typedef void (frame_id_unwind_ftype) (struct frame_info *frame, - void **unwind_cache, - struct frame_id *id); - /* Describe the saved registers of a frame. */ #if defined (EXTRA_FRAME_INFO) || defined (FRAME_FIND_SAVED_REGS) @@ -426,18 +393,14 @@ struct frame_info better all agree as to the contents. */ void *unwind_cache; - /* See description above. The previous frame's registers. */ - frame_register_unwind_ftype *register_unwind; + /* The frame's unwinder. */ + const struct frame_unwind *unwind; - /* See description above. The previous frame's resume address. - Save the previous PC in a local cache. */ - frame_pc_unwind_ftype *pc_unwind; + /* Cached copy of the previous frame's resume address. */ int pc_unwind_cache_p; CORE_ADDR pc_unwind_cache; - /* See description above. The previous frame's resume address. - Save the previous PC in a local cache. */ - frame_id_unwind_ftype *id_unwind; + /* Cached copy of the previous frame's ID. */ int id_unwind_cache_p; struct frame_id id_unwind_cache; |