aboutsummaryrefslogtreecommitdiff
path: root/gdb/xcoffread.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-05-10 16:23:47 -0600
committerTom Tromey <tom@tromey.com>2019-01-10 07:08:11 -0700
commit6eee24ce30f8e95335c2ad8586f9a64398eb2cd4 (patch)
tree621616df26c1fd059c70b00ebdb83cd397ba8371 /gdb/xcoffread.c
parent75aedd27e6a2c58734ab44cc7cad8491f19d059a (diff)
downloadgdb-6eee24ce30f8e95335c2ad8586f9a64398eb2cd4.zip
gdb-6eee24ce30f8e95335c2ad8586f9a64398eb2cd4.tar.gz
gdb-6eee24ce30f8e95335c2ad8586f9a64398eb2cd4.tar.bz2
Simplify calls to init_psymbol_list
Existing callers to init_psymbol_list were checking to see if psymbols had already been initialized. It seemed better to me to do this check directly in init_psymbol_list, simplifying the callers. gdb/ChangeLog 2019-01-10 Tom Tromey <tom@tromey.com> * xcoffread.c (xcoff_initial_scan): Unconditionally call init_psymbol_list. * psymtab.c (init_psymbol_list): Do nothing if already called. * psympriv.h (init_psymbol_list): Add comment. * dwarf2read.c (dwarf2_build_psymtabs): Unconditionally call init_psymbol_list. * dbxread.c (dbx_symfile_read): Unconditionally call init_psymbol_list.
Diffstat (limited to 'gdb/xcoffread.c')
-rw-r--r--gdb/xcoffread.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 76c683d..50da078 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -2991,14 +2991,11 @@ xcoff_initial_scan (struct objfile *objfile, symfile_add_flags symfile_flags)
if (val != size)
perror_with_name (_("reading symbol table"));
- /* If we are reinitializing, or if we have never loaded syms yet, init. */
- if (objfile->global_psymbols.capacity () == 0
- && objfile->static_psymbols.capacity () == 0)
- /* I'm not sure how how good num_symbols is; the rule of thumb in
- init_psymbol_list was developed for a.out. On the one hand,
- num_symbols includes auxents. On the other hand, it doesn't
- include N_SLINE. */
- init_psymbol_list (objfile, num_symbols);
+ /* I'm not sure how how good num_symbols is; the rule of thumb in
+ init_psymbol_list was developed for a.out. On the one hand,
+ num_symbols includes auxents. On the other hand, it doesn't
+ include N_SLINE. */
+ init_psymbol_list (objfile, num_symbols);
scoped_free_pendings free_pending;
minimal_symbol_reader reader (objfile);