aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python/py-unwind.c')
-rw-r--r--gdb/python/py-unwind.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/python/py-unwind.c b/gdb/python/py-unwind.c
index 18f8f4d3546..523cb76ab7d 100644
--- a/gdb/python/py-unwind.c
+++ b/gdb/python/py-unwind.c
@@ -572,8 +572,10 @@ pyuw_sniffer (const struct frame_unwind *self, struct frame_info *this_frame,
saved_reg *reg;
int i;
- cached_frame = xmalloc (sizeof (*cached_frame) +
- reg_count * sizeof (cached_frame->reg[0]));
+ cached_frame
+ = ((cached_frame_info *)
+ xmalloc (sizeof (*cached_frame)
+ + reg_count * sizeof (cached_frame->reg[0])));
cached_frame->gdbarch = gdbarch;
cached_frame->frame_id = unwind_info->frame_id;
cached_frame->reg_count = reg_count;