aboutsummaryrefslogtreecommitdiff
path: root/gdb/buildsym.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2007-10-23 12:04:57 +0000
committerJoel Brobecker <brobecker@gnat.com>2007-10-23 12:04:57 +0000
commit89ba75b1ecaa14d207f43dccc4a4aa76efef26d6 (patch)
tree37d5e8ed5762e2cfbceaf65f871b77d4fab7aed0 /gdb/buildsym.c
parent35cdfc9a874553807400007ffa36cf2884ba40f6 (diff)
downloadgdb-89ba75b1ecaa14d207f43dccc4a4aa76efef26d6.zip
gdb-89ba75b1ecaa14d207f43dccc4a4aa76efef26d6.tar.gz
gdb-89ba75b1ecaa14d207f43dccc4a4aa76efef26d6.tar.bz2
* buildsym.c (free_pending_blocks): Remove commented-out code.
(make_blockvector): Likewise. Re-use free_pending_blocks. (end_symtab): Remove commented-out code.
Diffstat (limited to 'gdb/buildsym.c')
-rw-r--r--gdb/buildsym.c33
1 files changed, 3 insertions, 30 deletions
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index aab5056..58bb908 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -198,17 +198,8 @@ really_free_pendings (void *dummy)
void
free_pending_blocks (void)
{
-#if 0 /* Now we make the links in the
- objfile_obstack, so don't free
- them. */
- struct pending_block *bnext, *bnext1;
-
- for (bnext = pending_blocks; bnext; bnext = bnext1)
- {
- bnext1 = bnext->next;
- xfree ((void *) bnext);
- }
-#endif
+ /* The links are made in the objfile_obstack, so we only need to
+ reset PENDING_BLOCKS. */
pending_blocks = NULL;
}
@@ -493,17 +484,7 @@ make_blockvector (struct objfile *objfile)
BLOCKVECTOR_BLOCK (blockvector, --i) = next->block;
}
-#if 0 /* Now we make the links in the
- obstack, so don't free them. */
- /* Now free the links of the list, and empty the list. */
-
- for (next = pending_blocks; next; next = next1)
- {
- next1 = next->next;
- xfree (next);
- }
-#endif
- pending_blocks = NULL;
+ free_pending_blocks ();
#if 1 /* FIXME, shut this off after a while
to speed up symbol reading. */
@@ -976,14 +957,6 @@ end_symtab (CORE_ADDR end_addr, struct objfile *objfile, int section)
{
linetablesize = sizeof (struct linetable) +
subfile->line_vector->nitems * sizeof (struct linetable_entry);
-#if 0
- /* I think this is artifact from before it went on the
- obstack. I doubt we'll need the memory between now
- and when we free it later in this function. */
- /* First, shrink the linetable to make more memory. */
- subfile->line_vector = (struct linetable *)
- xrealloc ((char *) subfile->line_vector, linetablesize);
-#endif
/* Like the pending blocks, the line table may be
scrambled in reordered executables. Sort it if