]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
PR symtab/17591
authorDoug Evans <dje@google.com>
Wed, 3 Dec 2014 00:24:37 +0000 (16:24 -0800)
committerDoug Evans <dje@google.com>
Wed, 3 Dec 2014 00:24:37 +0000 (16:24 -0800)
gdb/ChangeLog:

PR symtab/17591
* dwarf2read.c (find_slot_in_mapped_hash): Use cp_remove_params
to strip parameters.

gdb/ChangeLog
gdb/dwarf2read.c

index c71c3011850a809b5c51c0dc0d728f66a31b392e..4ca9ac17672d5c9e642f4f3c526543ccd7d8de9e 100644 (file)
@@ -1,3 +1,9 @@
+2014-12-02  Doug Evans  <dje@google.com>
+
+       PR symtab/17591
+       * dwarf2read.c (find_slot_in_mapped_hash): Use cp_remove_params
+       to strip parameters.
+
 2014-12-02  Doug Evans  <dje@google.com>
 
        * dwarf2read.c (peek_die_abbrev): Improve error message text.
index 5526db35b9cf471dca729d31e9341bda7188b2fb..829611dfe9dd5a91e10a4e16027a094e64b10c8a 100644 (file)
@@ -2918,22 +2918,16 @@ 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 = NULL;
 
-      /* Need to handle "(anonymous namespace)".  */
-      if (*name != '(')
-       paren = strchr (name, '(');
-
-      if (paren)
+      if (strchr (name, '(') != NULL)
        {
-         char *dup;
-
-         dup = xmalloc (paren - name + 1);
-         memcpy (dup, name, paren - name);
-         dup[paren - name] = 0;
+         char *without_params = cp_remove_params (name);
 
-         make_cleanup (xfree, dup);
-         name = dup;
+         if (without_params != NULL)
+           {
+             make_cleanup (xfree, without_params);
+             name = without_params;
+           }
        }
     }