aboutsummaryrefslogtreecommitdiff
path: root/gdb/symmisc.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2008-04-03 18:19:16 +0000
committerDoug Evans <dje@google.com>2008-04-03 18:19:16 +0000
commitf73634e546146a5176f76153a72c3d12dfc3ae68 (patch)
tree7002bf1f1b2b6736fd8efbbd6362b35ed1b1b497 /gdb/symmisc.c
parent5f69259ea4a8fa974292170d02e3500cd7c3d038 (diff)
downloadgdb-f73634e546146a5176f76153a72c3d12dfc3ae68.zip
gdb-f73634e546146a5176f76153a72c3d12dfc3ae68.tar.gz
gdb-f73634e546146a5176f76153a72c3d12dfc3ae68.tar.bz2
* symtab.h (enum free_code): Delete free_contents, unused.
* symmisc.c (free_symtab_block): Delete. (free_symtab, case free_code): Delete.
Diffstat (limited to 'gdb/symmisc.c')
-rw-r--r--gdb/symmisc.c47
1 files changed, 4 insertions, 43 deletions
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index 0797d59..bb5f6e3 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -70,8 +70,6 @@ static int block_depth (struct block *);
static void print_partial_symbols (struct partial_symbol **, int,
char *, struct ui_file *);
-static void free_symtab_block (struct objfile *, struct block *);
-
void _initialize_symmisc (void);
struct print_symbol_args
@@ -82,37 +80,12 @@ struct print_symbol_args
};
static int print_symbol (void *);
-
-static void free_symtab_block (struct objfile *, struct block *);
-
-/* Free a struct block <- B and all the symbols defined in that block. */
-
-/* FIXME: carlton/2003-04-28: I don't believe this is currently ever
- used. */
-
-static void
-free_symtab_block (struct objfile *objfile, struct block *b)
-{
- struct dict_iterator iter;
- struct symbol *sym;
-
- ALL_BLOCK_SYMBOLS (b, iter, sym)
- {
- xfree (DEPRECATED_SYMBOL_NAME (sym));
- xfree (sym);
- }
-
- dict_free (BLOCK_DICT (b));
- xfree (b);
-}
-
/* Free all the storage associated with the struct symtab <- S.
- Note that some symtabs have contents malloc'ed structure by structure,
- while some have contents that all live inside one big block of memory,
- and some share the contents of another symbol table and so you should
- not free the contents on their behalf (except sometimes the linetable,
- which maybe per symtab even when the rest is not).
+ Note that some symtabs have contents that all live inside one big block of
+ memory, and some share the contents of another symbol table and so you
+ should not free the contents on their behalf (except sometimes the
+ linetable, which maybe per symtab even when the rest is not).
It is s->free_code that says which alternative to use. */
void
@@ -129,18 +102,6 @@ free_symtab (struct symtab *s)
Therefore, do nothing. */
break;
- case free_contents:
- /* Here all the contents were malloc'ed structure by structure
- and must be freed that way. */
- /* First free the blocks (and their symbols. */
- bv = BLOCKVECTOR (s);
- n = BLOCKVECTOR_NBLOCKS (bv);
- for (i = 0; i < n; i++)
- free_symtab_block (s->objfile, BLOCKVECTOR_BLOCK (bv, i));
- /* Free the blockvector itself. */
- xfree (bv);
- /* Also free the linetable. */
-
case free_linetable:
/* Everything will be freed either by our `free_func'
or by some other symtab, except for our linetable.