From: Tom Tromey Date: Mon, 10 Nov 2008 20:53:43 +0000 (+0000) Subject: * gdbtypes.c (copy_type_recursive): Clear new fields. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=de8ee0e21e34883b9eb72b6fca4122560bfff0ae;p=binutils-gdb.git * gdbtypes.c (copy_type_recursive): Clear new fields. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 090a9424fdf..b2d74fc8d90 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 b5a5de0e5ee..5b9d0e873ad 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) =