1 # Copyright
2015-2022 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
/>.
18 standard_testfile .pas
20 if {[gdb_compile_pascal
"${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug class]] != "" } {
21 untested
"failed to compile"
25 clean_restart $
{testfile
}
26 set bp_location
[gdb_get_line_number
"set breakpoint here"]
28 if { ![runto $
{srcfile
}:$
{bp_location
}] } {
32 # We are now inside CHECK method.
33 gdb_test
"p X" " = 67"
34 gdb_test
"p B.X" " = 11"
35 gdb_test
"p Y" " = 33"
36 gdb_test
"p B.Y" " = 35"
37 # As A is global
, we can also check its value.
38 gdb_test
"p A.X" " = 67"
39 gdb_test
"p A.Y" " = 33"
40 # Now test lowercase version.
41 gdb_test
"p x" " = 67"
42 gdb_test
"p y" " = 33"
43 gdb_test
"p B.x" " = 11"
44 gdb_test
"p B.y" " = 35"
45 # As A is global
, we can also check its value
, with lowercase.
46 gdb_test
"p A.x" " = 67"
47 gdb_test
"p A.y" " = 33"
48 # Also test lowercase class names.
49 gdb_test
"p b.X" " = 11"
50 gdb_test
"p b.x" " = 11"
51 gdb_test
"p b.Y" " = 35"
52 gdb_test
"p b.y" " = 35"
53 gdb_test
"p a.X" " = 67"
54 gdb_test
"p a.x" " = 67"
55 gdb_test
"p a.Y" " = 33"
56 gdb_test
"p a.y" " = 33"