diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-03-05 23:14:18 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-03-05 23:14:18 +0000 |
commit | 6314f104748d0e970aa089d2ba544f81a491b565 (patch) | |
tree | cd0ccc6aba2d308e24939cc29c045ff0b10944a8 /gdb/gdbarch.c | |
parent | 77bc0b710e2c41acdf462c9f8608eb747549257c (diff) | |
download | gdb-6314f104748d0e970aa089d2ba544f81a491b565.zip gdb-6314f104748d0e970aa089d2ba544f81a491b565.tar.gz gdb-6314f104748d0e970aa089d2ba544f81a491b565.tar.bz2 |
2003-03-05 Andrew Cagney <cagney@redhat.com>
* d10v-tdep.c (d10v_unwind_dummy_id): New function.
(d10v_gdbarch_init): Set unwind_dummy_id and save_dummy_frame_tos.
* frame.c (get_prev_frame): Restructure the frame ID unwind code
to use unwind_dummy_id when a dummy frame.
* gdbarch.sh (unwind_dummy_id): New multi-arch method with
predicate.
* gdbarch.h, gdbarch.c: Regneerate.
Index: doc/ChangeLog
2003-03-05 Andrew Cagney <cagney@redhat.com>
* gdbint.texinfo (Target Architecture Definition): Document
unwind_dummy_id. Cross reference unwind_dummy_id and
SAVE_DUMMY_FRAME_TOS.
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r-- | gdb/gdbarch.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 68247d6..636349c 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -251,6 +251,7 @@ struct gdbarch int extra_stack_alignment_needed; gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr; gdbarch_save_dummy_frame_tos_ftype *save_dummy_frame_tos; + gdbarch_unwind_dummy_id_ftype *unwind_dummy_id; int parm_boundary; const struct floatformat * float_format; const struct floatformat * double_format; @@ -431,6 +432,7 @@ struct gdbarch startup_gdbarch = 0, 0, 0, + 0, generic_in_function_epilogue_p, construct_inferior_arguments, 0, @@ -770,6 +772,7 @@ verify_gdbarch (struct gdbarch *gdbarch) /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */ /* Skip verify of reg_struct_has_addr, has predicate */ /* Skip verify of save_dummy_frame_tos, has predicate */ + /* Skip verify of unwind_dummy_id, has predicate */ if (gdbarch->float_format == 0) gdbarch->float_format = default_float_format (gdbarch); if (gdbarch->double_format == 0) @@ -2567,6 +2570,14 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) (long) current_gdbarch->write_sp /*TARGET_WRITE_SP ()*/); #endif + if (GDB_MULTI_ARCH) + fprintf_unfiltered (file, + "gdbarch_dump: gdbarch_unwind_dummy_id_p() = %d\n", + gdbarch_unwind_dummy_id_p (current_gdbarch)); + if (GDB_MULTI_ARCH) + fprintf_unfiltered (file, + "gdbarch_dump: unwind_dummy_id = 0x%08lx\n", + (long) current_gdbarch->unwind_dummy_id); #ifdef USE_STRUCT_CONVENTION fprintf_unfiltered (file, "gdbarch_dump: %s # %s\n", @@ -5032,6 +5043,32 @@ set_gdbarch_save_dummy_frame_tos (struct gdbarch *gdbarch, } int +gdbarch_unwind_dummy_id_p (struct gdbarch *gdbarch) +{ + gdb_assert (gdbarch != NULL); + return gdbarch->unwind_dummy_id != 0; +} + +struct frame_id +gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *info) +{ + gdb_assert (gdbarch != NULL); + if (gdbarch->unwind_dummy_id == 0) + internal_error (__FILE__, __LINE__, + "gdbarch: gdbarch_unwind_dummy_id invalid"); + if (gdbarch_debug >= 2) + fprintf_unfiltered (gdb_stdlog, "gdbarch_unwind_dummy_id called\n"); + return gdbarch->unwind_dummy_id (gdbarch, info); +} + +void +set_gdbarch_unwind_dummy_id (struct gdbarch *gdbarch, + gdbarch_unwind_dummy_id_ftype unwind_dummy_id) +{ + gdbarch->unwind_dummy_id = unwind_dummy_id; +} + +int gdbarch_parm_boundary (struct gdbarch *gdbarch) { gdb_assert (gdbarch != NULL); |