aboutsummaryrefslogtreecommitdiff
path: root/gdb/sh-tdep.c
diff options
context:
space:
mode:
authorJason Thorpe <thorpej@netbsd.org>2002-05-07 21:51:34 +0000
committerJason Thorpe <thorpej@netbsd.org>2002-05-07 21:51:34 +0000
commite7d717c0b0ea4bc7456f5dc6027e24562296a0b5 (patch)
treed75c930cf12f604e51e229835e1c7145882001e5 /gdb/sh-tdep.c
parentcafa39179f373e52e99adfc33ad474138f3771d4 (diff)
downloadgdb-e7d717c0b0ea4bc7456f5dc6027e24562296a0b5.zip
gdb-e7d717c0b0ea4bc7456f5dc6027e24562296a0b5.tar.gz
gdb-e7d717c0b0ea4bc7456f5dc6027e24562296a0b5.tar.bz2
* sh-tdep.c (sh_nofp_frame_init_saved_regs): Fix error in
size computation for alloca. (sh_fp_frame_init_saved_regs): Likewise.
Diffstat (limited to 'gdb/sh-tdep.c')
-rw-r--r--gdb/sh-tdep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index 996e611..c47a668 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -481,7 +481,7 @@ sh_find_callers_reg (struct frame_info *fi, int regnum)
static void
sh_nofp_frame_init_saved_regs (struct frame_info *fi)
{
- int *where = (int *) alloca (NUM_REGS + NUM_PSEUDO_REGS);
+ int *where = (int *) alloca ((NUM_REGS + NUM_PSEUDO_REGS) * sizeof(int));
int rn;
int have_fp = 0;
int depth;
@@ -623,7 +623,7 @@ dr_reg_base_num (int dr_regnum)
static void
sh_fp_frame_init_saved_regs (struct frame_info *fi)
{
- int *where = (int *) alloca (NUM_REGS + NUM_PSEUDO_REGS);
+ int *where = (int *) alloca ((NUM_REGS + NUM_PSEUDO_REGS) * sizeof(int));
int rn;
int have_fp = 0;
int depth;