From 276d885b572b12221f639641846ab94ef9582995 Mon Sep 17 00:00:00 2001 From: Gary Benson Date: Sat, 31 Jan 2015 14:45:26 -0800 Subject: 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) : 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. --- gdb/symfile-debug.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gdb/symfile-debug.c') diff --git a/gdb/symfile-debug.c b/gdb/symfile-debug.c index 92d0013..e0600a9 100644 --- a/gdb/symfile-debug.c +++ b/gdb/symfile-debug.c @@ -281,22 +281,25 @@ debug_qf_expand_symtabs_matching (struct objfile *objfile, 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) { const struct debug_sym_fns_data *debug_data = objfile_data (objfile, symfile_debug_objfile_data_key); fprintf_filtered (gdb_stdlog, - "qf->expand_symtabs_matching (%s, %s, %s, %s, %s)\n", + "qf->expand_symtabs_matching (%s, %s, %s, %s, %s, %s)\n", objfile_debug_name (objfile), host_address_to_string (file_matcher), host_address_to_string (symbol_matcher), + host_address_to_string (expansion_notify), search_domain_name (kind), host_address_to_string (data)); debug_data->real_sf->qf->expand_symtabs_matching (objfile, file_matcher, symbol_matcher, + expansion_notify, kind, data); } -- cgit v1.1