]>
Commit | Line | Data |
---|---|---|
4a94e368 | 1 | # Copyright 2010-2022 Free Software Foundation, Inc. |
dadf0e9c JB |
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 | ||
dadf0e9c JB |
16 | load_lib "ada.exp" |
17 | ||
7a82e903 PA |
18 | if { [skip_ada_tests] } { return -1 } |
19 | ||
8223e12c | 20 | standard_ada_testfile foo |
dadf0e9c | 21 | |
dadf0e9c JB |
22 | if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } { |
23 | return -1 | |
24 | } | |
25 | ||
b28a729d SM |
26 | set has_runtime_debug_info [gnat_runtime_has_debug_info] |
27 | ||
09050809 | 28 | clean_restart ${testfile} |
dadf0e9c JB |
29 | |
30 | if ![runto "position_x" ] then { | |
31 | return -1 | |
32 | } | |
33 | ||
b28a729d SM |
34 | # Identifying the runtime type of S can only be done when we have the debug |
35 | # info for the GNAT runtime. | |
36 | ||
37 | if { $has_runtime_debug_info } { | |
38 | gdb_test "ptype s" \ | |
39 | [multi_line \ | |
40 | "type = <ref> new pck.shape with record" \ | |
41 | " r: integer;" \ | |
42 | "end record"] \ | |
43 | "ptype s, with debug info" | |
44 | } else { | |
45 | gdb_test "ptype s" \ | |
46 | [multi_line \ | |
47 | "type = <ref> tagged record" \ | |
48 | " x: integer;" \ | |
49 | " y: integer;" \ | |
50 | "end record" ] \ | |
51 | "ptype s, without debug info" | |
52 | } | |
dadf0e9c | 53 |