From: tromey Date: Mon, 18 Aug 2008 19:41:27 +0000 (+0000) Subject: * gdbtypes.c (copy_type_recursive): Allocate 'stored' on objfile's X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=2add63eb7eb3ca042cfd40c6c516f28bfb2c4e15;p=pf3gnuchains%2Fpf3gnuchains3x.git * gdbtypes.c (copy_type_recursive): Allocate 'stored' on objfile's obstack. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3e47523eea..4ec6259157 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2008-08-18 Tom Tromey + + * gdbtypes.c (copy_type_recursive): Allocate 'stored' on objfile's + obstack. + 2008-08-18 Daniel Jacobowitz * rs6000-tdep.c (struct rs6000_framedata): Add gpr_mask, used_bl, diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index 939a1dcee1..bbacee5c68 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;