diff options
author | Daniel Jacobowitz <drow@false.org> | 2003-01-05 01:39:56 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2003-01-05 01:39:56 +0000 |
commit | 516034834f1bcade05e3dcd85e9c7c8b899adbd6 (patch) | |
tree | 7dfa0fc3ff5a3e7da16a50ff725fac9a561d7ec8 /gdb/gdbarch.h | |
parent | 95f90d2595724210a3f27456baeb6eed02ece2bc (diff) | |
download | gdb-516034834f1bcade05e3dcd85e9c7c8b899adbd6.zip gdb-516034834f1bcade05e3dcd85e9c7c8b899adbd6.tar.gz gdb-516034834f1bcade05e3dcd85e9c7c8b899adbd6.tar.bz2 |
* arm-tdep.c (arm_frame_chain_valid): Remove unnecessary test.
* d10v-tdep.c (d10v_frame_chain_valid): Remove unnecessary tests.
* hppa-tdep.c (hppa_frame_chain_valid): Remove unnecessary test.
* blockframe.c: Include "gdbcmd.h" and "command.h".
(backtrace_below_main): New variable.
(file_frame_chain_valid, func_frame_chain_valid)
(nonnull_frame_chain_valid, generic_file_frame_chain_valid)
(generic_func_frame_chain_valid): Remove functions.
(frame_chain_valid, do_flush_frames_sfunc): New functions.
(_initialize_blockframe): New function.
* Makefile.in (blockframe.o): Update dependencies.
* frame.c (frame_saved_regs_id_unwind, get_prev_frame): Remove FIXME
comment. Call frame_chain_valid ().
* frame.h: Remove old prototypes. Add prototype for
frame_chain_valid and update comments to match.
* gdbarch.sh: Change FRAME_CHAIN_VALID into a predicated function.
Remove old comment.
* gdbarch.h: Regenerated.
* gdbarch.c: Regenerated.
Plus updates to all other targets not to provide a FRAME_CHAIN_VALID.
Diffstat (limited to 'gdb/gdbarch.h')
-rw-r--r-- | gdb/gdbarch.h | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index edb8ade..d973fa3 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -1987,17 +1987,29 @@ extern void set_gdbarch_frame_chain (struct gdbarch *gdbarch, gdbarch_frame_chai #endif #endif -/* Define a default FRAME_CHAIN_VALID, in the form that is suitable for - most targets. If FRAME_CHAIN_VALID returns zero it means that the - given frame is the outermost one and has no caller. - - XXXX - both default and alternate frame_chain_valid functions are - deprecated. New code should use dummy frames and one of the generic - functions. */ +#if defined (FRAME_CHAIN_VALID) +/* Legacy for systems yet to multi-arch FRAME_CHAIN_VALID */ +#if !defined (FRAME_CHAIN_VALID_P) +#define FRAME_CHAIN_VALID_P() (1) +#endif +#endif + +/* Default predicate for non- multi-arch targets. */ +#if (!GDB_MULTI_ARCH) && !defined (FRAME_CHAIN_VALID_P) +#define FRAME_CHAIN_VALID_P() (0) +#endif + +extern int gdbarch_frame_chain_valid_p (struct gdbarch *gdbarch); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (FRAME_CHAIN_VALID_P) +#error "Non multi-arch definition of FRAME_CHAIN_VALID" +#endif +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (FRAME_CHAIN_VALID_P) +#define FRAME_CHAIN_VALID_P() (gdbarch_frame_chain_valid_p (current_gdbarch)) +#endif /* Default (function) for non- multi-arch platforms. */ #if (!GDB_MULTI_ARCH) && !defined (FRAME_CHAIN_VALID) -#define FRAME_CHAIN_VALID(chain, thisframe) (generic_func_frame_chain_valid (chain, thisframe)) +#define FRAME_CHAIN_VALID(chain, thisframe) (internal_error (__FILE__, __LINE__, "FRAME_CHAIN_VALID"), 0) #endif typedef int (gdbarch_frame_chain_valid_ftype) (CORE_ADDR chain, struct frame_info *thisframe); |