Update copyright year range in header of all files managed by GDB
[binutils-gdb.git] / gdb / testsuite / gdb.cp / try_catch.exp
blobf1d372b0b6981e771b30ead5d408c4c91a936420
1 # Copyright 2002-2023 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 # Tests for member data
17 # 2002-05-27  Benjamin Kosnik  <bkoz@redhat.com>
19 # This file is part of the gdb testsuite
21 if { [skip_stl_tests] } { return }
24 # test running programs
27 standard_testfile .cc
29 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
30     return -1
33 if {![runto_main]} {
34     return
37 gdb_breakpoint [gdb_get_line_number "marker 1-throw"]
38 gdb_continue_to_breakpoint "marker 1-throw"
40 gdb_breakpoint [gdb_get_line_number "marker 1-catch"]
41 gdb_continue_to_breakpoint "marker 1-catch"
43 gdb_breakpoint [gdb_get_line_number "marker 2-start"]
44 gdb_continue_to_breakpoint "marker 2-start"
46 gdb_breakpoint [gdb_get_line_number "marker 2-next"]
47 gdb_continue_to_breakpoint "marker 2-next"
49 gdb_breakpoint [gdb_get_line_number "marker 2-throw"]
50 gdb_continue_to_breakpoint "marker 2-throw"
52 gdb_breakpoint [gdb_get_line_number "marker 2-catch"]
53 gdb_continue_to_breakpoint "marker 2-catch"
55 gdb_breakpoint [gdb_get_line_number "marker 3-throw"]
56 gdb_continue_to_breakpoint "marker 3-throw"
58 gdb_breakpoint [gdb_get_line_number "marker 3-catch"]
59 gdb_continue_to_breakpoint "marker 3-catch"
61 gdb_breakpoint [gdb_get_line_number "marker test-complete"]
62 gdb_continue_to_breakpoint "marker test-complete"
63 gdb_test "p test" "= true"
65 gdb_exit
66 return 0