From e7d717c0b0ea4bc7456f5dc6027e24562296a0b5 Mon Sep 17 00:00:00 2001 From: Jason Thorpe Date: Tue, 7 May 2002 21:51:34 +0000 Subject: [PATCH] * sh-tdep.c (sh_nofp_frame_init_saved_regs): Fix error in size computation for alloca. (sh_fp_frame_init_saved_regs): Likewise. --- gdb/ChangeLog | 6 ++++++ gdb/sh-tdep.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 339bb59e887..8bb4d0a08b6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2002-05-07 Jason Thorpe + + * sh-tdep.c (sh_nofp_frame_init_saved_regs): Fix error in + size computation for alloca. + (sh_fp_frame_init_saved_regs): Likewise. + 2002-05-07 Richard Earnshaw * arm-tdep.h (ARM_MAX_REGISTER_RAW_SIZE): Define. diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c index 996e6116627..c47a6682eb9 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; -- 2.30.2