forked from Imagelibrary/binutils-gdb
2002-12-10 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (DEPRECATED_INIT_FRAME_PC): Rename INIT_FRAME_PC. Change to a function with predicate. * gdbarch.h, gdbarch.c: Re-generate. * frame.c (get_prev_frame): Update. Test DEPRECATED_INIT_FRAME_PC_P. * config/sparc/tm-sparc.h (DEPRECATED_INIT_FRAME_PC): Update. * config/rs6000/tm-rs6000.h (DEPRECATED_INIT_FRAME_PC): Update. * config/mn10200/tm-mn10200.h (DEPRECATED_INIT_FRAME_PC): Update. * alpha-tdep.c (alpha_gdbarch_init): Update. * mn10300-tdep.c (mn10300_gdbarch_init): Update. * mips-tdep.c (mips_gdbarch_init): Update. * i386-interix-tdep.c (i386_interix_init_abi): Update. * arm-tdep.c: Update comments. * h8300-tdep.c (h8300_gdbarch_init): Explicitly set init_frame_pc. * config/m32r/tm-m32r.h (DEPRECATED_INIT_FRAME_PC): Ditto. * frv-tdep.c (frv_gdbarch_init): Ditto. * x86-64-tdep.c (x86_64_init_abi): Ditto. * ia64-tdep.c (ia64_gdbarch_init): Ditto. * s390-tdep.c (s390_gdbarch_init): Ditto. * v850-tdep.c (v850_gdbarch_init): Ditto. * vax-tdep.c (vax_gdbarch_init): Ditto. * sh-tdep.c (sh_gdbarch_init): Ditto. * ns32k-tdep.c (ns32k_gdbarch_init): Ditto. * m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto. * mcore-tdep.c (mcore_gdbarch_init): Ditto. * xstormy16-tdep.c (xstormy16_gdbarch_init): Ditto. * i386-tdep.c (i386_gdbarch_init): Ditto. * d10v-tdep.c (d10v_gdbarch_init): Ditto. * cris-tdep.c (cris_gdbarch_init): Ditto. * avr-tdep.c (avr_gdbarch_init): Ditto. * arm-tdep.c (arm_gdbarch_init): Ditto. * config/z8k/tm-z8k.h (INIT_FRAME_PC_FIRST): Delete macro. (DEPRECATED_INIT_FRAME_PC): Rename INIT_FRAME_PC.
This commit is contained in:
27
gdb/frame.c
27
gdb/frame.c
@@ -972,25 +972,25 @@ get_prev_frame (struct frame_info *next_frame)
|
||||
prev->type = NORMAL_FRAME;
|
||||
|
||||
/* This change should not be needed, FIXME! We should determine
|
||||
whether any targets *need* INIT_FRAME_PC to happen after
|
||||
INIT_EXTRA_FRAME_INFO and come up with a simple way to express
|
||||
what goes on here.
|
||||
whether any targets *need* DEPRECATED_INIT_FRAME_PC to happen
|
||||
after INIT_EXTRA_FRAME_INFO and come up with a simple way to
|
||||
express what goes on here.
|
||||
|
||||
INIT_EXTRA_FRAME_INFO is called from two places: create_new_frame
|
||||
(where the PC is already set up) and here (where it isn't).
|
||||
INIT_FRAME_PC is only called from here, always after
|
||||
DEPRECATED_INIT_FRAME_PC is only called from here, always after
|
||||
INIT_EXTRA_FRAME_INFO.
|
||||
|
||||
The catch is the MIPS, where INIT_EXTRA_FRAME_INFO requires the
|
||||
PC value (which hasn't been set yet). Some other machines appear
|
||||
to require INIT_EXTRA_FRAME_INFO before they can do
|
||||
INIT_FRAME_PC. Phoo.
|
||||
DEPRECATED_INIT_FRAME_PC. Phoo.
|
||||
|
||||
We shouldn't need DEPRECATED_INIT_FRAME_PC_FIRST to add more
|
||||
complication to an already overcomplicated part of GDB.
|
||||
gnu@cygnus.com, 15Sep92.
|
||||
|
||||
Assuming that some machines need INIT_FRAME_PC after
|
||||
Assuming that some machines need DEPRECATED_INIT_FRAME_PC after
|
||||
INIT_EXTRA_FRAME_INFO, one possible scheme:
|
||||
|
||||
SETUP_INNERMOST_FRAME(): Default version is just create_new_frame
|
||||
@@ -1002,17 +1002,17 @@ get_prev_frame (struct frame_info *next_frame)
|
||||
SETUP_ARBITRARY_FRAME would have to do that.
|
||||
|
||||
INIT_PREV_FRAME(fromleaf, prev) Replace INIT_EXTRA_FRAME_INFO and
|
||||
INIT_FRAME_PC. This should also return a flag saying whether to
|
||||
keep the new frame, or whether to discard it, because on some
|
||||
machines (e.g. mips) it is really awkward to have
|
||||
DEPRECATED_INIT_FRAME_PC. This should also return a flag saying
|
||||
whether to keep the new frame, or whether to discard it, because
|
||||
on some machines (e.g. mips) it is really awkward to have
|
||||
FRAME_CHAIN_VALID called *before* INIT_EXTRA_FRAME_INFO (there is
|
||||
no good way to get information deduced in FRAME_CHAIN_VALID into
|
||||
the extra fields of the new frame). std_frame_pc(fromleaf, prev)
|
||||
|
||||
This is the default setting for INIT_PREV_FRAME. It just does
|
||||
what the default INIT_FRAME_PC does. Some machines will call it
|
||||
from INIT_PREV_FRAME (either at the beginning, the end, or in the
|
||||
middle). Some machines won't use it.
|
||||
what the default DEPRECATED_INIT_FRAME_PC does. Some machines
|
||||
will call it from INIT_PREV_FRAME (either at the beginning, the
|
||||
end, or in the middle). Some machines won't use it.
|
||||
|
||||
kingdon@cygnus.com, 13Apr93, 31Jan94, 14Dec94. */
|
||||
|
||||
@@ -1050,7 +1050,8 @@ get_prev_frame (struct frame_info *next_frame)
|
||||
/* This entry is in the frame queue now, which is good since
|
||||
FRAME_SAVED_PC may use that queue to figure out its value (see
|
||||
tm-sparc.h). We want the pc saved in the inferior frame. */
|
||||
prev->pc = (INIT_FRAME_PC (fromleaf, prev));
|
||||
if (DEPRECATED_INIT_FRAME_PC_P ())
|
||||
prev->pc = DEPRECATED_INIT_FRAME_PC (fromleaf, prev);
|
||||
|
||||
/* If ->frame and ->pc are unchanged, we are in the process of
|
||||
getting ourselves into an infinite backtrace. Some architectures
|
||||
|
||||
Reference in New Issue
Block a user