ignore invalid DOF provider sections
[binutils-gdb.git] / gdb / testsuite / gdb.cp / static-print-quit.exp
blob192fd28bdb8d38fbab344e04d3686ed87d4d2e69
1 # Copyright 2010-2015 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 if { [skip_cplus_tests] } { continue }
18 standard_testfile .cc
20 if { [gdb_compile $srcdir/$subdir/$srcfile $binfile.o object {debug c++}] != ""} {
21 untested ${testfile}.exp
22 return -1
25 clean_restart $testfile.o
27 gdb_test_no_output "set width 80"
28 gdb_test_no_output "set height 2"
30 set test "print c - <return>"
31 gdb_test_multiple "print c" $test {
32 -re "\\$\[0-9\]+ = \{loooooooooooooooooooooooooooooooooooooooooooooong = 0, static field = \{\r\n---Type <return>" {
33 pass $test
35 -re "\r\n---Type <return>" {
36 # gdb-7.1 did not crash with this testcase but it had the same bug.
37 untested ${testfile}.exp
38 return 0
42 set test "print c - q <return>"
43 gdb_test_multiple "" $test {
44 -re " to continue, or q <return>" {
45 pass $test
49 set test "print c - to quit"
50 gdb_test_multiple "" $test {
51 -re " to quit---$" {
52 pass $test
56 gdb_test "q" ".*"
58 # Now the obstack is uninitialized. Excercise it.
60 gdb_test_no_output "set pagination off"
61 gdb_test "print c" ".*" "first print"
62 gdb_test "print c" ".*" "second print"