OSDN Git Service

* gdbtypes.c (copy_type_recursive): Clear new fields.
authortromey <tromey>
Mon, 10 Nov 2008 20:53:43 +0000 (20:53 +0000)
committertromey <tromey>
Mon, 10 Nov 2008 20:53:43 +0000 (20:53 +0000)
gdb/ChangeLog
gdb/gdbtypes.c

index 090a942..b2d74fc 100644 (file)
@@ -1,5 +1,9 @@
 2008-11-10  Tom Tromey  <tromey@redhat.com>
 
+       * gdbtypes.c (copy_type_recursive): Clear new fields.
+
+2008-11-10  Tom Tromey  <tromey@redhat.com>
+
        * cli/cli-cmds.c (source_script): Clean up full_pathname.  Run
        cleanups on early return.
 
index b5a5de0..5b9d0e8 100644 (file)
@@ -2977,6 +2977,7 @@ copy_type_recursive (struct objfile *objfile,
 
       nfields = TYPE_NFIELDS (type);
       TYPE_FIELDS (new_type) = xmalloc (sizeof (struct field) * nfields);
+      memset (TYPE_FIELDS (new_type), 0, sizeof (struct field) * nfields);
       for (i = 0; i < nfields; i++)
        {
          TYPE_FIELD_ARTIFICIAL (new_type, i) =