aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbarch.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-03-25 18:54:16 +0000
committerAndrew Cagney <cagney@redhat.com>2003-03-25 18:54:16 +0000
commit1bf6d5cced30fb7670ad45b0b51a2ea77ec3dc4b (patch)
tree3e5e367daef929fecf3a1393d756d1d2b54449a9 /gdb/gdbarch.c
parent71c08af019a7ba4f2bd7e63d08ab3b2f3343e9a8 (diff)
downloadgdb-1bf6d5cced30fb7670ad45b0b51a2ea77ec3dc4b.zip
gdb-1bf6d5cced30fb7670ad45b0b51a2ea77ec3dc4b.tar.gz
gdb-1bf6d5cced30fb7670ad45b0b51a2ea77ec3dc4b.tar.bz2
2003-03-25 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh (CALL_DUMMY_STACK_ADJUST_P): Delete. (DEPRECATED_CALL_DUMMY_STACK_ADJUST): Replace CALL_DUMMY_STACK_ADJUST with a predicate variable. * gdbarch.h, gdbarch.c: Regenerate. * xstormy16-tdep.c (xstormy16_gdbarch_init): Do not set call_dummy_stack_adjust_p. * vax-tdep.c (vax_gdbarch_init): Ditto. * v850-tdep.c (v850_gdbarch_init): Ditto. * sh-tdep.c (sh_gdbarch_init): Ditto. * s390-tdep.c (s390_gdbarch_init): Ditto. * rs6000-tdep.c (rs6000_gdbarch_init): Ditto. * ns32k-tdep.c (ns32k_gdbarch_init): Ditto. * mn10300-tdep.c (mn10300_gdbarch_init): Ditto. * mips-tdep.c (mips_gdbarch_init): Ditto. * mcore-tdep.c (mcore_gdbarch_init): Ditto. * m68k-tdep.c (m68k_gdbarch_init): Ditto. * m68hc11-tdep.c (m68hc11_gdbarch_init): Ditto. * ia64-tdep.c (ia64_gdbarch_init): Ditto. * i386-tdep.c (i386_gdbarch_init): Ditto. * h8300-tdep.c (h8300_gdbarch_init): Ditto. * frv-tdep.c (frv_gdbarch_init): Ditto. * d10v-tdep.c (d10v_gdbarch_init): Ditto. * cris-tdep.c (cris_gdbarch_init): Ditto. * avr-tdep.c (avr_gdbarch_init): Ditto. * arm-tdep.c (arm_gdbarch_init): Ditto. * alpha-tdep.c (alpha_gdbarch_init): Ditto. * config/sparc/tm-sp64.h (CALL_DUMMY_STACK_ADJUST): Update. * config/sparc/tm-sparc.h (CALL_DUMMY_STACK_ADJUST): Update. * config/sparc/tm-sp64.h (CALL_DUMMY_STACK_ADJUST): Update. * sparc-tdep.c (sparc_gdbarch_init): Update. Do not set call_dummy_stack_adjust_p. * inferior.h (CALL_DUMMY_STACK_ADJUST_P): Delete macro. (CALL_DUMMY_STACK_ADJUST): Delete macro. * sparc-tdep.c (sparc32_push_arguments): Update. * valops.c (hand_function_call): Update. 2003-03-25 Andrew Cagney <cagney@redhat.com> * gdbint.texinfo (Target Architecture Definition): Delete reference to CALL_DUMMY_STACK_ADJUST_P. Rename CALL_DUMMY_STACK_ADJUST to DEPRECATED_CALL_DUMMY_STACK_ADJUST. Add reference to PUSH_ARGUMENTS.
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r--gdb/gdbarch.c77
1 files changed, 27 insertions, 50 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index ef0ef6b..d3010c1 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -195,8 +195,7 @@ struct gdbarch
int call_dummy_p;
LONGEST * call_dummy_words;
int sizeof_call_dummy_words;
- int call_dummy_stack_adjust_p;
- int call_dummy_stack_adjust;
+ int deprecated_call_dummy_stack_adjust;
gdbarch_fix_call_dummy_ftype *fix_call_dummy;
gdbarch_deprecated_init_frame_pc_first_ftype *deprecated_init_frame_pc_first;
gdbarch_deprecated_init_frame_pc_ftype *deprecated_init_frame_pc;
@@ -434,7 +433,6 @@ struct gdbarch startup_gdbarch =
0,
0,
0,
- 0,
generic_in_function_epilogue_p,
construct_inferior_arguments,
0,
@@ -538,7 +536,6 @@ gdbarch_alloc (const struct gdbarch_info *info,
current_gdbarch->call_dummy_p = -1;
current_gdbarch->call_dummy_words = legacy_call_dummy_words;
current_gdbarch->sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
- current_gdbarch->call_dummy_stack_adjust_p = -1;
current_gdbarch->register_convertible = generic_register_convertible_not;
current_gdbarch->convert_register_p = legacy_convert_register_p;
current_gdbarch->register_to_value = legacy_register_to_value;
@@ -700,12 +697,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
fprintf_unfiltered (log, "\n\tcall_dummy_p");
/* Skip verify of call_dummy_words, invalid_p == 0 */
/* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
- if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
- && (gdbarch->call_dummy_stack_adjust_p == -1))
- fprintf_unfiltered (log, "\n\tcall_dummy_stack_adjust_p");
- if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
- && (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0))
- fprintf_unfiltered (log, "\n\tcall_dummy_stack_adjust");
+ /* Skip verify of deprecated_call_dummy_stack_adjust, has predicate */
if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
&& (gdbarch->fix_call_dummy == 0))
fprintf_unfiltered (log, "\n\tfix_call_dummy");
@@ -1002,23 +994,6 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
"gdbarch_dump: CALL_DUMMY_P = %d\n",
CALL_DUMMY_P);
#endif
-#ifdef CALL_DUMMY_STACK_ADJUST
- fprintf_unfiltered (file,
- "gdbarch_dump: CALL_DUMMY_STACK_ADJUST # %s\n",
- XSTRING (CALL_DUMMY_STACK_ADJUST));
- if (CALL_DUMMY_STACK_ADJUST_P)
- fprintf_unfiltered (file,
- "gdbarch_dump: CALL_DUMMY_STACK_ADJUST = 0x%08lx\n",
- (long) CALL_DUMMY_STACK_ADJUST);
-#endif
-#ifdef CALL_DUMMY_STACK_ADJUST_P
- fprintf_unfiltered (file,
- "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P # %s\n",
- XSTRING (CALL_DUMMY_STACK_ADJUST_P));
- fprintf_unfiltered (file,
- "gdbarch_dump: CALL_DUMMY_STACK_ADJUST_P = 0x%08lx\n",
- (long) CALL_DUMMY_STACK_ADJUST_P);
-#endif
#ifdef CALL_DUMMY_START_OFFSET
fprintf_unfiltered (file,
"gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
@@ -1113,6 +1088,23 @@ 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_STACK_ADJUST_P
+ fprintf_unfiltered (file,
+ "gdbarch_dump: %s # %s\n",
+ "DEPRECATED_CALL_DUMMY_STACK_ADJUST_P()",
+ XSTRING (DEPRECATED_CALL_DUMMY_STACK_ADJUST_P ()));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST_P() = %d\n",
+ DEPRECATED_CALL_DUMMY_STACK_ADJUST_P ());
+#endif
+#ifdef DEPRECATED_CALL_DUMMY_STACK_ADJUST
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST # %s\n",
+ XSTRING (DEPRECATED_CALL_DUMMY_STACK_ADJUST));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: DEPRECATED_CALL_DUMMY_STACK_ADJUST = %d\n",
+ DEPRECATED_CALL_DUMMY_STACK_ADJUST);
+#endif
#ifdef DEPRECATED_DO_REGISTERS_INFO_P
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -3872,41 +3864,26 @@ set_gdbarch_sizeof_call_dummy_words (struct gdbarch *gdbarch,
}
int
-gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch)
+gdbarch_deprecated_call_dummy_stack_adjust_p (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->call_dummy_stack_adjust_p == -1)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_call_dummy_stack_adjust_p invalid");
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust_p called\n");
- return gdbarch->call_dummy_stack_adjust_p;
-}
-
-void
-set_gdbarch_call_dummy_stack_adjust_p (struct gdbarch *gdbarch,
- int call_dummy_stack_adjust_p)
-{
- gdbarch->call_dummy_stack_adjust_p = call_dummy_stack_adjust_p;
+ return gdbarch->deprecated_call_dummy_stack_adjust != 0;
}
int
-gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch)
+gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);
- if (gdbarch->call_dummy_stack_adjust_p && gdbarch->call_dummy_stack_adjust == 0)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_call_dummy_stack_adjust invalid");
if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_stack_adjust called\n");
- return gdbarch->call_dummy_stack_adjust;
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_deprecated_call_dummy_stack_adjust called\n");
+ return gdbarch->deprecated_call_dummy_stack_adjust;
}
void
-set_gdbarch_call_dummy_stack_adjust (struct gdbarch *gdbarch,
- int call_dummy_stack_adjust)
+set_gdbarch_deprecated_call_dummy_stack_adjust (struct gdbarch *gdbarch,
+ int deprecated_call_dummy_stack_adjust)
{
- gdbarch->call_dummy_stack_adjust = call_dummy_stack_adjust;
+ gdbarch->deprecated_call_dummy_stack_adjust = deprecated_call_dummy_stack_adjust;
}
void