diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-08-18 20:04:56 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-08-18 20:04:56 +0000 |
commit | 8b148df9ac8532b4a7cd0be2fdd011d29037e435 (patch) | |
tree | cf06b7ccca66764a7a1823a25600df7a756108c8 /gdb/gdbarch.c | |
parent | 4091ea4e210e42c1d028e2a6143ff74d47e0aedf (diff) | |
download | gdb-8b148df9ac8532b4a7cd0be2fdd011d29037e435.zip gdb-8b148df9ac8532b4a7cd0be2fdd011d29037e435.tar.gz gdb-8b148df9ac8532b4a7cd0be2fdd011d29037e435.tar.bz2 |
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.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 2fa918a..523dfac 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); |