aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2008-08-18 19:41:28 +0000
committerTom Tromey <tromey@redhat.com>2008-08-18 19:41:28 +0000
commitd87ecdfba2fcd75ef418cc93a6d966d67b7e9334 (patch)
tree292b4e69d9f396d01fc60d6758ff365b28e00397 /gdb
parente6a1410132df5de8c96d570dcb75771bd1591a7d (diff)
downloadgdb-d87ecdfba2fcd75ef418cc93a6d966d67b7e9334.zip
gdb-d87ecdfba2fcd75ef418cc93a6d966d67b7e9334.tar.gz
gdb-d87ecdfba2fcd75ef418cc93a6d966d67b7e9334.tar.bz2
* gdbtypes.c (copy_type_recursive): Allocate 'stored' on objfile's
obstack.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/gdbtypes.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3e47523..4ec6259 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2008-08-18 Tom Tromey <tromey@redhat.com>
+
+ * gdbtypes.c (copy_type_recursive): Allocate 'stored' on objfile's
+ obstack.
+
2008-08-18 Daniel Jacobowitz <dan@codesourcery.com>
* rs6000-tdep.c (struct rs6000_framedata): Add gpr_mask, used_bl,
diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c
index 939a1dc..bbacee5 100644
--- a/gdb/gdbtypes.c
+++ b/gdb/gdbtypes.c
@@ -2928,7 +2928,7 @@ copy_type_recursive (struct objfile *objfile,
/* We must add the new type to the hash table immediately, in case
we encounter this type again during a recursive call below. */
- stored = xmalloc (sizeof (struct type_pair));
+ stored = obstack_alloc (&objfile->objfile_obstack, sizeof (struct type_pair));
stored->old = type;
stored->new = new_type;
*slot = stored;