1 # Copyright 2022-2024 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 # Create a multi-location breakpoint with a thread condition, then check the
17 # output of 'info breakpoints' to ensure that the thread condition is
18 # displayed correctly.
22 if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
32 gdb_breakpoint "foo thread 1"
33 set bp_number [get_integer_valueof "\$bpnum" 0]
34 if { $bp_number == 0 } {
35 unresolved "breakpoint not placed correctly"
42 gdb_test_multiple "info breakpoints" \
43 "check thread condition is displayed correctly" {
44 -re "\r\nNum\\s+\[^\r\n\]+\r\n" {
48 -re "^$bp_number\\s+breakpoint\\s+keep\\s+y\\s+<MULTIPLE>\\s*\r\n" {
53 -re "^\\s+stop only in thread 1\r\n" {
58 -re "^$bp_number\\.\[123\]\\s+\[^\r\n\]+:${decimal}\r\n" {
63 -re "^$gdb_prompt $" {
64 gdb_assert { $saw_header && $saw_cond && $loc_count == 3} \