mi-linespec-err-cp.exp revision 1.1.1.1
1# Copyright 2016 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# 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++. 19 20if {[skip_cplus_tests]} { 21 continue 22} 23 24load_lib mi-support.exp 25set MIFLAGS "-i=mi" 26 27standard_testfile .cc 28set exefile $testfile 29 30if {[prepare_for_testing $testfile $exefile $srcfile {debug c++}]} { 31 return -1 32} 33 34gdb_exit 35if {[mi_gdb_start]} { 36 continue 37} 38 39# Turn off the pending breakpoint queries. 40mi_gdb_test "-interpreter-exec console \"set breakpoint pending off\"" \ 41 {=cmd-param-changed,param=\"breakpoint pending\",.*\^done} \ 42 "-interpreter-exec console \"set breakpoint pending off\"" 43 44mi_run_to_main 45 46# Run to a location in the file. 47set bp_location [gdb_get_line_number "set breakpoint here"] 48 49mi_gdb_test "-break-insert ${srcfile}:${bp_location}" \ 50 {\^done,bkpt=.number="2",type="breakpoint".*\}} "set breakpoint" 51 52mi_execute_to "exec-continue" "breakpoint-hit" "myfunction" ".*" ".*" "24" \ 53 { "" "disp=\"keep\"" } "breakpoint hit" 54 55# Set a breakpoint in a C++ source file whose name contains a 56# Windows-style logical drive. 57mi_gdb_test \ 58 "-break-insert -f \"c:/uu.cpp:13\"" \ 59 ".*No source file named c:/uu.cpp.*" 60