diff options
author | nobody <> | 2003-04-19 14:43:51 +0000 |
---|---|---|
committer | nobody <> | 2003-04-19 14:43:51 +0000 |
commit | 291862d73dc6b445dae7638c7490d74473dea27c (patch) | |
tree | 9263a76bef13f0ba98af84e9496af9524e617d83 /gdb/frame.h | |
parent | bad7deeefd1fa35f148ce755f6ee1e00c3c0d05e (diff) | |
download | fsf-binutils-gdb-291862d73dc6b445dae7638c7490d74473dea27c.zip fsf-binutils-gdb-291862d73dc6b445dae7638c7490d74473dea27c.tar.gz fsf-binutils-gdb-291862d73dc6b445dae7638c7490d74473dea27c.tar.bz2 |
This commit was manufactured by cvs2svn to create branchkettenis_i386newframe-20030419-branchpoint
'kettenis_i386newframe-20030419-branch'.
Sprout from kettenis_i386newframe-20030406-branch 2003-04-06 14:50:16 UTC nobody 'This commit was manufactured by cvs2svn to create branch'
Cherrypick from master 2003-04-19 14:43:50 UTC Mark Kettenis <kettenis@gnu.org> '* i386-tdep.c (i386_num_register_names): New variable.':
ChangeLog
Makefile.in
Makefile.tpl
bfd/ChangeLog
bfd/archures.c
bfd/bfd-in2.h
bfd/coff-h8300.c
bfd/coff-h8500.c
bfd/coff-sh.c
bfd/cpu-h8300.c
bfd/cpu-sh.c
bfd/dwarf2.c
bfd/elf32-h8300.c
bfd/elf32-mips.c
bfd/elf32-sh.c
bfd/elf32-sh64-com.c
bfd/elf32-sh64.c
bfd/elf32-xtensa.c
bfd/elf64-alpha.c
bfd/elf64-sh64.c
bfd/elflink.h
bfd/elfn32-mips.c
bfd/elfxx-ia64.c
bfd/elfxx-mips.c
bfd/format.c
bfd/peicode.h
bfd/reloc.c
bfd/version.h
configure
configure.in
gdb/ChangeLog
gdb/Makefile.in
gdb/NEWS
gdb/ada-lang.h
gdb/alpha-tdep.c
gdb/arch-utils.c
gdb/arch-utils.h
gdb/arm-linux-tdep.c
gdb/arm-tdep.c
gdb/avr-tdep.c
gdb/ax-gdb.h
gdb/block.c
gdb/block.h
gdb/blockframe.c
gdb/breakpoint.c
gdb/buildsym.c
gdb/buildsym.h
gdb/builtin-regs.h
gdb/c-lang.h
gdb/cli-out.h
gdb/cli/cli-cmds.c
gdb/cli/cli-cmds.h
gdb/cli/cli-script.h
gdb/cli/cli-setshow.h
gdb/config/i386/nm-ptx4.h
gdb/config/i386/nm-symmetry.h
gdb/config/i386/ptx.mh
gdb/config/i386/ptx.mt
gdb/config/i386/ptx4.mh
gdb/config/i386/ptx4.mt
gdb/config/i386/symmetry.mh
gdb/config/i386/symmetry.mt
gdb/config/i386/tm-ptx.h
gdb/config/i386/tm-ptx4.h
gdb/config/i386/tm-symmetry.h
gdb/config/i386/xm-ptx.h
gdb/config/i386/xm-ptx4.h
gdb/config/i386/xm-symmetry.h
gdb/config/m68k/tm-delta68.h
gdb/config/mips/mipsm3.mh
gdb/config/mips/mipsm3.mt
gdb/config/mips/tm-mipsm3.h
gdb/config/mips/xm-mipsm3.h
gdb/config/nm-linux.h
gdb/config/nm-lynx.h
gdb/config/nm-m3.h
gdb/config/pa/tm-hppa.h
gdb/config/pa/tm-hppah.h
gdb/config/rs6000/tm-rs6000.h
gdb/config/sparc/sparclet.mt
gdb/config/sparc/sparclite.mt
gdb/config/sparc/tm-sp64.h
gdb/config/sparc/tm-sparc.h
gdb/config/sparc/tm-sparclet.h
gdb/config/sparc/tm-sparclite.h
gdb/configure.host
gdb/configure.tgt
gdb/core-regset.c
gdb/cp-abi.h
gdb/cp-namespace.c
gdb/cp-support.c
gdb/cp-support.h
gdb/cp-valprint.c
gdb/cris-tdep.c
gdb/d10v-tdep.c
gdb/defs.h
gdb/disasm.c
gdb/disasm.h
gdb/doc/ChangeLog
gdb/doc/gdb.texinfo
gdb/doc/gdbint.texinfo
gdb/doublest.c
gdb/doublest.h
gdb/dummy-frame.c
gdb/dwarf2cfi.h
gdb/dwarf2expr.c
gdb/dwarf2expr.h
gdb/dwarf2loc.c
gdb/dwarf2loc.h
gdb/dwarf2read.c
gdb/event-top.h
gdb/fork-child.c
gdb/frame.c
gdb/frame.h
gdb/frv-tdep.c
gdb/gdb.h
gdb/gdb_gcore.sh
gdb/gdb_indent.sh
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/gdbcmd.h
gdb/gdbcore.h
gdb/gdbthread.h
gdb/gdbtypes.h
gdb/h8300-tdep.c
gdb/hppa-hpux-tdep.c
gdb/hppa-tdep.c
gdb/i386-cygwin-tdep.c
gdb/i386-interix-tdep.c
gdb/i386-linux-nat.c
gdb/i386-linux-tdep.c
gdb/i386-tdep.c
gdb/i386-tdep.h
gdb/i386ly-tdep.c
gdb/i387-tdep.c
gdb/i387-tdep.h
gdb/ia64-tdep.c
gdb/infcmd.c
gdb/inferior.h
gdb/infrun.c
gdb/jv-lang.c
gdb/language.h
gdb/linespec.h
gdb/m3-nat.c
gdb/m68hc11-tdep.c
gdb/m68k-tdep.c
gdb/maint.c
gdb/mcore-tdep.c
gdb/minsyms.c
gdb/mips-tdep.c
gdb/mips-tdep.h
gdb/mipsm3-nat.c
gdb/mn10300-tdep.c
gdb/monitor.h
gdb/ns32k-tdep.c
gdb/ns32knbsd-nat.c
gdb/objc-lang.c
gdb/ocd.h
gdb/ppc-linux-tdep.c
gdb/ppc-tdep.h
gdb/reggroups.c
gdb/remote-utils.h
gdb/remote-vx.c
gdb/remote.c
gdb/rs6000-tdep.c
gdb/s390-nat.c
gdb/s390-tdep.c
gdb/ser-unix.h
gdb/serial.h
gdb/sh-tdep.c
gdb/solib-irix.c
gdb/solib-osf.c
gdb/solib-sunos.c
gdb/solib-svr4.c
gdb/solib-svr4.h
gdb/source.h
gdb/sparc-tdep.c
gdb/sparcl-stub.c
gdb/sparcl-tdep.c
gdb/sparclet-rom.c
gdb/sparclet-stub.c
gdb/srec.h
gdb/stabsread.h
gdb/symfile.h
gdb/symm-nat.c
gdb/symm-tdep.c
gdb/symmisc.c
gdb/symtab.c
gdb/symtab.h
gdb/target.h
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/args.exp
gdb/testsuite/gdb.base/attach.exp
gdb/testsuite/gdb.base/completion.exp
gdb/testsuite/gdb.c++/derivation.cc
gdb/testsuite/gdb.c++/derivation.exp
gdb/testsuite/gdb.c++/maint.exp
gdb/testsuite/gdb.c++/overload.cc
gdb/testsuite/gdb.c++/overload.exp
gdb/testsuite/gdb.c++/userdef.cc
gdb/testsuite/gdb.c++/userdef.exp
gdb/testsuite/gdb.mi/ChangeLog
gdb/testsuite/gdb.mi/gdb792.exp
gdb/testsuite/gdb.threads/pthreads.exp
gdb/testsuite/gdb.threads/schedlock.c
gdb/thread-db.c
gdb/thread.c
gdb/typeprint.h
gdb/utils.c
gdb/v850-tdep.c
gdb/valprint.h
gdb/value.h
gdb/values.c
gdb/vax-tdep.c
gdb/version.in
gdb/x86-64-tdep.c
gdb/x86-64-tdep.h
gdb/xmodem.h
gdb/xstormy16-tdep.c
include/coff/ChangeLog
include/coff/h8300.h
include/coff/h8500.h
include/coff/sh.h
include/elf/ChangeLog
include/elf/common.h
include/opcode/ChangeLog
include/opcode/h8300.h
include/opcode/mips.h
libiberty/ChangeLog
libiberty/Makefile.in
libiberty/argv.c
libiberty/calloc.c
libiberty/config.in
libiberty/configure
libiberty/configure.in
libiberty/copysign.c
libiberty/floatformat.c
libiberty/functions.texi
libiberty/getcwd.c
libiberty/getopt.c
libiberty/hashtab.c
libiberty/maint-tool
libiberty/memchr.c
libiberty/memcmp.c
libiberty/memcpy.c
libiberty/memmove.c
libiberty/mempcpy.c
libiberty/memset.c
libiberty/regex.c
libiberty/rename.c
libiberty/sigsetmask.c
libiberty/snprintf.c
libiberty/stpcpy.c
libiberty/stpncpy.c
libiberty/strcasecmp.c
libiberty/strdup.c
libiberty/strncasecmp.c
libiberty/strncmp.c
libiberty/strsignal.c
libiberty/strstr.c
libiberty/vfprintf.c
libiberty/vprintf.c
libiberty/vsnprintf.c
libiberty/vsprintf.c
libiberty/xatexit.c
libiberty/xmalloc.c
libtool.m4
opcodes/ChangeLog
opcodes/h8500-opc.h
opcodes/ia64-asmtab.c
opcodes/ia64-ic.tbl
opcodes/mips-dis.c
sim/arm/ChangeLog
sim/arm/armvirt.c
sim/common/ChangeLog
sim/common/Make-common.in
sim/configure
sim/configure.in
sim/h8300/ChangeLog
sim/h8300/compile.c
sim/mips/ChangeLog
sim/mips/vr.igen
sim/testsuite/sim/h8300/ChangeLog
sim/testsuite/sim/h8300/add.b.s
sim/testsuite/sim/h8300/add.l.s
sim/testsuite/sim/h8300/add.w.s
sim/testsuite/sim/h8300/adds.s
sim/testsuite/sim/h8300/addx.s
sim/testsuite/sim/h8300/allinsn.exp
sim/testsuite/sim/h8300/and.b.s
sim/testsuite/sim/h8300/and.l.s
sim/testsuite/sim/h8300/and.w.s
sim/testsuite/sim/h8300/bfld.s
sim/testsuite/sim/h8300/bra.s
sim/testsuite/sim/h8300/brabc.s
sim/testsuite/sim/h8300/bset.s
sim/testsuite/sim/h8300/cmp.b.s
sim/testsuite/sim/h8300/cmp.l.s
sim/testsuite/sim/h8300/cmp.w.s
sim/testsuite/sim/h8300/daa.s
sim/testsuite/sim/h8300/das.s
sim/testsuite/sim/h8300/dec.s
sim/testsuite/sim/h8300/ext.l.s
sim/testsuite/sim/h8300/ext.w.s
sim/testsuite/sim/h8300/inc.s
sim/testsuite/sim/h8300/jmp.s
sim/testsuite/sim/h8300/ldc.s
sim/testsuite/sim/h8300/mac.s
sim/testsuite/sim/h8300/mov.b.s
sim/testsuite/sim/h8300/mov.l.s
sim/testsuite/sim/h8300/mov.w.s
sim/testsuite/sim/h8300/movmd.s
sim/testsuite/sim/h8300/movsd.s
sim/testsuite/sim/h8300/neg.s
sim/testsuite/sim/h8300/nop.s
sim/testsuite/sim/h8300/not.s
sim/testsuite/sim/h8300/or.b.s
sim/testsuite/sim/h8300/or.l.s
sim/testsuite/sim/h8300/or.w.s
sim/testsuite/sim/h8300/rotl.s
sim/testsuite/sim/h8300/rotr.s
sim/testsuite/sim/h8300/rotxl.s
sim/testsuite/sim/h8300/rotxr.s
sim/testsuite/sim/h8300/shal.s
sim/testsuite/sim/h8300/shar.s
sim/testsuite/sim/h8300/shll.s
sim/testsuite/sim/h8300/shlr.s
sim/testsuite/sim/h8300/stc.s
sim/testsuite/sim/h8300/sub.b.s
sim/testsuite/sim/h8300/sub.l.s
sim/testsuite/sim/h8300/sub.w.s
sim/testsuite/sim/h8300/testutils.inc
sim/testsuite/sim/h8300/xor.b.s
sim/testsuite/sim/h8300/xor.l.s
sim/testsuite/sim/h8300/xor.w.s
sim/v850/ChangeLog
Diffstat (limited to 'gdb/frame.h')
-rw-r--r-- | gdb/frame.h | 161 |
1 files changed, 42 insertions, 119 deletions
diff --git a/gdb/frame.h b/gdb/frame.h index f928b9c..f33755a 100644 --- a/gdb/frame.h +++ b/gdb/frame.h @@ -27,6 +27,7 @@ struct symtab_and_line; struct frame_unwind; struct frame_base; struct block; +struct gdbarch; /* A legacy unwinder to prop up architectures using the old style saved regs array. */ @@ -43,15 +44,24 @@ struct frame_info; struct frame_id { - /* The frame's address. This should be constant through out the - lifetime of a frame. */ + /* The frame's stack address. This shall be constant through out + the lifetime of a frame. Note that this requirement applies to + not just the function body, but also the prologue and (in theory + at least) the epilogue. Since that value needs to fall either on + the boundary, or within the frame's address range, the frame's + outer-most address (the inner-most address of the previous frame) + is used. Watch out for all the legacy targets that still use the + function pointer register or stack pointer register. They are + wrong. */ /* NOTE: cagney/2002-11-16: The ia64 has two stacks and hence two frame bases. This will need to be expanded to accomodate that. */ - CORE_ADDR base; - /* The frame's current PC. While the PC within the function may - change, the function that contains the PC does not. Should this - instead be the frame's function? */ - CORE_ADDR pc; + CORE_ADDR stack_addr; + /* The frame's code address. This shall be constant through out the + lifetime of the frame. While the PC (a.k.a. resume address) + changes as the function is executed, this code address cannot. + Typically, it is set to the address of the entry point of the + frame's function (as returned by frame_func_unwind(). */ + CORE_ADDR code_addr; }; /* Methods for constructing and comparing Frame IDs. @@ -65,12 +75,12 @@ struct frame_id /* For convenience. All fields are zero. */ extern const struct frame_id null_frame_id; -/* Construct a frame ID. The second parameter isn't yet well defined. - It might be the containing function, or the resume PC (see comment - above in `struct frame_id')? A func/pc of zero indicates a - wildcard (i.e., do not use func in frame ID comparisons). */ -extern struct frame_id frame_id_build (CORE_ADDR base, - CORE_ADDR func_or_pc); +/* Construct a frame ID. The first parameter is the frame's constant + stack address (typically the outer-bound), and the second the + frame's constant code address (typically the entry point) (or zero, + to indicate a wild card). */ +extern struct frame_id frame_id_build (CORE_ADDR stack_addr, + CORE_ADDR code_addr); /* Returns non-zero when L is a valid frame (a valid frame has a non-zero .base). */ @@ -146,7 +156,9 @@ extern struct frame_info *frame_find_by_id (struct frame_id id); /* Base attributes of a frame: */ /* The frame's `resume' address. Where the program will resume in - this frame. */ + this frame. + + This replaced: frame->pc; */ extern CORE_ADDR get_frame_pc (struct frame_info *); /* Following on from the `resume' address. Return the entry point @@ -194,7 +206,9 @@ extern void find_frame_sal (struct frame_info *frame, get_frame_args_address: A set of high-level debug-info dependant addresses that fall within the frame. These addresses almost certainly will not match the stack address part of a frame ID (as - returned by get_frame_base). */ + returned by get_frame_base). + + This replaced: frame->frame; */ extern CORE_ADDR get_frame_base (struct frame_info *); @@ -324,105 +338,6 @@ extern CORE_ADDR frame_pc_unwind (struct frame_info *frame); of the caller. */ extern void frame_pop (struct frame_info *frame); -/* We keep a cache of stack frames, each of which is a "struct - frame_info". The innermost one gets allocated (in - wait_for_inferior) each time the inferior stops; current_frame - points to it. Additional frames get allocated (in - get_prev_frame) as needed, and are chained through the next - and prev fields. Any time that the frame cache becomes invalid - (most notably when we execute something, but also if we change how - we interpret the frames (e.g. "set heuristic-fence-post" in - mips-tdep.c, or anything which reads new symbols)), we should call - reinit_frame_cache. */ - -struct frame_info - { - /* Nominal address of the frame described. See comments at - get_frame_base() about what this means outside the *FRAME* - macros; in the *FRAME* macros, it can mean whatever makes most - sense for this machine. */ - CORE_ADDR frame; - - /* Address at which execution is occurring in this frame. - For the innermost frame, it's the current pc. - For other frames, it is a pc saved in the next frame. */ - CORE_ADDR pc; - - /* Level of this frame. The inner-most (youngest) frame is at - level 0. As you move towards the outer-most (oldest) frame, - the level increases. This is a cached value. It could just as - easily be computed by counting back from the selected frame to - the inner most frame. */ - /* NOTE: cagney/2002-04-05: Perhaphs a level of ``-1'' should be - reserved to indicate a bogus frame - one that has been created - just to keep GDB happy (GDB always needs a frame). For the - moment leave this as speculation. */ - int level; - - /* The frame's type. */ - /* FIXME: cagney/2003-04-02: Should instead be returning - ->unwind->type. Unfortunatly, legacy code is still explicitly - setting the type using the method deprecated_set_frame_type. - Eliminate that method and this field can be eliminated. */ - enum frame_type type; - - /* For each register, address of where it was saved on entry to - the frame, or zero if it was not saved on entry to this frame. - This includes special registers such as pc and fp saved in - special ways in the stack frame. The SP_REGNUM is even more - special, the address here is the sp for the previous frame, not - the address where the sp was saved. */ - /* Allocated by frame_saved_regs_zalloc () which is called / - initialized by DEPRECATED_FRAME_INIT_SAVED_REGS(). */ - CORE_ADDR *saved_regs; /*NUM_REGS + NUM_PSEUDO_REGS*/ - - /* Anything extra for this structure that may have been defined - in the machine dependent files. */ - /* Allocated by frame_extra_info_zalloc () which is called / - initialized by DEPRECATED_INIT_EXTRA_FRAME_INFO */ - struct frame_extra_info *extra_info; - - /* If dwarf2 unwind frame informations is used, this structure holds all - related unwind data. */ - struct context *context; - - /* The frame's low-level unwinder and corresponding cache. The - low-level unwinder is responsible for unwinding register values - for the previous frame. The low-level unwind methods are - selected based on the presence, or otherwize, of register - unwind information such as CFI. */ - void *prologue_cache; - const struct frame_unwind *unwind; - - /* Cached copy of the previous frame's resume address. */ - int pc_unwind_cache_p; - CORE_ADDR pc_unwind_cache; - - /* Cached copy of the previous frame's function address. */ - struct - { - CORE_ADDR addr; - int p; - } prev_func; - - /* This frame's ID. Note that the frame's ID, base and PC contain - redundant information. */ - int id_p; - struct frame_id id; - - /* The frame's high-level base methods, and corresponding cache. - The high level base methods are selected based on the frame's - debug info. */ - const struct frame_base *base; - void *base_cache; - - /* Pointers to the next (down, inner, younger) and previous (up, - outer, older) frame_info's in the frame cache. */ - struct frame_info *next; /* down, inner, younger */ - int prev_p; - struct frame_info *prev; /* up, outer, older */ - }; - /* Values for the source flag to be used in print_frame_info_base(). */ enum print_what { @@ -455,10 +370,14 @@ enum print_what extern void *frame_obstack_zalloc (unsigned long size); #define FRAME_OBSTACK_ZALLOC(TYPE) ((TYPE *) frame_obstack_zalloc (sizeof (TYPE))) -/* If DEPRECATED_FRAME_CHAIN_VALID returns zero it means that the - given frame is the outermost one and has no caller. */ +/* If legacy_frame_chain_valid() returns zero it means that the given + frame is the outermost one and has no caller. -extern int frame_chain_valid (CORE_ADDR, struct frame_info *); + This method has been superseeded by the per-architecture + frame_unwind_pc() (returns 0 to indicate an invalid return address) + and per-frame this_id() (returns a NULL frame ID to indicate an + invalid frame). */ +extern int legacy_frame_chain_valid (CORE_ADDR, struct frame_info *); extern void generic_save_dummy_frame_tos (CORE_ADDR sp); @@ -629,7 +548,9 @@ extern CORE_ADDR *get_frame_saved_regs (struct frame_info *); /* FIXME: cagney/2002-12-06: Has the PC in the current frame changed? "infrun.c", Thanks to DECR_PC_AFTER_BREAK, can change the PC after - the initial frame create. This puts things back in sync. */ + the initial frame create. This puts things back in sync. + + This replaced: frame->pc = ....; */ extern void deprecated_update_frame_pc_hack (struct frame_info *frame, CORE_ADDR pc); @@ -637,7 +558,9 @@ extern void deprecated_update_frame_pc_hack (struct frame_info *frame, more exact, whas that initial guess at the frame's base as returned by read_fp() wrong. If it was, fix it. This shouldn't be necessary since the code should be getting the frame's base correct - from the outset. */ + from the outset. + + This replaced: frame->frame = ....; */ extern void deprecated_update_frame_base_hack (struct frame_info *frame, CORE_ADDR base); |