diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 090a9424fd..b2d74fc8d9 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2008-11-10 Tom Tromey + + * gdbtypes.c (copy_type_recursive): Clear new fields. + 2008-11-10 Tom Tromey * cli/cli-cmds.c (source_script): Clean up full_pathname. Run diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index b5a5de0e5e..5b9d0e873a 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -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) =