diff options
author | Jim Blandy <jimb@codesourcery.com> | 2003-02-03 20:39:41 +0000 |
---|---|---|
committer | Jim Blandy <jimb@codesourcery.com> | 2003-02-03 20:39:41 +0000 |
commit | 3e110f64d194f87ae18020312993c2189947efa5 (patch) | |
tree | 81579259d30939eb47ca6c2192582f3b97911339 /gdb/minsyms.c | |
parent | 6611f16f947edad222f08fb57df50aa5d2c85a96 (diff) | |
download | gdb-3e110f64d194f87ae18020312993c2189947efa5.tar.gz |
Use a single, consistent representation for an empty minimalinterps-20030203-mergepoint
symbol table in an objfile.
* objfiles.c (terminate_minimal_symbol_table): New function.
(allocate_objfile): Call it.
* objfiles.h (terminate_minimal_symbol_table): New declaration.
(ALL_MSYMBOLS): No need to test whether (objfile)->msymbols is
non-NULL.
* minsyms.c (lookup_minimal_symbol_by_pc_section): To see whether
objfile has minimal symbols, compare minimal_symbol_count to zero,
instead of comparing msymbols with NULL.
* objfiles.c (have_minimal_symbols): Same.
* solib-sunos.c (solib_add_common_symbols): Call
terminate_minimal_symbol_table.
* symfile.c (reread_symbols): Same.
Diffstat (limited to 'gdb/minsyms.c')
-rw-r--r-- | gdb/minsyms.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/minsyms.c b/gdb/minsyms.c index 9823c87a109..92dfa8296bb 100644 --- a/gdb/minsyms.c +++ b/gdb/minsyms.c @@ -411,8 +411,9 @@ lookup_minimal_symbol_by_pc_section (CORE_ADDR pc, asection *section) "null symbol". If there are no real symbols, then there is no minimal symbol table at all. */ - if ((msymbol = objfile->msymbols) != NULL) + if (objfile->minimal_symbol_count > 0) { + msymbol = objfile->msymbols; lo = 0; hi = objfile->minimal_symbol_count - 1; |