aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2003-06-01 09:19:40 +0000
committerMark Kettenis <kettenis@gnu.org>2003-06-01 09:19:40 +0000
commit2473a4a98206b481e178aa7ef555501b29b1fb0a (patch)
tree5bf593cbdf4d2fe7cf8cc267105d70f3f3d54e2c
parent9e9617a51f0f04c099d8711aaf2b4f131071498f (diff)
downloadgdb-2473a4a98206b481e178aa7ef555501b29b1fb0a.zip
gdb-2473a4a98206b481e178aa7ef555501b29b1fb0a.tar.gz
gdb-2473a4a98206b481e178aa7ef555501b29b1fb0a.tar.bz2
From Richard Henderson <rth@redhat.com>:
* dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Fix ptr arithmetic.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/dwarf2-frame.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3aaf0d8..ef7ebbe 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2003-06-01 Mark Kettenis <kettenis@gnu.org>
+
+ From Richard Henderson <rth@redhat.com>:
+ * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Fix ptr arithmetic.
+
2003-05-31 Andrew Cagney <cagney@redhat.com>
* mips-tdep.c (set_reg_offset): Add saved_regs parameter. Add
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c
index 2b35dd7..7694218 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;
}