aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Carlton <carlton@bactrian.org>2003-09-11 23:43:56 +0000
committerDavid Carlton <carlton@bactrian.org>2003-09-11 23:43:56 +0000
commita1632d59e5e2ffcf2f9f1f60f4ace5cc0bc6e5a5 (patch)
treea9b770815cc98ce4b7b563b655cf8af6c4552d93
parent6f18ad7010ddc535b3bc91838147a193aa303364 (diff)
downloadgdb-a1632d59e5e2ffcf2f9f1f60f4ace5cc0bc6e5a5.zip
gdb-a1632d59e5e2ffcf2f9f1f60f4ace5cc0bc6e5a5.tar.gz
gdb-a1632d59e5e2ffcf2f9f1f60f4ace5cc0bc6e5a5.tar.bz2
2003-09-11 David Carlton <carlton@kealia.com>
* buildsym.c (finish_block): Use allocate_block to allocate the block. * mdebugread.c (new_block): Add FIXME.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/buildsym.c6
-rw-r--r--gdb/mdebugread.c3
3 files changed, 10 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a59d05b..ae994ca 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
2003-09-11 David Carlton <carlton@kealia.com>
+ * buildsym.c (finish_block): Use allocate_block to allocate the
+ block.
+ * mdebugread.c (new_block): Add FIXME.
+
+2003-09-11 David Carlton <carlton@kealia.com>
+
* gdbtypes.h: Add TYPE_CODE_NAMESPACE.
* gdbtypes.c (init_type): Handle TYPE_CODE_NAMESPACE.
(recursive_dump_type): Ditto.
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index f0d75ce..aa87d4c 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 1bb1e05..453b983 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)