diff options
author | Andrew Cagney <cagney@redhat.com> | 2002-09-19 00:42:41 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2002-09-19 00:42:41 +0000 |
commit | b9caf5053f5684f063a33357b6483cd2b62de0ec (patch) | |
tree | 139bdef42c509a2f7a6423a91b77883965200a0c /gdb/symfile.c | |
parent | d2e6263c4a7536e5e07990c1bd270fa36d8e092a (diff) | |
download | gdb-b9caf5053f5684f063a33357b6483cd2b62de0ec.zip gdb-b9caf5053f5684f063a33357b6483cd2b62de0ec.tar.gz gdb-b9caf5053f5684f063a33357b6483cd2b62de0ec.tar.bz2 |
2002-09-18 Andrew Cagney <ac131313@redhat.com>
* complaints.h: Update copyright.
(struct complaints): Declare.
(struct complaint): Make `message' constant.
(internal_complaint): Declare.
(complaint): Declare.
(complaint_root): Delete declaration.
(symfile_complaints): Delete declaration.
(struct complaints): Add opaque declaration.
(clear_complaints): Add a complaints parameter.
* complaints.c: Update copyright.
(enum complaint_series): Define.
(complaint_root): Delete.
(struct complaints): Define.
(complaint_sentinel, symfile_complaint_book): New variables.
(symfile_explanations, symfile_complaints): New variables.
New variables.
(get_complaints): New function.
(vcomplaint): New function.
(complaint): New function.
(internal_complaint): New function.
(complain): Call vcomplain with symfile_complaint.
(clear_complaints): Rewrite.
(_initialize_complaints): Use add_setshow_command.
* Makefile.in (complaints.o): Update dependencies.
* symfile.c (syms_from_objfile): Add symfile_complaints parameter
to call to clear_complaints.
(new_symfile_objfile, reread_symbols): Ditto.
(oldsyms_complaint): Delete.
(empty_symtab_complaint, unknown_option_complaint): Delete.
(free_named_symtabs): Use complaint instead of complain.
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r-- | gdb/symfile.c | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c index 8d63484..3165f33 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -81,21 +81,6 @@ static void clear_symtab_users_cleanup (void *ignore); /* Global variables owned by this file */ int readnow_symbol_files; /* Read full symbols immediately */ -struct complaint oldsyms_complaint = -{ - "Replacing old symbols for `%s'", 0, 0 -}; - -struct complaint empty_symtab_complaint = -{ - "Empty symbol table found for `%s'", 0, 0 -}; - -struct complaint unknown_option_complaint = -{ - "Unknown option `%s' ignored", 0, 0 -}; - /* External variables and functions referenced. */ extern void report_transfer_performance (unsigned long, time_t, time_t); @@ -706,7 +691,7 @@ syms_from_objfile (struct objfile *objfile, struct section_addr_info *addrs, initial symbol reading for this file. */ (*objfile->sf->sym_init) (objfile); - clear_complaints (1, verbo); + clear_complaints (&symfile_complaints, 1, verbo); (*objfile->sf->sym_offsets) (objfile, addrs); @@ -818,7 +803,7 @@ new_symfile_objfile (struct objfile *objfile, int mainline, int verbo) } /* We're done reading the symbol file; finish off complaints. */ - clear_complaints (0, verbo); + clear_complaints (&symfile_complaints, 0, verbo); } /* Process a symbol file, as either the main file or as a dynamically @@ -1801,7 +1786,7 @@ reread_symbols (void) } (*objfile->sf->sym_init) (objfile); - clear_complaints (1, 1); + clear_complaints (&symfile_complaints, 1, 1); /* The "mainline" parameter is a hideous hack; I think leaving it zero is OK since dbxread.c also does what it needs to do if objfile->global_psymbols.size is 0. */ @@ -1815,7 +1800,7 @@ reread_symbols (void) objfile->flags |= OBJF_SYMS; /* We're done reading the symbol file; finish off complaints. */ - clear_complaints (0, 1); + clear_complaints (&symfile_complaints, 0, 1); /* Getting new symbols may change our opinion about what is frameless. */ @@ -2305,15 +2290,16 @@ again2: || BLOCK_NSYMS (BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK)) || BLOCK_NSYMS (BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK))) { - complain (&oldsyms_complaint, name); - + complaint (&symfile_complaints, "Replacing old symbols for `%s'", + name); clear_symtab_users_queued++; make_cleanup (clear_symtab_users_once, 0); blewit = 1; } else { - complain (&empty_symtab_complaint, name); + complaint (&symfile_complaints, "Empty symbol table found for `%s'", + name); } free_symtab (s); |