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/dwarf2read.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gdb/dwarf2read.c') diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index a374089..02bcf65 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -21476,7 +21476,8 @@ new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu, namespaces based on the demangled name. */ if (!cu->processing_has_namespace_info && cu->language == language_cplus) - cp_scan_for_anonymous_namespaces (sym, objfile); + cp_scan_for_anonymous_namespaces (get_buildsym_compunit (), sym, + objfile); } return (sym); } -- cgit v1.1