aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2000-08-04 04:00:44 +0000
committerAndrew Cagney <cagney@redhat.com>2000-08-04 04:00:44 +0000
commit1dd4193b86bf171d26caea1756f8d881981c212d (patch)
treec2846ba7c2660dec9aef1e3656361cab998d159b /gdb
parent0a49d05ee07086ae07448a203fc8e89ea0af89d1 (diff)
downloadgdb-1dd4193b86bf171d26caea1756f8d881981c212d.zip
gdb-1dd4193b86bf171d26caea1756f8d881981c212d.tar.gz
gdb-1dd4193b86bf171d26caea1756f8d881981c212d.tar.bz2
Missing GDBARCH updates for EXTRA_STACK_ALIGNMENT needed.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/gdbarch.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 9a6813b..d679f93 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -225,6 +225,7 @@ struct gdbarch
gdbarch_saved_pc_after_call_ftype *saved_pc_after_call;
gdbarch_frame_num_args_ftype *frame_num_args;
gdbarch_stack_align_ftype *stack_align;
+ 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;
const struct floatformat * float_format;
@@ -350,6 +351,7 @@ struct gdbarch startup_gdbarch =
0,
0,
0,
+ 0,
/* startup_gdbarch() */
};
@@ -410,6 +412,7 @@ gdbarch_alloc (const struct gdbarch_info *info,
gdbarch->remote_translate_xfer_address = generic_remote_translate_xfer_address;
gdbarch->frame_args_skip = -1;
gdbarch->frameless_function_invocation = generic_frameless_function_invocation_not;
+ gdbarch->extra_stack_alignment_needed = 1;
/* gdbarch_alloc() */
return gdbarch;
@@ -663,6 +666,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
&& (gdbarch->frame_num_args == 0))
internal_error ("gdbarch: verify_gdbarch: frame_num_args invalid");
/* Skip verify of stack_align, has predicate */
+ /* 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 */
if (gdbarch->float_format == 0)
@@ -1261,6 +1265,11 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
"STACK_ALIGN(sp)",
XSTRING (STACK_ALIGN (sp)));
#endif
+#ifdef EXTRA_STACK_ALIGNMENT_NEEDED
+ fprintf_unfiltered (file,
+ "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED # %s\n",
+ XSTRING (EXTRA_STACK_ALIGNMENT_NEEDED));
+#endif
#ifdef REG_STRUCT_HAS_ADDR
fprintf_unfiltered (file,
"gdbarch_dump: %s # %s\n",
@@ -1906,6 +1915,11 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->stack_align
/*STACK_ALIGN ()*/);
#endif
+#ifdef EXTRA_STACK_ALIGNMENT_NEEDED
+ fprintf_unfiltered (file,
+ "gdbarch_dump: EXTRA_STACK_ALIGNMENT_NEEDED = %ld\n",
+ (long) EXTRA_STACK_ALIGNMENT_NEEDED);
+#endif
#ifdef REG_STRUCT_HAS_ADDR
if (GDB_MULTI_ARCH)
fprintf_unfiltered (file,
@@ -3608,6 +3622,22 @@ set_gdbarch_stack_align (struct gdbarch *gdbarch,
}
int
+gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch)
+{
+ /* Skip verify of extra_stack_alignment_needed, invalid_p == 0 */
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_extra_stack_alignment_needed called\n");
+ return gdbarch->extra_stack_alignment_needed;
+}
+
+void
+set_gdbarch_extra_stack_alignment_needed (struct gdbarch *gdbarch,
+ int extra_stack_alignment_needed)
+{
+ gdbarch->extra_stack_alignment_needed = extra_stack_alignment_needed;
+}
+
+int
gdbarch_reg_struct_has_addr_p (struct gdbarch *gdbarch)
{
return gdbarch->reg_struct_has_addr != 0;