From a8719064e81f8330d3b3e5e504653e19c4131864 Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Thu, 13 Nov 2014 16:50:51 -0800 Subject: [PATCH] PR symtab/17591 gdb/ChangeLog: PR symtab/17591 * dwarf2read.c (find_slot_in_mapped_hash): Handle "(anonymous namespace)". --- gdb/ChangeLog | 6 ++++++ gdb/dwarf2read.c | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7f918e9ecfe..53446899873 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2014-11-13 Doug Evans + + PR symtab/17591 + * dwarf2read.c (find_slot_in_mapped_hash): Handle + "(anonymous namespace)". + 2014-11-13 Doug Evans * dwarf2read.c (update_enumeration_type_from_children): Avoid diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 1250bc7e768..9762d985072 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -2917,7 +2917,11 @@ find_slot_in_mapped_hash (struct mapped_index *index, const char *name, { /* NAME is already canonical. Drop any qualifiers as .gdb_index does not contain any. */ - const char *paren = strchr (name, '('); + const char *paren = NULL; + + /* Need to handle "(anonymous namespace)". */ + if (*name != '(') + paren = strchr (name, '('); if (paren) { -- 2.30.2