From 2473a4a98206b481e178aa7ef555501b29b1fb0a Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sun, 1 Jun 2003 09:19:40 +0000 Subject: [PATCH] From Richard Henderson : * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Fix ptr arithmetic. --- gdb/ChangeLog | 5 +++++ gdb/dwarf2-frame.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3aaf0d8e014..ef7ebbe07d8 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2003-06-01 Mark Kettenis + + From Richard Henderson : + * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Fix ptr arithmetic. + 2003-05-31 Andrew Cagney * mips-tdep.c (set_reg_offset): Add saved_regs parameter. Add diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c index 2b35dd782e8..7694218b904 100644 --- a/gdb/dwarf2-frame.c +++ b/gdb/dwarf2-frame.c @@ -163,7 +163,7 @@ dwarf2_frame_state_alloc_regs (struct dwarf2_frame_state_reg_info *rs, xrealloc (rs->reg, num_regs * size); /* Initialize newly allocated registers. */ - memset (rs->reg + rs->num_regs * size, 0, (num_regs - rs->num_regs) * size); + memset (rs->reg + rs->num_regs, 0, (num_regs - rs->num_regs) * size); rs->num_regs = num_regs; } -- 2.30.2