Fix breakpoint add on inlined function using function name.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.ada / bp_c_mixed_case.exp
CommitLineData
289483b6
JB
1# Copyright 2018 Free Software Foundation, Inc.
2#
3# This program is free software; you can redistribute it and/or modify
4# it under the terms of the GNU General Public License as published by
5# the Free Software Foundation; either version 3 of the License, or
6# (at your option) any later version.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16load_lib "ada.exp"
17
18standard_ada_testfile foo_h731_021
19
20set cfile "bar"
21set csrcfile ${srcdir}/${subdir}/${testdir}/${cfile}.c
22set cobject [standard_output_file ${cfile}.o]
23
24gdb_compile "${csrcfile}" "${cobject}" object [list debug]
25if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-largs additional_flags=${cobject} additional_flags=-margs]] != "" } {
26 return -1
27}
28
29clean_restart ${testfile}
30
31if ![runto "foo_h731_021"] then {
32 perror "Couldn't run ${testfile}"
33 return
34}
35
36# Verify that the current language is Ada.
37gdb_test "show lang" \
38 "\"auto; currently ada\"\\."
39
40# Try inserting a breakpoint inside a C function. Because the function's
41# name has some uppercase letters, we need to use the "<...>" notation.
42# The purpose of this testcase is to verify that we can in fact do so
43# and that it inserts the breakpoint at the expected location.
44setup_kfail gdb/22670 "*-*-*"
45gdb_test "break <MixedCaseFunc>" \
46 "Breakpoint $decimal at $hex: file .*bar.c, line $decimal\\."
47
48# Resume the program's execution, verifying that it lands at the expected
49# location.
50setup_kfail gdb/22670 "*-*-*"
51gdb_test "continue" \
52 "Breakpoint $decimal, MixedCaseFunc \\(\\) at .*bar\\.c:$decimal.*"
This page took 0.039486 seconds and 4 git commands to generate.