Automatic date update in version.in
[binutils-gdb/blckswan.git] / gdb / testsuite / gdb.mi / mi-linespec-err-cp.exp
blobd9999078059879e6744641ccf239e1c106772b44
1 # Copyright 2016-2022 Free Software Foundation, Inc.
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.
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.
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/>.
16 # Regression test for PR breakpoints/18303. Tests that the correct
17 # errors is generated when setting a breakpoint in a non-existent
18 # file with a Windows-style logical drive names and C++.
20 if {[skip_cplus_tests]} {
21 return
24 load_lib mi-support.exp
25 set MIFLAGS "-i=mi"
27 standard_testfile .cc
28 set exefile $testfile
30 if {[build_executable "failed to prepare" $exefile $srcfile {debug c++}]} {
31 return -1
34 mi_clean_restart $binfile
36 # Turn off the pending breakpoint queries.
37 mi_gdb_test "-interpreter-exec console \"set breakpoint pending off\"" \
38 {=cmd-param-changed,param=\"breakpoint pending\",.*\^done} \
39 "-interpreter-exec console \"set breakpoint pending off\""
41 mi_runto_main
43 # Run to a location in the file.
44 set bp_location [gdb_get_line_number "set breakpoint here"]
46 mi_gdb_test "-break-insert ${srcfile}:${bp_location}" \
47 {\^done,bkpt=.number="2",type="breakpoint".*\}} "set breakpoint"
49 mi_execute_to "exec-continue" "breakpoint-hit" "myfunction" ".*" ".*" "24" \
50 { "" "disp=\"keep\"" } "breakpoint hit"
52 # Set a breakpoint in a C++ source file whose name contains a
53 # Windows-style logical drive.
54 mi_gdb_test \
55 "-break-insert -f \"c:/uu.cpp:13\"" \
56 ".*No source file named c:/uu.cpp.*"