1 # Copyright 2012 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 standard_testfile lspec.cc
18 set execfile $testfile
20 set baseone base/one/thefile.cc
21 set basetwo base/two/thefile.cc
23 if {[skip_cplus_tests]} {
24 unsupported ${testfile}.exp
28 if {[prepare_for_testing ${testfile}.exp $execfile \
29 [list $srcfile $baseone $basetwo] \
30 {debug nowarnings c++}]} {
34 gdb_test "skip function dupname" \
35 {Function dupname will be skipped when stepping\.}
41 set test "dupname ignored from main"
42 gdb_test_multiple "step" $test {
43 -re "^step\r\ndupname .*\r\n$gdb_prompt $" {
46 -re "^step\r\nm .*\r\n$gdb_prompt $" {
52 gdb_continue_to_breakpoint "n" ".* dupname.* thefile breakpoint .*"
54 set test "dupname ignored from n"
55 gdb_test_multiple "step" $test {
56 -re "^step\r\ndupname .*\r\n$gdb_prompt $" {
59 -re "^step\r\n\[^\r\n\]* after dupname .*\r\n$gdb_prompt $" {
64 gdb_test_no_output "skip delete 1"
66 gdb_test "skip file thefile.cc" \
67 {File thefile\.cc will be skipped when stepping\.}
73 gdb_test "step" "static int dupname .*" "step into dupname"
74 gdb_test "finish" "return dupname.* body_elsewhere.*" "finish from dupname"
76 set test "dupname ignored for thefile.cc"
77 gdb_test_multiple "step" $test {
78 -re "^step\r\ndupname .*\r\n$gdb_prompt $" {
81 -re "^step\r\nf1 .* f1 breakpoint .*\r\n$gdb_prompt $" {