aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2008-11-10 20:53:43 +0000
committerTom Tromey <tromey@redhat.com>2008-11-10 20:53:43 +0000
commitde8ee0e21e34883b9eb72b6fca4122560bfff0ae (patch)
treed5b0244c88068f599ced0746d5b21cd8ebe0275c
parentb03a6ea40ebd65be04d15eca28db52d37e816270 (diff)
downloadgdb-de8ee0e21e34883b9eb72b6fca4122560bfff0ae.zip
gdb-de8ee0e21e34883b9eb72b6fca4122560bfff0ae.tar.gz
gdb-de8ee0e21e34883b9eb72b6fca4122560bfff0ae.tar.bz2
* gdbtypes.c (copy_type_recursive): Clear new fields.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/gdbtypes.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 090a942..b2d74fc 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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.
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index b5a5de0..5b9d0e8 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) =