]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite] Set language in gdb.ada/minsym.exp
authorTom de Vries <tdevries@suse.de>
Wed, 11 Mar 2020 18:37:01 +0000 (19:37 +0100)
committerTom de Vries <tdevries@suse.de>
Wed, 11 Mar 2020 18:37:01 +0000 (19:37 +0100)
When building gdb using configure flag
--with-separate-debug-dir=/usr/lib/debug, and running test-case
gdb.ada/minsyms.exp, I run into:
...
(gdb) PASS: gdb.ada/minsyms.exp: print some_minsym
print integer(some_minsym)^M
A syntax error in expression, near `some_minsym)'.^M
(gdb) FAIL: gdb.ada/minsyms.exp: print integer(some_minsym)
...
and 2 other FAILs.

This is due to the fact that the language after arriving at the ada main
function turns out to be auto/c.  [ This has been filed as PR25655 -
"Language is not auto/ada in main ada function for exec without debug info". ]

When building gdb without the configure flag mentioned above, we have instead
auto/ada in the ada main function, and all tests pass.

Fix the FAILs by working around PR25655 in the test-case, and manually setting
the language to ada.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2020-03-11  Tom de Vries  <tdevries@suse.de>

* gdb.ada/minsyms.exp: Set language to ada.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.ada/minsyms.exp

index f7cdea7da8708d56a903097e88f9801a8b2c3878..f98edafbc6654d6b312ae15d2efcba6d2bae3bb4 100644 (file)
@@ -1,3 +1,7 @@
+2020-03-11  Tom de Vries  <tdevries@suse.de>
+
+       * gdb.ada/minsyms.exp: Set language to ada.
+
 2020-03-11  Tom de Vries  <tdevries@suse.de>
 
        * gdb.server/sysroot.exp: Allow GLIBC's printf alias __printf.
index 1730eb3bd72a2f0b952fddf42f6f9021fea22383..1bed2e40daadee4ed6026e4f80da2f8bc2e9a07c 100644 (file)
@@ -28,6 +28,8 @@ if ![runto "_ada_foo_qb07_057" ] then {
   return
 }
 
+gdb_test_no_output "set language ada"
+
 gdb_test "print some_minsym" \
          "'some_minsym' has unknown type; cast it to its declared type"