gdb: make get_dyn_prop a method of struct type
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.ada / unchecked_union.exp
index e52223813909118ad093a85ec252903330da3f5b..c85d7c331531d878ca5710113b759803d6178e85 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2019 Free Software Foundation, Inc.
+# Copyright 2019-2020 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -19,15 +19,6 @@ load_lib "ada.exp"
 
 standard_ada_testfile unchecked_union
 
-if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
-  return -1
-}
-
-clean_restart ${testfile}
-
-set bp_location [gdb_get_line_number "BREAK" ${testdir}/unchecked_union.adb]
-runto "unchecked_union.adb:$bp_location"
-
 proc multi_line_string {str} {
     set result {}
     foreach line [split $str \n] {
@@ -54,5 +45,21 @@ set pair_string {    case ? is
 }
 set pair_full "type = record\n${inner_string}${pair_string}end record"
 
-gdb_test "ptype Pair" [multi_line_string $pair_full]
-gdb_test "ptype Inner" [multi_line_string $inner_full]
+foreach_with_prefix scenario {none all minimal} {
+    set flags {debug}
+    if {$scenario != "none"} {
+       lappend flags additional_flags=-fgnat-encodings=$scenario
+    }
+
+    if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
+       return -1
+    }
+
+    clean_restart ${testfile}
+
+    set bp_location [gdb_get_line_number "BREAK" ${testdir}/unchecked_union.adb]
+    runto "unchecked_union.adb:$bp_location"
+
+    gdb_test "ptype Pair" [multi_line_string $pair_full]
+    gdb_test "ptype Inner" [multi_line_string $inner_full]
+}
This page took 0.025946 seconds and 4 git commands to generate.