summaryrefslogtreecommitdiff
path: root/gdb/objfiles.h
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2003-02-03 20:39:41 +0000
committerJim Blandy <jimb@codesourcery.com>2003-02-03 20:39:41 +0000
commit158314526c237246cc19dd4a22fd3820694cb6df (patch)
tree408d89852e5fa04a30a1d8b29843b3466f0076c1 /gdb/objfiles.h
parentffc65945ba8548a7668003732ba1486d0aa40a81 (diff)
downloadbinutils-gdb-158314526c237246cc19dd4a22fd3820694cb6df.tar.gz
Use a single, consistent representation for an empty minimal
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/objfiles.h')
-rw-r--r--gdb/objfiles.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/objfiles.h b/gdb/objfiles.h
index 587e71c7438..44b820187c1 100644
--- a/gdb/objfiles.h
+++ b/gdb/objfiles.h
@@ -515,6 +515,8 @@ extern struct objfile *allocate_objfile (bfd *, int);
extern int build_objfile_section_table (struct objfile *);
+extern void terminate_minimal_symbol_table (struct objfile *objfile);
+
extern void put_objfile_before (struct objfile *, struct objfile *);
extern void objfile_to_front (struct objfile *);
@@ -595,8 +597,7 @@ extern int is_in_import_list (char *, struct objfile *);
#define ALL_MSYMBOLS(objfile, m) \
ALL_OBJFILES (objfile) \
- if ((objfile)->msymbols) \
- ALL_OBJFILE_MSYMBOLS (objfile, m)
+ ALL_OBJFILE_MSYMBOLS (objfile, m)
#define ALL_OBJFILE_OSECTIONS(objfile, osect) \
for (osect = objfile->sections; osect < objfile->sections_end; osect++)