aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-05-22 14:44:09 -0600
committerTom Tromey <tom@tromey.com>2018-07-20 09:42:53 -0600
commit80e649fcac86101a8a4581317e867e89de015d28 (patch)
tree66a16b2c2b5afa37a1ac6509bc2096de4f4150f8 /gdb/dwarf2read.c
parent0baae8dbd38534c0f3dcedc7b9204bbc8f18de1b (diff)
downloadgdb-80e649fcac86101a8a4581317e867e89de015d28.zip
gdb-80e649fcac86101a8a4581317e867e89de015d28.tar.gz
gdb-80e649fcac86101a8a4581317e867e89de015d28.tar.bz2
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.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c3
1 files changed, 2 insertions, 1 deletions
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);
}