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.
2003-01-19 01:25:23 +08:00
|
|
|
/* Definitions for a frame unwinder, for GDB, the GNU debugger.
|
|
|
|
|
2005-12-18 06:34:03 +08:00
|
|
|
Copyright (C) 2003, 2004 Free Software Foundation, Inc.
|
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.
2003-01-19 01:25:23 +08:00
|
|
|
|
|
|
|
This file is part of GDB.
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
2005-12-18 06:34:03 +08:00
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
Boston, MA 02110-1301, USA. */
|
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.
2003-01-19 01:25:23 +08:00
|
|
|
|
|
|
|
#if !defined (FRAME_UNWIND_H)
|
|
|
|
#define FRAME_UNWIND_H 1
|
|
|
|
|
2004-03-22 06:28:52 +08:00
|
|
|
struct frame_data;
|
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.
2003-01-19 01:25:23 +08:00
|
|
|
struct frame_info;
|
|
|
|
struct frame_id;
|
|
|
|
struct frame_unwind;
|
|
|
|
struct gdbarch;
|
|
|
|
struct regcache;
|
|
|
|
|
2003-04-05 11:56:00 +08:00
|
|
|
#include "frame.h" /* For enum frame_type. */
|
|
|
|
|
2003-03-17 22:23:50 +08:00
|
|
|
/* The following unwind functions assume a chain of frames forming the
|
|
|
|
sequence: (outer) prev <-> this <-> next (inner). All the
|
|
|
|
functions are called with called with the next frame's `struct
|
|
|
|
frame_info' and and this frame's prologue cache.
|
|
|
|
|
|
|
|
THIS frame's register values can be obtained by unwinding NEXT
|
|
|
|
frame's registers (a recursive operation).
|
|
|
|
|
|
|
|
THIS frame's prologue cache can be used to cache information such
|
|
|
|
as where this frame's prologue stores the previous frame's
|
|
|
|
registers. */
|
|
|
|
|
2004-03-22 06:28:52 +08:00
|
|
|
/* Given the NEXT frame, take a wiff of THIS frame's registers (namely
|
|
|
|
the PC and attributes) and if SELF is the applicable unwinder,
|
|
|
|
return non-zero. Possibly also initialize THIS_PROLOGUE_CACHE. */
|
|
|
|
|
|
|
|
typedef int (frame_sniffer_ftype) (const struct frame_unwind *self,
|
|
|
|
struct frame_info *next_frame,
|
|
|
|
void **this_prologue_cache);
|
|
|
|
|
2003-03-17 22:23:50 +08:00
|
|
|
/* Assuming the frame chain: (outer) prev <-> this <-> next (inner);
|
|
|
|
use the NEXT frame, and its register unwind method, to determine
|
|
|
|
the frame ID of THIS frame.
|
|
|
|
|
|
|
|
A frame ID provides an invariant that can be used to re-identify an
|
|
|
|
instance of a frame. It is a combination of the frame's `base' and
|
|
|
|
the frame's function's code address.
|
|
|
|
|
|
|
|
Traditionally, THIS frame's ID was determined by examining THIS
|
|
|
|
frame's function's prologue, and identifying the register/offset
|
|
|
|
used as THIS frame's base.
|
|
|
|
|
|
|
|
Example: An examination of THIS frame's prologue reveals that, on
|
|
|
|
entry, it saves the PC(+12), SP(+8), and R1(+4) registers
|
|
|
|
(decrementing the SP by 12). Consequently, the frame ID's base can
|
|
|
|
be determined by adding 12 to the THIS frame's stack-pointer, and
|
|
|
|
the value of THIS frame's SP can be obtained by unwinding the NEXT
|
|
|
|
frame's SP.
|
|
|
|
|
|
|
|
THIS_PROLOGUE_CACHE can be used to share any prolog analysis data
|
|
|
|
with the other unwind methods. Memory for that cache should be
|
2006-08-01 01:33:30 +08:00
|
|
|
allocated using FRAME_OBSTACK_ZALLOC(). */
|
2003-03-17 22:23:50 +08:00
|
|
|
|
|
|
|
typedef void (frame_this_id_ftype) (struct frame_info *next_frame,
|
|
|
|
void **this_prologue_cache,
|
|
|
|
struct frame_id *this_id);
|
|
|
|
|
|
|
|
/* Assuming the frame chain: (outer) prev <-> this <-> next (inner);
|
|
|
|
use the NEXT frame, and its register unwind method, to unwind THIS
|
|
|
|
frame's registers (returning the value of the specified register
|
|
|
|
REGNUM in the previous frame).
|
|
|
|
|
|
|
|
Traditionally, THIS frame's registers were unwound by examining
|
|
|
|
THIS frame's function's prologue and identifying which registers
|
|
|
|
that prolog code saved on the stack.
|
|
|
|
|
|
|
|
Example: An examination of THIS frame's prologue reveals that, on
|
|
|
|
entry, it saves the PC(+12), SP(+8), and R1(+4) registers
|
|
|
|
(decrementing the SP by 12). Consequently, the value of the PC
|
|
|
|
register in the previous frame is found in memory at SP+12, and
|
|
|
|
THIS frame's SP can be obtained by unwinding the NEXT frame's SP.
|
|
|
|
|
|
|
|
Why not pass in THIS_FRAME? By passing in NEXT frame and THIS
|
|
|
|
cache, the supplied parameters are consistent with the sibling
|
|
|
|
function THIS_ID.
|
|
|
|
|
|
|
|
Can the code call ``frame_register (get_prev_frame (NEXT_FRAME))''?
|
|
|
|
Won't the call frame_register (THIS_FRAME) be faster? Well,
|
|
|
|
ignoring the possability that the previous frame does not yet
|
|
|
|
exist, the ``frame_register (FRAME)'' function is expanded to
|
|
|
|
``frame_register_unwind (get_next_frame (FRAME)'' and hence that
|
|
|
|
call will expand to ``frame_register_unwind (get_next_frame
|
|
|
|
(get_prev_frame (NEXT_FRAME)))''. Might as well call
|
|
|
|
``frame_register_unwind (NEXT_FRAME)'' directly.
|
|
|
|
|
|
|
|
THIS_PROLOGUE_CACHE can be used to share any prolog analysis data
|
|
|
|
with the other unwind methods. Memory for that cache should be
|
2006-08-01 01:33:30 +08:00
|
|
|
allocated using FRAME_OBSTACK_ZALLOC(). */
|
2003-03-17 22:23:50 +08:00
|
|
|
|
|
|
|
typedef void (frame_prev_register_ftype) (struct frame_info *next_frame,
|
|
|
|
void **this_prologue_cache,
|
|
|
|
int prev_regnum,
|
|
|
|
int *optimized,
|
|
|
|
enum lval_type * lvalp,
|
|
|
|
CORE_ADDR *addrp,
|
2005-05-22 Andrew Cagney <cagney@gnu.org>
* frame.h (frame_register_unwind, frame_unwind_register)
(get_frame_register, frame_register, put_frame_register)
(get_frame_memory, safe_frame_unwind_memory)
(frame_register_read): Use gdb_byte for byte buffer parameters.
* trad-frame.h (trad_frame_get_register)
(frame_get_prev_register): Ditto.
* frame-unwind.h (frame_prev_register_ftype): Ditto.
* frame.c (frame_pop, frame_register, frame_unwind_register)
(get_frame_register, frame_unwind_register_signed)
(frame_unwind_register_unsigned, frame_unwind_unsigned_register)
(frame_register_read, get_frame_memory): Update.
* trad-frame.c (trad_frame_get_prev_register): Update.
(trad_frame_get_register): Update.
* gdbcore.h (deprecated_read_memory_nobpt, read_memory): Ditto.
* breakpoint.c (deprecated_read_memory_nobpt): Update.
* corefile.c (read_memory): Update.
* tramp-frame.c (tramp_frame_prev_register): Update.
* valops.c (value_assign): Update.
* sentinel-frame.c (sentinel_frame_prev_register): Update.
* std-regs.c (value_of_builtin_frame_fp_reg)
(value_of_builtin_frame_pc_reg): Update.
* infcmd.c (default_print_registers_info): Update
* dummy-frame.c (dummy_frame_prev_register): Update.
* findvar.c (value_of_register, value_from_register): Update.
* tui/tui-regs.c (tui_register_format, tui_get_register): Update.
* mi/mi-main.c (register_changed_p, get_register): Update.
2005-05-22 22:53:35 +08:00
|
|
|
int *realnump, gdb_byte *valuep);
|
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.
2003-01-19 01:25:23 +08:00
|
|
|
|
2004-11-09 09:16:42 +08:00
|
|
|
/* Assuming the frame chain: (outer) prev <-> this <-> next (inner);
|
|
|
|
use the NEXT frame, and its register unwind method, to return the PREV
|
|
|
|
frame's program-counter. */
|
|
|
|
|
|
|
|
typedef CORE_ADDR (frame_prev_pc_ftype) (struct frame_info *next_frame,
|
|
|
|
void **this_prologue_cache);
|
|
|
|
|
|
|
|
|
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.
2003-01-19 01:25:23 +08:00
|
|
|
struct frame_unwind
|
|
|
|
{
|
2003-04-05 11:56:00 +08:00
|
|
|
/* The frame's type. Should this instead be a collection of
|
|
|
|
predicates that test the frame for various attributes? */
|
|
|
|
enum frame_type type;
|
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.
2003-01-19 01:25:23 +08:00
|
|
|
/* Should an attribute indicating the frame's address-in-block go
|
|
|
|
here? */
|
2003-03-17 22:23:50 +08:00
|
|
|
frame_this_id_ftype *this_id;
|
|
|
|
frame_prev_register_ftype *prev_register;
|
2004-03-22 06:28:52 +08:00
|
|
|
const struct frame_data *unwind_data;
|
|
|
|
frame_sniffer_ftype *sniffer;
|
2004-11-09 09:16:42 +08:00
|
|
|
frame_prev_pc_ftype *prev_pc;
|
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.
2003-01-19 01:25:23 +08:00
|
|
|
};
|
|
|
|
|
2004-04-09 04:03:52 +08:00
|
|
|
/* Register a frame unwinder, _prepending_ it to the front of the
|
|
|
|
search list (so it is sniffed before previously registered
|
|
|
|
unwinders). By using a prepend, later calls can install unwinders
|
|
|
|
that override earlier calls. This allows, for instance, an OSABI
|
|
|
|
to install a a more specific sigtramp unwinder that overrides the
|
|
|
|
traditional brute-force unwinder. */
|
|
|
|
extern void frame_unwind_prepend_unwinder (struct gdbarch *gdbarch,
|
|
|
|
const struct frame_unwind *unwinder);
|
2004-03-22 06:28:52 +08:00
|
|
|
|
2003-07-16 01:35:00 +08:00
|
|
|
/* Given the NEXT frame, take a wiff of THIS frame's registers (namely
|
|
|
|
the PC and attributes) and if it is the applicable unwinder return
|
|
|
|
the unwind methods, or NULL if it is not. */
|
|
|
|
|
|
|
|
typedef const struct frame_unwind *(frame_unwind_sniffer_ftype) (struct frame_info *next_frame);
|
|
|
|
|
|
|
|
/* Add a frame sniffer to the list. The predicates are polled in the
|
|
|
|
order that they are appended. The initial list contains the dummy
|
|
|
|
frame sniffer. */
|
|
|
|
|
|
|
|
extern void frame_unwind_append_sniffer (struct gdbarch *gdbarch,
|
|
|
|
frame_unwind_sniffer_ftype *sniffer);
|
|
|
|
|
|
|
|
/* Iterate through the next frame's sniffers until one returns with an
|
2004-03-22 06:28:52 +08:00
|
|
|
unwinder implementation. Possibly initialize THIS_CACHE. */
|
2003-07-16 01:35:00 +08:00
|
|
|
|
2004-03-22 06:28:52 +08:00
|
|
|
extern const struct frame_unwind *frame_unwind_find_by_frame (struct frame_info *next_frame,
|
|
|
|
void **this_cache);
|
2003-07-16 01:35:00 +08:00
|
|
|
|
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.
2003-01-19 01:25:23 +08:00
|
|
|
#endif
|