new callback parameter expansion_notify for expand_symtabs_matching

This commit adds a new callback parameter, "expansion_notify", to the
top-level expand_symtabs_matching function and to all the vectorized
functions it defers to.  If expansion_notify is non-NULL, it will be
called every time a symbol table is expanded.

gdb/ChangeLog:

	* symfile.h (expand_symtabs_exp_notify_ftype): New typedef.
	(struct quick_symbol_functions) <expand_symtabs_matching>:
	New argument expansion_notify.  All uses updated.
	(expand_symtabs_matching): New argument expansion_notify.
	All uses updated.
	* symfile-debug.c (debug_qf_expand_symtabs_matching):
	Also print expansion notify.
	* symtab.c (expand_symtabs_matching_via_partial): Call
	expansion_notify whenever a partial symbol table is expanded.
	* dwarf2read.c (dw2_expand_symtabs_matching): Call
	expansion_notify whenever a symbol table is instantiated.
This commit is contained in:
Gary Benson
2015-01-31 14:45:26 -08:00
committed by Doug Evans
parent 5dd31d7995
commit 276d885b57
10 changed files with 60 additions and 12 deletions

View File

@ -3941,6 +3941,7 @@ symfile_free_objfile (struct objfile *objfile)
void
expand_symtabs_matching (expand_symtabs_file_matcher_ftype *file_matcher,
expand_symtabs_symbol_matcher_ftype *symbol_matcher,
expand_symtabs_exp_notify_ftype *expansion_notify,
enum search_domain kind,
void *data)
{
@ -3950,7 +3951,8 @@ expand_symtabs_matching (expand_symtabs_file_matcher_ftype *file_matcher,
{
if (objfile->sf)
objfile->sf->qf->expand_symtabs_matching (objfile, file_matcher,
symbol_matcher, kind,
symbol_matcher,
expansion_notify, kind,
data);
}
}