Automatic Copyright Year update after running gdb/copyright.py
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / paginate-bg-execution.exp
CommitLineData
88b9d363 1# Copyright (C) 2014-2022 Free Software Foundation, Inc.
0017922d
PA
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
b78b3a29
TBA
16# Test that a breakpoint hit event coming from background execution
17# does not trigger pagination.
0017922d
PA
18
19standard_testfile
20
21if {[build_executable "failed to prepare" $testfile $srcfile debug] == -1} {
22 return -1
23}
24
b78b3a29
TBA
25# Check that we handle a stop event coming from a background execution
26# command without getting caught in pagination.
0017922d
PA
27
28proc test_bg_execution_pagination_return {} {
29 global binfile
b78b3a29 30 global decimal
0017922d
PA
31
32 with_test_prefix "paginate" {
33 clean_restart $binfile
34
35 if ![runto_main] then {
bc6c7af4 36 fail "can't run to main"
0017922d
PA
37 return 0
38 }
39
40 gdb_test "b after_sleep"
41
42 gdb_test_no_output "set height 2"
43
44 gdb_test "continue&" "Continuing\."
45
b78b3a29
TBA
46 gdb_test_multiple "" "no pagination, breakpoint hit" {
47 -re "Breakpoint $decimal, after_sleep\[^\r\n\]+\r\n\[^\r\n\]+\r\n" {
48 pass $gdb_test_name
0017922d
PA
49 }
50 }
51
52 gdb_test "p 1" " = 1" "GDB accepts further input"
53
54 # In case the board file wants to send further commands.
55 gdb_test_no_output "set height unlimited"
56 }
57}
58
59test_bg_execution_pagination_return
This page took 0.894311 seconds and 4 git commands to generate.