aboutsummaryrefslogtreecommitdiff
path: root/install-sh
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2020-03-16 15:00:52 -0600
committerTom Tromey <tromey@adacore.com>2020-03-16 15:03:30 -0600
commit67430cd00afcc270a27e44b10f9ef4249d554e66 (patch)
tree8bc08380369ec156e280147a5318a8bddad7a680 /install-sh
parent30efb6c7af7ad8b50936157fe0a0ef22d6787dd7 (diff)
downloadgdb-67430cd00afcc270a27e44b10f9ef4249d554e66.zip
gdb-67430cd00afcc270a27e44b10f9ef4249d554e66.tar.gz
gdb-67430cd00afcc270a27e44b10f9ef4249d554e66.tar.bz2
Fix dwarf2_name caching bug
PR gdb/25663 points out that dwarf2_name will cache a value in the bcache and then return a substring. However, this substring return is only done on the branch that caches the value -- so if the function is called twice with the same arguments, it will return different values. This patch fixes this problem. This area is strange. We cache the entire demangled string, but only return the suffix. I looked at caching just the suffix, but it turns out that anonymous_struct_prefix assumes that the entire string is stored. Also weird is that this code is demangling the linkage name and then storing the demangled form back into the linkage name attribute -- that seems bad, because what if some code wants to find the actual linkage name? Fixing these issues was non-trivial, though; and in the meantime this patch seems like an improvement. Regression tested on x86-64 Fedora 30. gdb/ChangeLog 2020-03-16 Tom Tromey <tromey@adacore.com> PR gdb/25663: * dwarf2/read.c (dwarf2_name): Strip leading namespaces after putting value into bcache.
Diffstat (limited to 'install-sh')
0 files changed, 0 insertions, 0 deletions