* gdbtypes.c (copy_type_recursive): Clear new fields.
authorTom Tromey <tromey@redhat.com>
Mon, 10 Nov 2008 20:53:43 +0000 (20:53 +0000)
committerTom Tromey <tromey@redhat.com>
Mon, 10 Nov 2008 20:53:43 +0000 (20:53 +0000)
gdb/ChangeLog
gdb/gdbtypes.c

index 090a9424fdf464ddde3c23d45a8cce6115d3ef3c..b2d74fc8d9042bdf67d86f54bb2bc2435536e72e 100644 (file)
@@ -1,3 +1,7 @@
+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
index b5a5de0e5ee126312f5e80cb8fc9af26ef68fee3..5b9d0e873ad51d840ff114a9329dc2772fdffaa6 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) = 
This page took 0.029013 seconds and 4 git commands to generate.