From: David Carlton Date: Thu, 11 Sep 2003 23:43:56 +0000 (+0000) Subject: 2003-09-11 David Carlton X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a1632d59e5e2ffcf2f9f1f60f4ace5cc0bc6e5a5;p=binutils-gdb.git 2003-09-11 David Carlton * buildsym.c (finish_block): Use allocate_block to allocate the block. * mdebugread.c (new_block): Add FIXME. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a59d05b6d01..ae994cab585 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2003-09-11 David Carlton + + * buildsym.c (finish_block): Use allocate_block to allocate the + block. + * mdebugread.c (new_block): Add FIXME. + 2003-09-11 David Carlton * gdbtypes.h: Add TYPE_CODE_NAMESPACE. diff --git a/gdb/buildsym.c b/gdb/buildsym.c index f0d75ce3f52..aa87d4c4fcb 100644 --- a/gdb/buildsym.c +++ b/gdb/buildsym.c @@ -231,19 +231,15 @@ finish_block (struct symbol *symbol, struct pending **listhead, register struct pending_block *pblock; struct pending_block *opblock; - /* Initialize the block's dictionary. */ + block = allocate_block (&objfile->symbol_obstack); if (symbol) { - block = (struct block *) - obstack_alloc (&objfile->symbol_obstack, sizeof (struct block)); BLOCK_DICT (block) = dict_create_linear (&objfile->symbol_obstack, *listhead); } else { - block = (struct block *) - obstack_alloc (&objfile->symbol_obstack, sizeof (struct block)); BLOCK_DICT (block) = dict_create_hashed (&objfile->symbol_obstack, *listhead); } diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c index 1bb1e057009..453b983c66d 100644 --- a/gdb/mdebugread.c +++ b/gdb/mdebugread.c @@ -4696,6 +4696,9 @@ new_bvect (int nblocks) static struct block * new_block (enum block_type type) { + /* FIXME: carlton/2003-09-11: This should use allocate_block to + allocate the block. Which, in turn, suggests that the block + should be allocated on an obstack. */ struct block *retval = xzalloc (sizeof (struct block)); if (type == FUNCTION_BLOCK)