diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-01-29 18:07:07 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-01-29 18:07:07 +0000 |
commit | d62d1979c455befe90f07993d51a279cc0043f5b (patch) | |
tree | 14aea024165995c8108171095ebcd5cbab780901 /gdb/frame.c | |
parent | 617073a91ffd58111d51e65983f5d442cf933e51 (diff) | |
download | gdb-d62d1979c455befe90f07993d51a279cc0043f5b.zip gdb-d62d1979c455befe90f07993d51a279cc0043f5b.tar.gz gdb-d62d1979c455befe90f07993d51a279cc0043f5b.tar.bz2 |
2003-01-29 Andrew Cagney <ac131313@redhat.com>
* frame.c (frame_saved_regs_id_unwind): Assert FRAME_CHAIN_P.
(legacy_get_prev_frame): Assert FRAME_CHAIN_P.
(get_prev_frame): When FRAME_CHAIN_P, call legacy_get_prev_frame.
(frame_saved_regs_pc_unwind): Assert FRAME_SAVED_PC_P.
* gdbarch.sh (FRAME_CHAIN): Change to a function with predicate.
(FRAME_SAVED_PC): Change to a function with predicate.
* gdbarch.h, gdbarch.c: Re-generate.
Diffstat (limited to 'gdb/frame.c')
-rw-r--r-- | gdb/frame.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/frame.c b/gdb/frame.c index a0cfc6f..e4adf7d 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -665,6 +665,7 @@ frame_saved_regs_register_unwind (struct frame_info *frame, void **cache, static CORE_ADDR frame_saved_regs_pc_unwind (struct frame_info *frame, void **cache) { + gdb_assert (FRAME_SAVED_PC_P ()); return FRAME_SAVED_PC (frame); } @@ -713,6 +714,7 @@ frame_saved_regs_id_unwind (struct frame_info *next_frame, void **cache, this to after the ffi test; I'd rather have backtraces from start go curfluy than have an abort called from main not show main. */ + gdb_assert (FRAME_CHAIN_P ()); base = FRAME_CHAIN (next_frame); if (!frame_chain_valid (base, next_frame)) @@ -995,6 +997,7 @@ legacy_get_prev_frame (struct frame_info *next_frame) this to after the ffi test; I'd rather have backtraces from start go curfluy than have an abort called from main not show main. */ + gdb_assert (FRAME_CHAIN_P ()); address = FRAME_CHAIN (next_frame); if (!frame_chain_valid (address, next_frame)) @@ -1233,7 +1236,8 @@ get_prev_frame (struct frame_info *next_frame) frames use the new unwind code. */ if ((DEPRECATED_INIT_FRAME_PC_P () || DEPRECATED_INIT_FRAME_PC_FIRST_P () - || INIT_EXTRA_FRAME_INFO_P ()) + || INIT_EXTRA_FRAME_INFO_P () + || FRAME_CHAIN_P ()) && next_frame->level >= 0) return legacy_get_prev_frame (next_frame); |