aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2019-01-07 13:18:53 +0000
committerNick Clifton <nickc@redhat.com>2019-01-07 13:18:53 +0000
commit053af8c9034f92d6e36a1180655ba22a65c56437 (patch)
treedb84dd302b9ca61a6c15a37f3c1b53167a9eac9a /binutils
parentef8df4caec24669a11680aa1a696d470fb6177ba (diff)
downloadgdb-053af8c9034f92d6e36a1180655ba22a65c56437.zip
gdb-053af8c9034f92d6e36a1180655ba22a65c56437.tar.gz
gdb-053af8c9034f92d6e36a1180655ba22a65c56437.tar.bz2
Sync libiberty sources with master version in gcc repository. Updated stabs demangling and cxxfilt tests to match.
PR 24044 * stabs.c (parse_stab_argtypes): Remove call to cplus_mangle_opcode. * testsuite/binutils-all/cxxfilt.exp: Replace tests of v2 encoding with v3 encoding. Add escape for known failures.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog8
-rw-r--r--binutils/stabs.c26
-rw-r--r--binutils/testsuite/binutils-all/cxxfilt.exp34
3 files changed, 44 insertions, 24 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index d7f1685..35fca3b 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,11 @@
+2019-01-07 Nick Clifton <nickc@redhat.com>
+
+ PR 24044
+ * stabs.c (parse_stab_argtypes): Remove call to
+ cplus_mangle_opcode.
+ * testsuite/binutils-all/cxxfilt.exp: Replace tests of v2 encoding
+ with v3 encoding. Add escape for known failures.
+
2018-12-25 Yoshinori Sato <ysato@users.sourceforge.jp>
* readelf.c (get_machine_flags): Add RXv3 output.
diff --git a/binutils/stabs.c b/binutils/stabs.c
index 18788b9..e84aa6f 100644
--- a/binutils/stabs.c
+++ b/binutils/stabs.c
@@ -3037,27 +3037,15 @@ parse_stab_argtypes (void *dhandle, struct stab_handle *info,
&& fieldname[1] == 'p'
&& (fieldname[2] == '$' || fieldname[2] == '.'))
{
- const char *opname;
-
- opname = cplus_mangle_opname (fieldname + 3, 0);
- if (opname == NULL)
- {
- fprintf (stderr, _("No mangling for \"%s\"\n"), fieldname);
- return DEBUG_TYPE_NULL;
- }
- mangled_name_len += strlen (opname);
- physname = (char *) xmalloc (mangled_name_len);
- strncpy (physname, fieldname, 3);
- strcpy (physname + 3, opname);
+ /* Opname selection is no longer supported by libiberty's demangler. */
+ return DEBUG_TYPE_NULL;
}
+
+ physname = (char *) xmalloc (mangled_name_len);
+ if (is_constructor)
+ physname[0] = '\0';
else
- {
- physname = (char *) xmalloc (mangled_name_len);
- if (is_constructor)
- physname[0] = '\0';
- else
- strcpy (physname, fieldname);
- }
+ strcpy (physname, fieldname);
physname_len = strlen (physname);
strcat (physname, buf);
diff --git a/binutils/testsuite/binutils-all/cxxfilt.exp b/binutils/testsuite/binutils-all/cxxfilt.exp
index 116caeb..203a703 100644
--- a/binutils/testsuite/binutils-all/cxxfilt.exp
+++ b/binutils/testsuite/binutils-all/cxxfilt.exp
@@ -14,6 +14,30 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+# For some reason cxxfilt is not working on the following targets.
+# FIXME: Investigate why.
+if { [istarget "cris*-*-*"] || \
+ [istarget "cr16-*-*"] || \
+ [istarget "crx*-*-*"] || \
+ [istarget "epiphany-*-*"] || \
+ [istarget "ip2k-*-*"] || \
+ [istarget "metag-*-*"] || \
+ [istarget "mn10200-*-*"] || \
+ [istarget "mn10300-*-*"] || \
+ [istarget "ns32k-*-*"] || \
+ [istarget "pdp11-*-*"] || \
+ [istarget "rl78-*-*"] || \
+ [istarget "rx-*-*"] || \
+ [istarget "sh-*-*"] || \
+ [istarget "tic4*-*-*"] || \
+ [istarget "tic54*-*-*"] || \
+ [istarget "v850-*-*"] || \
+ [istarget "z8k-*-*"] || \
+ [istarget "*-*-cygwin"] || \
+ [istarget "*-*-mingw32"] } then {
+ return
+}
+
proc test_cxxfilt {options mangled_string demangled_string} {
global CXXFILT
global CXXFILTFLAGS
@@ -32,12 +56,12 @@ proc test_cxxfilt {options mangled_string demangled_string} {
# Mangled and demangled strings stolen from libiberty/testsuite/demangle-expected.
test_cxxfilt {} \
- "AddAlignment__9ivTSolverUiP12ivInteractorP7ivTGlue" \
- "ivTSolver::AddAlignment(unsigned int, ivInteractor ., ivTGlue .)*"
+ "_Z1fIvJiELb0EEvPDOT1_EFT_DpT0_E" \
+ "void f.void, int, false.(void (.)(int) noexcept(false))*"
-test_cxxfilt {--format=lucid} \
- "__ct__12strstreambufFPFl_PvPFPv_v" \
- "strstreambuf..(strstreambuf|_ct)(void .(.)(long), void (.)(void .))*"
+test_cxxfilt {--format=gnu-v3} \
+ "_Z14int_if_addableI1YERiP1AIXszpldecvPT_Li0EdecvS4_Li0EEE" \
+ "int& int_if_addable.Y.(A.sizeof ((.((Y.)(0))).(.((Y.)(0))))..)*"
test_cxxfilt {--no-recurse-limit} \
"Z3fooiPiPS_PS0_PS1_PS2_PS3_PS4_PS5_PS6_PS7_PS8_PS9_PSA_PSB_PSC_" \