summaryrefslogtreecommitdiff
path: root/gdb/gdbarch.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-08-18 20:04:56 +0000
committerAndrew Cagney <cagney@redhat.com>2003-08-18 20:04:56 +0000
commit2fd454d4066c573307deae8135c2653df6d5204d (patch)
treea535e9fece06db97fc6825a90d28b7e0a5142373 /gdb/gdbarch.c
parent4b16c6f5794cd8cdb48ff118c11005968819be1e (diff)
downloadgdb-2fd454d4066c573307deae8135c2653df6d5204d.tar.gz
Index: ChangeLog
2003-08-18 Andrew Cagney <cagney@redhat.com> * gdbarch.sh (FRAME_RED_ZONE_SIZE): New architecture method. * gdbarch.h, gdbarch.c: Re-generate. * infcall.c (call_function_by_hand): Adjust the SP by frame_red_zone_size before allocating any stack space. * rs6000-tdep.c (rs6000_gdbarch_init): Set "frame_red_zone_size". * x86-64-tdep.c (x86_64_frame_align): New function. (x86_64_init_abi): Set "frame_red_zone_size" and "frame_align". * x86-64-tdep.c (x86_64_push_arguments): Revert 2003-08-07 change. Remove code adjusting SP so that it skips over the Red Zone. Index: doc/ChangeLog 2003-08-18 Andrew Cagney <cagney@redhat.com> * gdbint.texinfo (Target Architecture Definition): Document "frame_red_zone_size".
Diffstat (limited to 'gdb/gdbarch.c')
-rw-r--r--gdb/gdbarch.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 2fa918accbe..523dfac250f 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -238,6 +238,7 @@ struct gdbarch
gdbarch_stack_align_ftype *stack_align;
gdbarch_frame_align_ftype *frame_align;
gdbarch_reg_struct_has_addr_ftype *reg_struct_has_addr;
+ int frame_red_zone_size;
int parm_boundary;
const struct floatformat * float_format;
const struct floatformat * double_format;
@@ -405,6 +406,7 @@ struct gdbarch startup_gdbarch =
0, /* stack_align */
0, /* frame_align */
0, /* reg_struct_has_addr */
+ 0, /* frame_red_zone_size */
0, /* parm_boundary */
0, /* float_format */
0, /* double_format */
@@ -1723,6 +1725,14 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
(long) current_gdbarch->frame_num_args
/*FRAME_NUM_ARGS ()*/);
#endif
+#ifdef FRAME_RED_ZONE_SIZE
+ fprintf_unfiltered (file,
+ "gdbarch_dump: FRAME_RED_ZONE_SIZE # %s\n",
+ XSTRING (FRAME_RED_ZONE_SIZE));
+ fprintf_unfiltered (file,
+ "gdbarch_dump: FRAME_RED_ZONE_SIZE = %d\n",
+ FRAME_RED_ZONE_SIZE);
+#endif
#ifdef FUNCTION_START_OFFSET
fprintf_unfiltered (file,
"gdbarch_dump: FUNCTION_START_OFFSET # %s\n",
@@ -4906,6 +4916,22 @@ set_gdbarch_reg_struct_has_addr (struct gdbarch *gdbarch,
}
int
+gdbarch_frame_red_zone_size (struct gdbarch *gdbarch)
+{
+ gdb_assert (gdbarch != NULL);
+ if (gdbarch_debug >= 2)
+ fprintf_unfiltered (gdb_stdlog, "gdbarch_frame_red_zone_size called\n");
+ return gdbarch->frame_red_zone_size;
+}
+
+void
+set_gdbarch_frame_red_zone_size (struct gdbarch *gdbarch,
+ int frame_red_zone_size)
+{
+ gdbarch->frame_red_zone_size = frame_red_zone_size;
+}
+
+int
gdbarch_parm_boundary (struct gdbarch *gdbarch)
{
gdb_assert (gdbarch != NULL);