This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[commit, 6.0] Fix xmalloc frame foobar
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Tue, 12 Aug 2003 13:48:06 -0400
- Subject: [commit, 6.0] Fix xmalloc frame foobar
This [should] fix a breakage in the deprecated frame xmalloc method - it
was allocating from the wrong heap :-(
committed to 6.0 and mainline.
Andrew
2003-08-12 Andrew Cagney <cagney@redhat.com>
* frame.c (deprecated_frame_xmalloc): Use XMALLOC, instead of
FRAME_OBSTACK_ZALLOC.
Index: frame.c
===================================================================
RCS file: /cvs/src/src/gdb/frame.c,v
retrieving revision 1.136
diff -u -r1.136 frame.c
--- frame.c 10 Aug 2003 14:56:23 -0000 1.136
+++ frame.c 12 Aug 2003 17:44:29 -0000
@@ -2279,7 +2279,8 @@
struct frame_info *
deprecated_frame_xmalloc (void)
{
- struct frame_info *frame = FRAME_OBSTACK_ZALLOC (struct frame_info);
+ struct frame_info *frame = XMALLOC (struct frame_info);
+ memset (frame, 0, sizeof (*frame));
frame->this_id.p = 1;
return frame;
}