]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.pascal/gdb11492.exp
Update copyright year range in header of all files managed by GDB
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.pascal / gdb11492.exp
CommitLineData
1d506c26 1# Copyright 2010-2024 Free Software Foundation, Inc.
6e354e5e
PM
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
6e354e5e
PM
16load_lib "pascal.exp"
17
17b77626 18standard_testfile .pas
6e354e5e
PM
19
20if {[gdb_compile_pascal "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug ]] != "" } {
5b362f04 21 untested "failed to compile"
17b77626 22 return -1
6e354e5e
PM
23}
24
17b77626 25clean_restart ${testfile}
4a6bdfb9
SM
26
27if { ![runto_main] } {
28 return
29}
30
6e354e5e
PM
31set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
32
33if { [gdb_breakpoint ${srcfile}:${bp_location1}] } {
34 pass "setting breakpoint 1"
35}
36
6e354e5e
PM
37gdb_test "continue" ""
38
64af4c92 39gdb_test "print integer_array" { = \{50, 51, 52, 53, 54, 55, 56, 57\}}
6e354e5e
PM
40gdb_test "print /s integer_array" " = '23456789'"
41
42gdb_test "print char_array" " = '23456789'"
64af4c92
JK
43gdb_test "print /d char_array" { = \{50, 51, 52, 53, 54, 55, 56, 57\}}
44gdb_test "print /x char_array" { = \{0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39\}}
6e354e5e
PM
45# Use next two times to avoid GPC line numbering problem
46gdb_test "next" ""
7c121311
TV
47with_test_prefix "second" {
48 gdb_test "next" ""
49}
50with_test_prefix "after assignment" {
51 gdb_test "print char_array" " = '2345X789'"
52}
6e354e5e
PM
53gdb_exit
54