[PATCH 7/57][Arm][GAS] Add support for MVE instructions: vstr/vldr
[binutils-gdb.git] / gdb / testsuite / gdb.base / paginate-inferior-exit.exp
blob39946ba8d0be63dfa29bfa095e2f7c6c9b3d0c44
1 # Copyright (C) 2014-2019 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 # A collection of tests related to running execution commands directly
17 # from the command line, with "-ex".
19 standard_testfile
21 if {[build_executable "failed to prepare" $testfile $srcfile debug] == -1} {
22 return -1
25 # Test paginating while printing about the inferior having exited.
27 proc test_paginate_inferior_exited {} {
28 global binfile
29 global gdb_prompt pagination_prompt
30 global inferior_exited_re
32 with_test_prefix "paginate" {
33 clean_restart $binfile
35 if ![runto_main] then {
36 fail "can't run to main"
37 return 0
40 # Force pagination.
41 gdb_test_no_output "set height 2"
43 set test "continue to pagination"
45 # Wait for the "Starting program" line, indicating the program
46 # is running.
47 set saw_starting 0
48 gdb_test_multiple "continue" $test {
49 -re "$pagination_prompt" {
50 if {$saw_starting} {
51 pass $test
52 } else {
53 send_gdb "\n"
54 exp_continue
57 -re "Continuing" {
58 set saw_starting 1
59 exp_continue
63 # We're now stopped in a pagination output while handling a
64 # target event, trying to print about the program exiting.
65 set test "inferior exits normally"
67 send_gdb "\n"
68 gdb_test_multiple "" $test {
69 -re "$inferior_exited_re normally.*$gdb_prompt $" {
70 pass $test
74 gdb_test "p 1" " = 1" "GDB accepts further input"
76 # In case the board file wants to send further commands.
77 gdb_test_no_output "set height unlimited"
81 test_paginate_inferior_exited