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/gdbarch.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/gdbarch.c')
-rw-r--r-- | gdb/gdbarch.c | 40 |
1 files changed, 34 insertions, 6 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 81efdad..10f6397 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -761,13 +761,9 @@ verify_gdbarch (struct gdbarch *gdbarch) && (gdbarch->frame_args_skip == -1)) fprintf_unfiltered (log, "\n\tframe_args_skip"); /* Skip verify of frameless_function_invocation, invalid_p == 0 */ - if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) - && (gdbarch->frame_chain == 0)) - fprintf_unfiltered (log, "\n\tframe_chain"); + /* Skip verify of frame_chain, has predicate */ /* Skip verify of frame_chain_valid, has predicate */ - if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) - && (gdbarch->frame_saved_pc == 0)) - fprintf_unfiltered (log, "\n\tframe_saved_pc"); + /* Skip verify of frame_saved_pc, has predicate */ /* Skip verify of frame_args_address, invalid_p == 0 */ /* Skip verify of frame_locals_address, invalid_p == 0 */ if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) @@ -1429,6 +1425,15 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) "gdbarch_dump: FRAME_ARGS_SKIP = %ld\n", (long) FRAME_ARGS_SKIP); #endif +#ifdef FRAME_CHAIN_P + fprintf_unfiltered (file, + "gdbarch_dump: %s # %s\n", + "FRAME_CHAIN_P()", + XSTRING (FRAME_CHAIN_P ())); + fprintf_unfiltered (file, + "gdbarch_dump: FRAME_CHAIN_P() = %d\n", + FRAME_CHAIN_P ()); +#endif #ifdef FRAME_CHAIN fprintf_unfiltered (file, "gdbarch_dump: %s # %s\n", @@ -1505,6 +1510,15 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) (long) current_gdbarch->frame_num_args /*FRAME_NUM_ARGS ()*/); #endif +#ifdef FRAME_SAVED_PC_P + fprintf_unfiltered (file, + "gdbarch_dump: %s # %s\n", + "FRAME_SAVED_PC_P()", + XSTRING (FRAME_SAVED_PC_P ())); + fprintf_unfiltered (file, + "gdbarch_dump: FRAME_SAVED_PC_P() = %d\n", + FRAME_SAVED_PC_P ()); +#endif #ifdef FRAME_SAVED_PC fprintf_unfiltered (file, "gdbarch_dump: %s # %s\n", @@ -4657,6 +4671,13 @@ set_gdbarch_frameless_function_invocation (struct gdbarch *gdbarch, gdbarch->frameless_function_invocation = frameless_function_invocation; } +int +gdbarch_frame_chain_p (struct gdbarch *gdbarch) +{ + gdb_assert (gdbarch != NULL); + return gdbarch->frame_chain != 0; +} + CORE_ADDR gdbarch_frame_chain (struct gdbarch *gdbarch, struct frame_info *frame) { @@ -4702,6 +4723,13 @@ set_gdbarch_frame_chain_valid (struct gdbarch *gdbarch, gdbarch->frame_chain_valid = frame_chain_valid; } +int +gdbarch_frame_saved_pc_p (struct gdbarch *gdbarch) +{ + gdb_assert (gdbarch != NULL); + return gdbarch->frame_saved_pc != 0; +} + CORE_ADDR gdbarch_frame_saved_pc (struct gdbarch *gdbarch, struct frame_info *fi) { |