From 80e649fcac86101a8a4581317e867e89de015d28 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 22 May 2018 14:44:09 -0600 Subject: 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 * 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. --- gdb/cp-support.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gdb/cp-support.h') diff --git a/gdb/cp-support.h b/gdb/cp-support.h index e2460de..4e26921 100644 --- a/gdb/cp-support.h +++ b/gdb/cp-support.h @@ -33,6 +33,7 @@ struct symbol; struct block; +struct buildsym_compunit; struct objfile; struct type; struct demangle_component; @@ -132,7 +133,8 @@ extern symbol_name_matcher_ftype *cp_get_symbol_name_matcher extern int cp_is_in_anonymous (const char *symbol_name); -extern void cp_scan_for_anonymous_namespaces (const struct symbol *symbol, +extern void cp_scan_for_anonymous_namespaces (struct buildsym_compunit *, + const struct symbol *symbol, struct objfile *objfile); extern struct block_symbol cp_lookup_symbol_nonlocal -- cgit v1.1