diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-09-09 03:58:18 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-09-09 03:58:18 +0000 |
commit | 88a82a65e0c920f2b543fb1c9eed02b8554b2db2 (patch) | |
tree | 008e298e0866de90a83aa1b7a9b603c788e23a6c /gdb/gdbarch.c | |
parent | 3e2c403395e32572a8b6f0ed4cc4f8f73d8040c0 (diff) | |
download | gdb-88a82a65e0c920f2b543fb1c9eed02b8554b2db2.zip gdb-88a82a65e0c920f2b543fb1c9eed02b8554b2db2.tar.gz gdb-88a82a65e0c920f2b543fb1c9eed02b8554b2db2.tar.bz2 |
2003-09-08 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (DEPRECATED_CALL_DUMMY_ADDRESS): Rename
CALL_DUMMY_ADDRESS, change to a predicate.
* gdbarch.h, gdbarch.c: Re-generate.
* blockframe.c (deprecated_pc_in_call_dummy_at_entry_point):
Use either DEPRECATED_CALL_DUMMY_ADDRESS or entry_point_address.
* infcall.c (call_function_by_hand): Ditto.
* sparc-tdep.c (sparc_push_return_address): Ditto.
(sparc_gdbarch_init): Set deprecated_call_dummy_address.
* xstormy16-tdep.c (xstormy16_push_return_address): Replace
CALL_DUMMY_ADDRESS with entry_point_address.
* v850-tdep.c (v850_push_return_address): Ditto.
* s390-tdep.c (s390_push_return_address): Ditto.
* rs6000-tdep.c (ppc_push_return_address): Ditto.
* mn10300-tdep.c (mn10300_push_return_address): Ditto.
* mcore-tdep.c (mcore_push_return_address): Ditto.
* cris-tdep.c (cris_push_return_address): Ditto.
* arm-tdep.c (arm_push_return_address): Ditto.
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r-- | gdb/gdbarch.c | 57 |
1 files changed, 36 insertions, 21 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index b523935..d7c65f4 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -168,7 +168,7 @@ struct gdbarch gdbarch_deprecated_dummy_write_sp_ftype *deprecated_dummy_write_sp; int deprecated_register_size; int call_dummy_location; - gdbarch_call_dummy_address_ftype *call_dummy_address; + gdbarch_deprecated_call_dummy_address_ftype *deprecated_call_dummy_address; CORE_ADDR deprecated_call_dummy_start_offset; CORE_ADDR deprecated_call_dummy_breakpoint_offset; int deprecated_call_dummy_length; @@ -336,7 +336,7 @@ struct gdbarch startup_gdbarch = 0, /* deprecated_dummy_write_sp */ 0, /* deprecated_register_size */ 0, /* call_dummy_location */ - 0, /* call_dummy_address */ + 0, /* deprecated_call_dummy_address */ 0, /* deprecated_call_dummy_start_offset */ 0, /* deprecated_call_dummy_breakpoint_offset */ 0, /* deprecated_call_dummy_length */ @@ -513,7 +513,6 @@ gdbarch_alloc (const struct gdbarch_info *info, current_gdbarch->deprecated_fp_regnum = -1; current_gdbarch->deprecated_use_generic_dummy_frames = 1; current_gdbarch->call_dummy_location = AT_ENTRY_POINT; - current_gdbarch->call_dummy_address = entry_point_address; current_gdbarch->deprecated_call_dummy_words = legacy_call_dummy_words; current_gdbarch->deprecated_sizeof_call_dummy_words = legacy_sizeof_call_dummy_words; current_gdbarch->print_registers_info = default_print_registers_info; @@ -656,7 +655,7 @@ verify_gdbarch (struct gdbarch *gdbarch) /* Skip verify of deprecated_push_return_address, has predicate */ /* Skip verify of deprecated_dummy_write_sp, has predicate */ /* Skip verify of call_dummy_location, invalid_p == 0 */ - /* Skip verify of call_dummy_address, invalid_p == 0 */ + /* Skip verify of deprecated_call_dummy_address, has predicate */ /* Skip verify of deprecated_call_dummy_words, invalid_p == 0 */ /* Skip verify of deprecated_sizeof_call_dummy_words, invalid_p == 0 */ /* Skip verify of deprecated_call_dummy_stack_adjust, has predicate */ @@ -887,16 +886,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) (long) current_gdbarch->breakpoint_from_pc /*BREAKPOINT_FROM_PC ()*/); #endif -#ifdef CALL_DUMMY_ADDRESS - fprintf_unfiltered (file, - "gdbarch_dump: %s # %s\n", - "CALL_DUMMY_ADDRESS()", - XSTRING (CALL_DUMMY_ADDRESS ())); - fprintf_unfiltered (file, - "gdbarch_dump: CALL_DUMMY_ADDRESS = <0x%08lx>\n", - (long) current_gdbarch->call_dummy_address - /*CALL_DUMMY_ADDRESS ()*/); -#endif #ifdef CALL_DUMMY_LOCATION fprintf_unfiltered (file, "gdbarch_dump: CALL_DUMMY_LOCATION # %s\n", @@ -974,6 +963,25 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file) "gdbarch_dump: DECR_PC_AFTER_BREAK = %ld\n", (long) DECR_PC_AFTER_BREAK); #endif +#ifdef DEPRECATED_CALL_DUMMY_ADDRESS_P + fprintf_unfiltered (file, + "gdbarch_dump: %s # %s\n", + "DEPRECATED_CALL_DUMMY_ADDRESS_P()", + XSTRING (DEPRECATED_CALL_DUMMY_ADDRESS_P ())); + fprintf_unfiltered (file, + "gdbarch_dump: DEPRECATED_CALL_DUMMY_ADDRESS_P() = %d\n", + DEPRECATED_CALL_DUMMY_ADDRESS_P ()); +#endif +#ifdef DEPRECATED_CALL_DUMMY_ADDRESS + fprintf_unfiltered (file, + "gdbarch_dump: %s # %s\n", + "DEPRECATED_CALL_DUMMY_ADDRESS()", + XSTRING (DEPRECATED_CALL_DUMMY_ADDRESS ())); + fprintf_unfiltered (file, + "gdbarch_dump: DEPRECATED_CALL_DUMMY_ADDRESS = <0x%08lx>\n", + (long) current_gdbarch->deprecated_call_dummy_address + /*DEPRECATED_CALL_DUMMY_ADDRESS ()*/); +#endif #ifdef DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET fprintf_unfiltered (file, "gdbarch_dump: DEPRECATED_CALL_DUMMY_BREAKPOINT_OFFSET # %s\n", @@ -3501,21 +3509,28 @@ set_gdbarch_call_dummy_location (struct gdbarch *gdbarch, gdbarch->call_dummy_location = call_dummy_location; } +int +gdbarch_deprecated_call_dummy_address_p (struct gdbarch *gdbarch) +{ + gdb_assert (gdbarch != NULL); + return gdbarch->deprecated_call_dummy_address != NULL; +} + CORE_ADDR -gdbarch_call_dummy_address (struct gdbarch *gdbarch) +gdbarch_deprecated_call_dummy_address (struct gdbarch *gdbarch) { gdb_assert (gdbarch != NULL); - gdb_assert (gdbarch->call_dummy_address != NULL); + gdb_assert (gdbarch->deprecated_call_dummy_address != NULL); if (gdbarch_debug >= 2) - fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_address called\n"); - return gdbarch->call_dummy_address (); + fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_address called\n"); + return gdbarch->deprecated_call_dummy_address (); } void -set_gdbarch_call_dummy_address (struct gdbarch *gdbarch, - gdbarch_call_dummy_address_ftype call_dummy_address) +set_gdbarch_deprecated_call_dummy_address (struct gdbarch *gdbarch, + gdbarch_deprecated_call_dummy_address_ftype deprecated_call_dummy_address) { - gdbarch->call_dummy_address = call_dummy_address; + gdbarch->deprecated_call_dummy_address = deprecated_call_dummy_address; } CORE_ADDR |