summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/dmsym.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2017-07-20 17:52:03 +0100
committerPedro Alves <palves@redhat.com>2017-07-20 17:52:03 +0100
commit62d2a18a2e4bdb3c278ecda54c8317f179375d28 (patch)
tree784dfb3c42ac0ddc0cf4d0c23292c791511ec9cb /gdb/testsuite/gdb.base/dmsym.c
parent2d2dbad0605c85bb75662d2f219b1b886d5ab4cb (diff)
downloadbinutils-gdb-62d2a18a2e4bdb3c278ecda54c8317f179375d28.tar.gz
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.
Diffstat (limited to 'gdb/testsuite/gdb.base/dmsym.c')
-rw-r--r--gdb/testsuite/gdb.base/dmsym.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/testsuite/gdb.base/dmsym.c b/gdb/testsuite/gdb.base/dmsym.c
index f358b517ab9..dccea237340 100644
--- a/gdb/testsuite/gdb.base/dmsym.c
+++ b/gdb/testsuite/gdb.base/dmsym.c
@@ -15,11 +15,11 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-int pck__foo__bar__minsym = 123;
+static int test_minsym = 123;
int
-get_pck__foo__bar__minsym (void)
+get_test_minsym (void)
{
- pck__foo__bar__minsym++;
- return pck__foo__bar__minsym;
+ test_minsym++;
+ return test_minsym;
}