Commit | Line | Data |
---|---|---|
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 | ||
16 | load_lib "ada.exp" | |
17 | ||
18 | standard_ada_testfile foo_h731_021 | |
19 | ||
20 | set cfile "bar" | |
21 | set csrcfile ${srcdir}/${subdir}/${testdir}/${cfile}.c | |
22 | set cobject [standard_output_file ${cfile}.o] | |
23 | ||
24 | gdb_compile "${csrcfile}" "${cobject}" object [list debug] | |
25 | if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-largs additional_flags=${cobject} additional_flags=-margs]] != "" } { | |
26 | return -1 | |
27 | } | |
28 | ||
29 | clean_restart ${testfile} | |
30 | ||
31 | if ![runto "foo_h731_021"] then { | |
32 | perror "Couldn't run ${testfile}" | |
33 | return | |
34 | } | |
35 | ||
36 | # Verify that the current language is Ada. | |
37 | gdb_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. | |
44 | setup_kfail gdb/22670 "*-*-*" | |
45 | gdb_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. | |
50 | setup_kfail gdb/22670 "*-*-*" | |
51 | gdb_test "continue" \ | |
52 | "Breakpoint $decimal, MixedCaseFunc \\(\\) at .*bar\\.c:$decimal.*" |