aboutsummaryrefslogtreecommitdiff
path: root/gdb/psymtab.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/psymtab.c')
-rw-r--r--gdb/psymtab.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index 2f1bfc6..aa6dc17 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -1406,6 +1406,35 @@ add_psymbol_to_bcache (char *name, int namelength, int copy_name,
added);
}
+/* Increase the space allocated for LISTP, which is probably
+ global_psymbols or static_psymbols. This space will eventually
+ be freed in free_objfile(). */
+
+static void
+extend_psymbol_list (struct psymbol_allocation_list *listp,
+ struct objfile *objfile)
+{
+ int new_size;
+
+ if (listp->size == 0)
+ {
+ new_size = 255;
+ listp->list = (struct partial_symbol **)
+ xmalloc (new_size * sizeof (struct partial_symbol *));
+ }
+ else
+ {
+ new_size = listp->size * 2;
+ listp->list = (struct partial_symbol **)
+ xrealloc ((char *) listp->list,
+ new_size * sizeof (struct partial_symbol *));
+ }
+ /* Next assumes we only went one over. Should be good if
+ program works correctly */
+ listp->next = listp->list + listp->size;
+ listp->size = new_size;
+}
+
/* Helper function, adds partial symbol to the given partial symbol
list. */
@@ -1557,35 +1586,6 @@ discard_psymtab (struct partial_symtab *pst)
pst->objfile->free_psymtabs = pst;
}
-/* Increase the space allocated for LISTP, which is probably
- global_psymbols or static_psymbols. This space will eventually
- be freed in free_objfile(). */
-
-void
-extend_psymbol_list (struct psymbol_allocation_list *listp,
- struct objfile *objfile)
-{
- int new_size;
-
- if (listp->size == 0)
- {
- new_size = 255;
- listp->list = (struct partial_symbol **)
- xmalloc (new_size * sizeof (struct partial_symbol *));
- }
- else
- {
- new_size = listp->size * 2;
- listp->list = (struct partial_symbol **)
- xrealloc ((char *) listp->list,
- new_size * sizeof (struct partial_symbol *));
- }
- /* Next assumes we only went one over. Should be good if
- program works correctly */
- listp->next = listp->list + listp->size;
- listp->size = new_size;
-}
-
void