return -1
}
-# Identifying the runtime type of S can only be done when we have the debug
-# info for the GNAT runtime.
-
-if { $has_runtime_debug_info } {
- gdb_test "ptype s" \
- [multi_line \
- "type = <ref> new pck.shape with record" \
- " r: integer;" \
- "end record"] \
- "ptype s, with debug info"
-} else {
- gdb_test "ptype s" \
- [multi_line \
- "type = <ref> tagged record" \
- " x: integer;" \
- " y: integer;" \
- "end record" ] \
- "ptype s, without debug info"
+# With some versions of the compiler, identifying the runtime type of
+# S can only be done when we have the debug info for the GNAT runtime.
+set ordinary [multi_line \
+ "type = <ref> new pck.shape with record" \
+ " r: integer;" \
+ "end record"]
+set nodebug [multi_line \
+ "type = <ref> tagged record" \
+ " x: integer;" \
+ " y: integer;" \
+ "end record"]
+
+gdb_test_multiple "ptype s" "ptype s" {
+ -re -wrap $ordinary {
+ pass $gdb_test_name
+ }
+ -re -wrap $nodebug {
+ if {$has_runtime_debug_info} {
+ kfail "no debug info" $gdb_test_name
+ } else {
+ fail $gdb_test_name
+ }
+ }
}
-