[gdb/testsuite] Fix language in dw2-bad-mips-linkage-name.exp
authorTom de Vries <tdevries@suse.de>
Fri, 24 Apr 2020 21:25:44 +0000 (23:25 +0200)
committerTom de Vries <tdevries@suse.de>
Fri, 24 Apr 2020 21:25:44 +0000 (23:25 +0200)
The test-case gdb.dwarf2/dw2-bad-mips-linkage-name.exp has a CU with
language C, which contains a subprogram with a C++-mangled name as its
DW_AT_mips_linkage_name attribute.

Fix this by changing the language of the CU to C++.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2020-04-24  Tom de Vries  <tdevries@suse.de>

* gdb.dwarf2/dw2-bad-mips-linkage-name.exp: Set language of CU to
C++.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.dwarf2/dw2-bad-mips-linkage-name.exp

index 3458a54c5358de8ff28cee6ce1557c1a5ff6089f..ba79290e114c8b65a2223fe90bcbd9c7c235711a 100644 (file)
@@ -1,3 +1,8 @@
+2020-04-24  Tom de Vries  <tdevries@suse.de>
+
+       * gdb.dwarf2/dw2-bad-mips-linkage-name.exp: Set language of CU to
+       C++.
+
 2020-04-24  Tom Tromey  <tromey@adacore.com>
 
        * gdb.ada/frame_arg_lang.exp: Run with multiple -fgnat-encodings
index d00308a570259f0b0f88a7b4a725ab764d925660..5f01c41aaa325d089028303ff56fdfd391adcc04 100644 (file)
@@ -38,7 +38,7 @@ Dwarf::assemble $asm_file {
 
     cu {} {
        DW_TAG_compile_unit {
-                {DW_AT_language @DW_LANG_C}
+                {DW_AT_language @DW_LANG_C_plus_plus}
                 {DW_AT_name     dw2-bad-mips-linkage-name.c}
                 {DW_AT_comp_dir /tmp}
 
@@ -78,5 +78,5 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \
 # much matter what we test here, so long as we do something to make
 # sure that the DWARF is read.
 
-gdb_test "ptype f" " = bool \\(\\)"
-gdb_test "ptype g" " = bool \\(\\)"
+gdb_test "ptype f" " = bool \\(void\\)"
+gdb_test "ptype g" " = bool \\(void\\)"