Parameterize cp_scan_for_anonymous_namespaces

This changes cp_scan_for_anonymous_namespaces to use the
buildsym_compunit API, rather than the function-based API.

gdb/ChangeLog
2018-07-20  Tom Tromey  <tom@tromey.com>

	* stabsread.c (define_symbol): Update.
	* buildsym-legacy.h (get_buildsym_compunit): Declare.
	* dwarf2read.c (new_symbol): Update.
	* cp-support.h (cp_scan_for_anonymous_namespaces): Update.
	* cp-namespace.c: Include buildsym.h.
	(cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
	* buildsym-legacy.c (get_buildsym_compunit): New function.
This commit is contained in:
Tom Tromey
2018-05-22 14:44:09 -06:00
parent 0baae8dbd3
commit 80e649fcac
7 changed files with 36 additions and 8 deletions

View File

@ -753,7 +753,8 @@ define_symbol (CORE_ADDR valu, const char *string, int desc, int type,
SYMBOL_SET_NAMES (sym, string, p - string, 1, objfile);
if (SYMBOL_LANGUAGE (sym) == language_cplus)
cp_scan_for_anonymous_namespaces (sym, objfile);
cp_scan_for_anonymous_namespaces (get_buildsym_compunit (), sym,
objfile);
}
p++;