diff options
author | Doug Evans <dje@google.com> | 2014-12-02 16:24:37 -0800 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2014-12-02 16:24:37 -0800 |
commit | 72998fb37a6a4bc684ba86228e81f27c7a7609ca (patch) | |
tree | 56ee7f801e7b39bb411acbfc10bd2be30f35017f | |
parent | 422b9917ceadf6247ac4d52aa198c291e5de4c10 (diff) | |
download | gdb-72998fb37a6a4bc684ba86228e81f27c7a7609ca.zip gdb-72998fb37a6a4bc684ba86228e81f27c7a7609ca.tar.gz gdb-72998fb37a6a4bc684ba86228e81f27c7a7609ca.tar.bz2 |
PR symtab/17591
gdb/ChangeLog:
PR symtab/17591
* dwarf2read.c (find_slot_in_mapped_hash): Use cp_remove_params
to strip parameters.
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/dwarf2read.c | 20 |
2 files changed, 13 insertions, 13 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c71c301..4ca9ac1 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 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. 2014-12-02 Doug Evans <dje@google.com> diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 5526db3..829611d 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -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; + } } } |