Make gdb.base/dmsym.exp independent of "set language ada"
authorPedro Alves <palves@redhat.com>
Thu, 20 Jul 2017 16:52:03 +0000 (17:52 +0100)
committerPedro Alves <palves@redhat.com>
Thu, 20 Jul 2017 16:52:03 +0000 (17:52 +0100)
commit62d2a18a2e4bdb3c278ecda54c8317f179375d28
tree784dfb3c42ac0ddc0cf4d0c23292c791511ec9cb
parent2d2dbad0605c85bb75662d2f219b1b886d5ab4cb
Make gdb.base/dmsym.exp independent of "set language ada"

This test is using "set language ada" expecting that to cause GDB to
do Ada symbol name matching.  That won't work when GDB uses the
symbol's language to decide which symbol matching algorithm to use,
because the test's symbols are C symbols.

So generalize the test a bit to not rely on Ada name matching rules.

Confirmed that by undoing the original fix the test was written for,
the test still fails.

gdb/testsuite/ChangeLog:
2017-07-20  Pedro Alves  <palves@redhat.com>

* gdb.base/dmsym.c (pck__foo__bar__minsym): Rename to ...
(test_minsym): ... this, and make static.
(get_pck__foo__bar__minsym): Rename to ...
(get_test_minsym): ... this.
* gdb.base/dmsym.exp (): Remove "set language ada" call.  Adjust
symbol names and comments.
* gdb.base/dmsym_main.c (get_pck__foo__bar__minsym): Rename to ...
(get_test_minsym): ... this.
(pck__foo__bar__minsym__2): Rename to ...
(test_minsym): ... this.
(main): Adjust.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/dmsym.c
gdb/testsuite/gdb.base/dmsym.exp
gdb/testsuite/gdb.base/dmsym_main.c