Add new gdb.ada/bp_c_mixed_case testcase for PR gdb/22670
authorJoel Brobecker <brobecker@adacore.com>
Thu, 4 Jan 2018 08:10:34 +0000 (03:10 -0500)
committerJoel Brobecker <brobecker@adacore.com>
Thu, 4 Jan 2018 08:30:39 +0000 (03:30 -0500)
commit289483b6a06c7a24ee9ae9021d2728ca4700b7a6
tree61830b1718fb7a6a6c63a118255e2f7d5c8a170d
parent344420da6beac1e0b2f7964e7101f8dcdb509b0d
Add new gdb.ada/bp_c_mixed_case testcase for PR gdb/22670

This patch adds a new testcase to demonstrate a regression introduced by:

    commit b5ec771e60c1a0863e51eb491c85c674097e9e13
    Date:   Wed Nov 8 14:22:32 2017 +0000
    Subject: Introduce lookup_name_info and generalize Ada's FULL/WILD name matching

The purpose of the testcase is to verify that a user can insert
a breakpoint on a C function while debugging Ada, even if the name
of the function includes uppercase letters, requiring us to use
Ada's "<...>" notation to tell the GDB that the symbol name should
be looked up verbatim.

As of the commit above, GDB is no longer finding the function:

    (gdb) break <MixedCaseFunc>
    Function "<MixedCaseFunc>" not defined.
    Make breakpoint pending on future shared library load? (y or [n])

Before the patch, the breakpoint was inserted without problem.

gdb/testsuite/ChangeLog:

        PR gdb/22670
        * gdb.ada/bp_c_mixed_case: New testcase.

Tested on x86_64-linux; generates a KPASS before the regression
was introduced, and now generates a KFAIL.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.ada/bp_c_mixed_case.exp [new file with mode: 0644]
gdb/testsuite/gdb.ada/bp_c_mixed_case/bar.c [new file with mode: 0644]
gdb/testsuite/gdb.ada/bp_c_mixed_case/foo_h731_021.adb [new file with mode: 0644]