]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* lib/ada.exp (standard_ada_testfile): New proc.
authorTom Tromey <tromey@redhat.com>
Thu, 26 Jul 2012 18:43:02 +0000 (18:43 +0000)
committerTom Tromey <tromey@redhat.com>
Thu, 26 Jul 2012 18:43:02 +0000 (18:43 +0000)
* gdb.ada/aliased_array.exp: Use standard_ada_testfile.
* gdb.ada/array_bounds.exp: Use standard_ada_testfile.
* gdb.ada/array_return.exp: Use standard_ada_testfile.
* gdb.ada/array_subscript_addr.exp: Use standard_ada_testfile.
* gdb.ada/arrayidx.exp: Use standard_ada_testfile.
* gdb.ada/arrayparam.exp: Use standard_ada_testfile.
* gdb.ada/arrayptr.exp: Use standard_ada_testfile.
* gdb.ada/atomic_enum.exp: Use standard_ada_testfile.
* gdb.ada/bad-task-bp-keyword.exp: Use standard_ada_testfile.
* gdb.ada/bp_enum_homonym.exp: Use standard_ada_testfile.
* gdb.ada/bp_on_var.exp: Use standard_ada_testfile.
* gdb.ada/bp_range_type.exp: Use standard_ada_testfile.
* gdb.ada/call_pn.exp: Use standard_ada_testfile.
* gdb.ada/catch_ex.exp: Use standard_ada_testfile.
* gdb.ada/char_enum.exp: Use standard_ada_testfile.
* gdb.ada/char_param.exp: Use standard_ada_testfile.
* gdb.ada/complete.exp: Use standard_ada_testfile.
* gdb.ada/cond_lang.exp: Use standard_ada_testfile,
standard_output_file.
* gdb.ada/dyn_loc.exp: Use standard_ada_testfile.
* gdb.ada/enum_idx_packed.exp: Use standard_ada_testfile.
* gdb.ada/exec_changed.exp: Use standard_ada_testfile,
standard_output_file.
* gdb.ada/exprs.exp: Use standard_ada_testfile.
* gdb.ada/fixed_cmp.exp: Use standard_ada_testfile.
* gdb.ada/fixed_points.exp: Use standard_ada_testfile.
* gdb.ada/formatted_ref.exp: Use standard_ada_testfile.
* gdb.ada/frame_args.exp: Use standard_ada_testfile.
* gdb.ada/fullname_bp.exp: Use standard_ada_testfile.
* gdb.ada/fun_addr.exp: Use standard_ada_testfile.
* gdb.ada/fun_in_declare.exp: Use standard_ada_testfile.
* gdb.ada/funcall_param.exp: Use standard_ada_testfile.
* gdb.ada/homonym.exp: Use standard_ada_testfile.
* gdb.ada/info_locals_renaming.exp: Use standard_ada_testfile.
* gdb.ada/int_deref.exp: Use standard_ada_testfile.
* gdb.ada/interface.exp: Use standard_ada_testfile.
* gdb.ada/lang_switch.exp: Use standard_ada_testfile,
standard_output_file
* gdb.ada/mi_catch_ex.exp: Use standard_ada_testfile.
* gdb.ada/mi_task_arg.exp: Use standard_ada_testfile.
* gdb.ada/mi_task_info.exp: Use standard_ada_testfile.
* gdb.ada/mod_from_name.exp: Use standard_ada_testfile.
* gdb.ada/nested.exp: Use standard_ada_testfile.
* gdb.ada/null_array.exp: Use standard_ada_testfile.
* gdb.ada/null_record.exp: Use standard_ada_testfile.
* gdb.ada/operator_bp.exp: Use standard_ada_testfile.
* gdb.ada/packed_array.exp: Use standard_ada_testfile.
* gdb.ada/packed_tagged.exp: Use standard_ada_testfile.
* gdb.ada/print_chars.exp: Use standard_ada_testfile.
* gdb.ada/print_pc.exp: Use standard_ada_testfile.
* gdb.ada/ptr_typedef.exp: Use standard_ada_testfile.
* gdb.ada/ptype_field.exp: Use standard_ada_testfile.
* gdb.ada/ptype_tagged_param.exp: Use standard_ada_testfile.
* gdb.ada/rec_return.exp: Use standard_ada_testfile.
* gdb.ada/ref_param.exp: Use standard_ada_testfile.
* gdb.ada/ref_tick_size.exp: Use standard_ada_testfile.
* gdb.ada/same_enum.exp: Use standard_ada_testfile.
* gdb.ada/set_pckd_arr_elt.exp: Use standard_ada_testfile.
* gdb.ada/small_reg_param.exp: Use standard_ada_testfile.
* gdb.ada/start.exp: Use standard_ada_testfile.
* gdb.ada/str_ref_cmp.exp: Use standard_ada_testfile.
* gdb.ada/sym_print_name.exp: Use standard_ada_testfile.
* gdb.ada/taft_type.exp: Use standard_ada_testfile.
* gdb.ada/tagged.exp: Use standard_ada_testfile.
* gdb.ada/tagged_not_init.exp: Use standard_ada_testfile.
* gdb.ada/task_bp.exp: Use standard_ada_testfile.
* gdb.ada/tasks.exp: Use standard_ada_testfile.
* gdb.ada/tick_last_segv.exp: Use standard_ada_testfile.
* gdb.ada/type_coercion.exp: Use standard_ada_testfile.
* gdb.ada/uninitialized_vars.exp: Use standard_ada_testfile.
* gdb.ada/variant_record_packed_array.exp: Use standard_ada_testfile.
* gdb.ada/watch_arg.exp: Use standard_ada_testfile.
* gdb.ada/whatis_array_val.exp: Use standard_ada_testfile.
* gdb.ada/widewide.exp: Use standard_ada_testfile.

73 files changed:
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.ada/aliased_array.exp
gdb/testsuite/gdb.ada/array_bounds.exp
gdb/testsuite/gdb.ada/array_return.exp
gdb/testsuite/gdb.ada/array_subscript_addr.exp
gdb/testsuite/gdb.ada/arrayidx.exp
gdb/testsuite/gdb.ada/arrayparam.exp
gdb/testsuite/gdb.ada/arrayptr.exp
gdb/testsuite/gdb.ada/atomic_enum.exp
gdb/testsuite/gdb.ada/bad-task-bp-keyword.exp
gdb/testsuite/gdb.ada/bp_enum_homonym.exp
gdb/testsuite/gdb.ada/bp_on_var.exp
gdb/testsuite/gdb.ada/bp_range_type.exp
gdb/testsuite/gdb.ada/call_pn.exp
gdb/testsuite/gdb.ada/catch_ex.exp
gdb/testsuite/gdb.ada/char_enum.exp
gdb/testsuite/gdb.ada/char_param.exp
gdb/testsuite/gdb.ada/complete.exp
gdb/testsuite/gdb.ada/cond_lang.exp
gdb/testsuite/gdb.ada/dyn_loc.exp
gdb/testsuite/gdb.ada/enum_idx_packed.exp
gdb/testsuite/gdb.ada/exec_changed.exp
gdb/testsuite/gdb.ada/exprs.exp
gdb/testsuite/gdb.ada/fixed_cmp.exp
gdb/testsuite/gdb.ada/fixed_points.exp
gdb/testsuite/gdb.ada/formatted_ref.exp
gdb/testsuite/gdb.ada/frame_args.exp
gdb/testsuite/gdb.ada/fullname_bp.exp
gdb/testsuite/gdb.ada/fun_addr.exp
gdb/testsuite/gdb.ada/fun_in_declare.exp
gdb/testsuite/gdb.ada/funcall_param.exp
gdb/testsuite/gdb.ada/homonym.exp
gdb/testsuite/gdb.ada/info_locals_renaming.exp
gdb/testsuite/gdb.ada/int_deref.exp
gdb/testsuite/gdb.ada/interface.exp
gdb/testsuite/gdb.ada/lang_switch.exp
gdb/testsuite/gdb.ada/mi_catch_ex.exp
gdb/testsuite/gdb.ada/mi_task_arg.exp
gdb/testsuite/gdb.ada/mi_task_info.exp
gdb/testsuite/gdb.ada/mod_from_name.exp
gdb/testsuite/gdb.ada/nested.exp
gdb/testsuite/gdb.ada/null_array.exp
gdb/testsuite/gdb.ada/null_record.exp
gdb/testsuite/gdb.ada/operator_bp.exp
gdb/testsuite/gdb.ada/packed_array.exp
gdb/testsuite/gdb.ada/packed_tagged.exp
gdb/testsuite/gdb.ada/print_chars.exp
gdb/testsuite/gdb.ada/print_pc.exp
gdb/testsuite/gdb.ada/ptr_typedef.exp
gdb/testsuite/gdb.ada/ptype_field.exp
gdb/testsuite/gdb.ada/ptype_tagged_param.exp
gdb/testsuite/gdb.ada/rec_return.exp
gdb/testsuite/gdb.ada/ref_param.exp
gdb/testsuite/gdb.ada/ref_tick_size.exp
gdb/testsuite/gdb.ada/same_enum.exp
gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp
gdb/testsuite/gdb.ada/small_reg_param.exp
gdb/testsuite/gdb.ada/start.exp
gdb/testsuite/gdb.ada/str_ref_cmp.exp
gdb/testsuite/gdb.ada/sym_print_name.exp
gdb/testsuite/gdb.ada/taft_type.exp
gdb/testsuite/gdb.ada/tagged.exp
gdb/testsuite/gdb.ada/tagged_not_init.exp
gdb/testsuite/gdb.ada/task_bp.exp
gdb/testsuite/gdb.ada/tasks.exp
gdb/testsuite/gdb.ada/tick_last_segv.exp
gdb/testsuite/gdb.ada/type_coercion.exp
gdb/testsuite/gdb.ada/uninitialized_vars.exp
gdb/testsuite/gdb.ada/variant_record_packed_array.exp
gdb/testsuite/gdb.ada/watch_arg.exp
gdb/testsuite/gdb.ada/whatis_array_val.exp
gdb/testsuite/gdb.ada/widewide.exp
gdb/testsuite/lib/ada.exp

index 4e6723071bc28a8825a67d119db14f42c6ac4d01..0c11c2b4a364a659bd020392a8904e0d2066204f 100644 (file)
@@ -1,3 +1,81 @@
+2012-07-26  Tom Tromey  <tromey@redhat.com>
+
+       * lib/ada.exp (standard_ada_testfile): New proc.
+       * gdb.ada/aliased_array.exp: Use standard_ada_testfile.
+       * gdb.ada/array_bounds.exp: Use standard_ada_testfile.
+       * gdb.ada/array_return.exp: Use standard_ada_testfile.
+       * gdb.ada/array_subscript_addr.exp: Use standard_ada_testfile.
+       * gdb.ada/arrayidx.exp: Use standard_ada_testfile.
+       * gdb.ada/arrayparam.exp: Use standard_ada_testfile.
+       * gdb.ada/arrayptr.exp: Use standard_ada_testfile.
+       * gdb.ada/atomic_enum.exp: Use standard_ada_testfile.
+       * gdb.ada/bad-task-bp-keyword.exp: Use standard_ada_testfile.
+       * gdb.ada/bp_enum_homonym.exp: Use standard_ada_testfile.
+       * gdb.ada/bp_on_var.exp: Use standard_ada_testfile.
+       * gdb.ada/bp_range_type.exp: Use standard_ada_testfile.
+       * gdb.ada/call_pn.exp: Use standard_ada_testfile.
+       * gdb.ada/catch_ex.exp: Use standard_ada_testfile.
+       * gdb.ada/char_enum.exp: Use standard_ada_testfile.
+       * gdb.ada/char_param.exp: Use standard_ada_testfile.
+       * gdb.ada/complete.exp: Use standard_ada_testfile.
+       * gdb.ada/cond_lang.exp: Use standard_ada_testfile,
+       standard_output_file.
+       * gdb.ada/dyn_loc.exp: Use standard_ada_testfile.
+       * gdb.ada/enum_idx_packed.exp: Use standard_ada_testfile.
+       * gdb.ada/exec_changed.exp: Use standard_ada_testfile,
+       standard_output_file.
+       * gdb.ada/exprs.exp: Use standard_ada_testfile.
+       * gdb.ada/fixed_cmp.exp: Use standard_ada_testfile.
+       * gdb.ada/fixed_points.exp: Use standard_ada_testfile.
+       * gdb.ada/formatted_ref.exp: Use standard_ada_testfile.
+       * gdb.ada/frame_args.exp: Use standard_ada_testfile.
+       * gdb.ada/fullname_bp.exp: Use standard_ada_testfile.
+       * gdb.ada/fun_addr.exp: Use standard_ada_testfile.
+       * gdb.ada/fun_in_declare.exp: Use standard_ada_testfile.
+       * gdb.ada/funcall_param.exp: Use standard_ada_testfile.
+       * gdb.ada/homonym.exp: Use standard_ada_testfile.
+       * gdb.ada/info_locals_renaming.exp: Use standard_ada_testfile.
+       * gdb.ada/int_deref.exp: Use standard_ada_testfile.
+       * gdb.ada/interface.exp: Use standard_ada_testfile.
+       * gdb.ada/lang_switch.exp: Use standard_ada_testfile,
+       standard_output_file
+       * gdb.ada/mi_catch_ex.exp: Use standard_ada_testfile.
+       * gdb.ada/mi_task_arg.exp: Use standard_ada_testfile.
+       * gdb.ada/mi_task_info.exp: Use standard_ada_testfile.
+       * gdb.ada/mod_from_name.exp: Use standard_ada_testfile.
+       * gdb.ada/nested.exp: Use standard_ada_testfile.
+       * gdb.ada/null_array.exp: Use standard_ada_testfile.
+       * gdb.ada/null_record.exp: Use standard_ada_testfile.
+       * gdb.ada/operator_bp.exp: Use standard_ada_testfile.
+       * gdb.ada/packed_array.exp: Use standard_ada_testfile.
+       * gdb.ada/packed_tagged.exp: Use standard_ada_testfile.
+       * gdb.ada/print_chars.exp: Use standard_ada_testfile.
+       * gdb.ada/print_pc.exp: Use standard_ada_testfile.
+       * gdb.ada/ptr_typedef.exp: Use standard_ada_testfile.
+       * gdb.ada/ptype_field.exp: Use standard_ada_testfile.
+       * gdb.ada/ptype_tagged_param.exp: Use standard_ada_testfile.
+       * gdb.ada/rec_return.exp: Use standard_ada_testfile.
+       * gdb.ada/ref_param.exp: Use standard_ada_testfile.
+       * gdb.ada/ref_tick_size.exp: Use standard_ada_testfile.
+       * gdb.ada/same_enum.exp: Use standard_ada_testfile.
+       * gdb.ada/set_pckd_arr_elt.exp: Use standard_ada_testfile.
+       * gdb.ada/small_reg_param.exp: Use standard_ada_testfile.
+       * gdb.ada/start.exp: Use standard_ada_testfile.
+       * gdb.ada/str_ref_cmp.exp: Use standard_ada_testfile.
+       * gdb.ada/sym_print_name.exp: Use standard_ada_testfile.
+       * gdb.ada/taft_type.exp: Use standard_ada_testfile.
+       * gdb.ada/tagged.exp: Use standard_ada_testfile.
+       * gdb.ada/tagged_not_init.exp: Use standard_ada_testfile.
+       * gdb.ada/task_bp.exp: Use standard_ada_testfile.
+       * gdb.ada/tasks.exp: Use standard_ada_testfile.
+       * gdb.ada/tick_last_segv.exp: Use standard_ada_testfile.
+       * gdb.ada/type_coercion.exp: Use standard_ada_testfile.
+       * gdb.ada/uninitialized_vars.exp: Use standard_ada_testfile.
+       * gdb.ada/variant_record_packed_array.exp: Use standard_ada_testfile.
+       * gdb.ada/watch_arg.exp: Use standard_ada_testfile.
+       * gdb.ada/whatis_array_val.exp: Use standard_ada_testfile.
+       * gdb.ada/widewide.exp: Use standard_ada_testfile.
+
 2012-07-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
        Fix testsuite regression after --use-deprecated-index-sections removal.
index 9fe30df9cded04861580e0143176f7033a2e872a..09bddf887639f41910a975b709410f373e198f06 100644 (file)
@@ -17,12 +17,8 @@ load_lib "ada.exp"
 
 if { [skip_ada_tests] } { return -1 }
 
-set testdir "aliased_array"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
     return -1
 }
index 493c7c3c6065d0bbac8eefab709eb914f77a001f..104a492b8ae567f549ddc0ed979ec49cf8b3af6a 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "array_bounds"
-set testfile "${testdir}/bar"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile bar
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index c72f8cfbc02ec76d86551b9a9f2d02c206084984..1d02e9e8b5ece1c85fba02de8dcf4c0d232abd09 100644 (file)
@@ -17,12 +17,8 @@ load_lib "ada.exp"
 
 if { [skip_ada_tests] } { return -1 }
 
-set testdir "array_return"
-set testfile "${testdir}/p"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile p
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
     return -1
 }
index aa10b272656210c43c416c53dd99c7deb343261e..5a04631f8d56bd7720c5d7f1c275fcc9f5a44ca8 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "array_subscript_addr"
-set testfile "${testdir}/p"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile p
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
   return -1
 }
index 5de1145098d878f180e1cde1d74c6f378dbc9106..30450262a23c297b170e40739989eec398b48ec0 100644 (file)
@@ -17,12 +17,8 @@ load_lib "ada.exp"
 
 if { [skip_ada_tests] } { return -1 }
 
-set testdir "arrayidx"
-set testfile "${testdir}/p"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile p
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
     return -1
 }
index d1549df271929ec8f754115760ea054dc08f4c49..b487797997ddafa8431de0b4af6c5795d4ad3e37 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "arrayparam"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
   return -1
 }
index 192feb12f15a988263719f68d9824092a0089259..a31749863cee80ff87eedec93ccd0193ff2dd751 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "arrayptr"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index e0ac2146f5ec1a18a9a1589fe5de22ef6598b366..eb9269d36a88e95e8d76621ca6239c807c9d1ed9 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "atomic_enum"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnat05 ]] != "" } {
   return -1
 }
index 2d2c891dc1e02a741288a0baa80995e9dc477b92..201079e7639670617dba2ed44d978c71ac7acbc3 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "bad-task-bp-keyword"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 5d6aa92375825098a009f291cd9d0b26b009cd92..3f11c2fd72b661dc7709a2fc31eaefea32543d9a 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "bp_enum_homonym"
-set testfile "${testdir}/p"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile p
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 73b5cd759b3b8dda93379b89ff01a0bb9a9dc555..dc56db51f3e93b34cbad5cfa89523053c09dca17 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "bp_on_var"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index f65e0c71edb94842e134165e2459ead7ffdb6fe3..057bf16b74604e9ec182e491c48fcaa5f1f4530e 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "bp_range_type"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 1b99252e80b7544b8dd86f41dfb9e96988fde536..01549972349afa6655b4cb24118e56cae77a401d 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "call_pn"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index f132355721bde7ea8ca42fb32b9dfeade76cf80d..b5adb31c6a6fdabedb6329ed9ad10e18b1643abc 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "catch_ex"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnata ]] != "" } {
   return -1
 }
index 4115ff31be7eeb10917697f23a3e3e890ed0d96f..e55ceb11ee80ccda0e19b7041e9fb6fd211ba46d 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "char_enum"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index e43772116dbf1b8c89bf5c22d9ff6b310df6ae1e..773ad6528249a9155f6c27b03bcb2da324e16837 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "char_param"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
   return -1
 }
index 4a0f2b4859c39f7c5080068ffb13a3694509678d..b748a8b46cd67083abc1a28e051bdf767bb0ff27 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "complete"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index b2aed95567bbef3cacd8464485786a9f27fc691e..68b3e9a8a3f3678b1e57dd1bfdfce14ad3de336a 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "cond_lang"
-set testfile "${testdir}/a"
+standard_ada_testfile a
+
 set cfile "${testdir}/foo"
-set adasrcfile ${srcdir}/${subdir}/${testfile}.adb
 set csrcfile ${srcdir}/${subdir}/${cfile}.c
-set cobject  ${objdir}/${subdir}/${cfile}.o
-set binfile ${objdir}/${subdir}/${testfile}
+set cobject [standard_output_file ${cfile}.o]
 
-file mkdir ${objdir}/${subdir}/${testdir}
 gdb_compile "${csrcfile}" "${cobject}" object [list debug]
-if {[gdb_compile_ada "${adasrcfile}" "${binfile}" executable [list debug]] != "" } {
+if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
   return -1
 }
 
index 1f7b9c2ca9999ebceb0ca0e1725f3554efba03be..82fe8d11204d9ed9cc392323bbb740c9c7a14cef 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "dyn_loc"
-set testfile "${testdir}/p"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile p
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 61284bb21a2eee37337d9133f1e5e92f37cbfdeb..87bc168543777c4e60b08af8b75a4ae745d558ab 100644 (file)
@@ -17,12 +17,8 @@ load_lib "ada.exp"
 
 if { [skip_ada_tests] } { return -1 }
 
-set testdir "enum_idx_packed"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
     return -1
 }
index 4a3792b80e0665077097dd01389d70f5a7d8fe33..583ee0a1985a09d46f9e02b274426546686f57fa 100644 (file)
@@ -24,22 +24,17 @@ if [target_info exists use_gdb_stub] {
     return
 }
 
-set testdir "exec_changed"
-file mkdir ${objdir}/${subdir}/${testdir}
+standard_ada_testfile first
 
 # Build the first test program (note that cygwin needs the $EXEEXT).
-set testfile1 "${testdir}/first"
-set srcfile1 ${srcdir}/${subdir}/${testfile1}.adb
-set binfile1 ${objdir}/${subdir}/${testfile1}$EXEEXT
-
-if {[gdb_compile_ada "${srcfile1}" "${binfile1}" executable {debug}] != ""} {
+if {[gdb_compile_ada "${srcfile}" "${binfile}$EXEEXT" executable {debug}] != ""} {
     return -1
 }
 
 # Build the second test program
 set testfile2 "${testdir}/second"
 set srcfile2 ${srcdir}/${subdir}/${testfile2}.adb
-set binfile2 ${objdir}/${subdir}/${testfile2}$EXEEXT
+set binfile2 [standard_output_file ${testfile2}$EXEEXT]
 
 if {[gdb_compile_ada "${srcfile2}" "${binfile2}" executable {debug}] != ""} {
     return -1
@@ -47,16 +42,15 @@ if {[gdb_compile_ada "${srcfile2}" "${binfile2}" executable {debug}] != ""} {
 
 # Start with a fresh gdb.
 
-set testfile "${testdir}/common"
-set binfile ${objdir}/${subdir}/${testfile}$EXEEXT
+set common_binfile [standard_output_file ${testdir}/common$EXEEXT]
 
 gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
 
 # Load the first executable.
 
-gdb_test "shell mv ${binfile1} ${binfile}" ".*" ""
-gdb_load ${binfile}
+gdb_test "shell mv ${binfile} ${common_binfile}" ".*" ""
+gdb_load ${common_binfile}
 
 # Start the program, we should land in the program main procedure
 if { [gdb_start_cmd] < 0 } {
@@ -72,10 +66,10 @@ gdb_test "" \
 # second executable into its place.  Ensure that the new
 # executable is at least a second newer than the old.
 
-gdb_test "shell mv ${binfile} ${binfile1}" ".*" ""
-gdb_test "shell mv ${binfile2} ${binfile}" ".*" ""
+gdb_test "shell mv ${common_binfile} ${binfile}" ".*" ""
+gdb_test "shell mv ${binfile2} ${common_binfile}" ".*" ""
 gdb_test "shell sleep 1" ".*" ""
-gdb_test "shell touch ${binfile}" ".*" ""
+gdb_test "shell touch ${common_binfile}" ".*" ""
 
 # Start the program a second time, GDB should land in procedure Second
 # this time.
index 764cd57fc188be672ed0e070c01ab5387f3c4641..43d9befb05b3a51a4994fe2d4226fd497f3785c0 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "exprs"
-set testfile "${testdir}/p"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile p
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 1d0f9605ebb959624f71886299c3643be96002c0..8fdb6f169d5d7168765cee9d2fa8b16bfd364a45 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "fixed_cmp"
-set testfile "${testdir}/fixed"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile fixed
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index d86a00b11811379e537cb9bc28bbd005b58c30d4..b9e42ca64736f04cfc289a88c344cc4725b3b8ff 100644 (file)
@@ -17,12 +17,8 @@ load_lib "ada.exp"
 
 if { [skip_ada_tests] } { return -1 }
 
-set testdir "fixed_points"
-set testfile "${testdir}/fixed_points"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile fixed_points
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
     return -1
 }
index 8341dca43c604c710b80f5632087eb68080f5d70..7858ffcb94dc26d4074abc07dcc7c9a3e3b2e974 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "formatted_ref"
-set testfile "${testdir}/formatted_ref"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile formatted_ref
 
-
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
     untested formatted-ref.exp
     return -1
index 98c1a440cedd0cb3384045e2733786e52f9540dd..7f409a15e02678906f2aa67f927e659df005e9be 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "frame_args"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 0cc4989440984d357b5ec16d54c17b9c60237ee3..a092d8444da7f0a74a9d054aff7676dda36f1dee 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "fullname_bp"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 99249954532e614f81037db295b2a80949c53ac5..ac945b37e639545b4dd52069d92412bacef54388 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "fun_addr"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index b73c74a9c6562a353687b35736f5b28b2f492a55..64b680dce20e106b956847f8a9e0a3bda169ec47 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "fun_in_declare"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index ac0da83ee152b6253e72e43363d075d549d6b526..757071c73f07e8c1f413f369f174ee861bce04d4 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "funcall_param"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
   return -1
 }
index a81135ac022e42ed4e088087746c1e61d5d8d7f9..21ab66b9f955563c46622cd9e67350b9a3ab3428 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "homonym"
-set testfile "${testdir}/homonym_main"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile homonym_main
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
   return -1
 }
index a8c646997d3cd2957fc9c4b174d158bbed76c182..8655c7536abcba6dc881160d4707cb62528dff0d 100644 (file)
@@ -17,12 +17,8 @@ load_lib "ada.exp"
 
 if { [skip_ada_tests] } { return -1 }
 
-set testdir "info_locals_renaming"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
     return -1
 }
index 51705bc6a2fad7be47627525d604eff11a2ed975..5a95feddcca8f0d306d70c0c287cb82d9827059d 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "int_deref"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
   return -1
 }
index ae21a5374ca08b097912895b98f7f4b135f6bf4c..ede2f683e6a914e4c99182363d527b162c0f43e3 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "interface"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnat05 ]] != "" } {
   return -1
 }
index 9e1468751aa1f37b2b8809aaacf45b254d6a45af..6ee4c238a8633630c3ef4ad0982992383daa7a9e 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "lang_switch"
-set testfile "${testdir}/lang_switch"
+standard_ada_testfile lang_switch
 set cfile "${testdir}/foo"
-set adasrcfile ${srcdir}/${subdir}/${testfile}.adb
 set csrcfile ${srcdir}/${subdir}/${cfile}.c
-set cobject  ${objdir}/${subdir}/${cfile}.o
-set binfile ${objdir}/${subdir}/${testfile}
+set cobject [standard_output_file ${cfile}.o]
 
-file mkdir ${objdir}/${subdir}/${testdir}
 gdb_compile "${csrcfile}" "${cobject}" object [list debug]
-if {[gdb_compile_ada "${adasrcfile}" "${binfile}" executable [list debug]] != "" } {
+if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
   return -1
 }
 
index 8d140b2b302dcc3c1eb970c52f445048dde689a2..4bbbf5a7f7c2b366c57b7a41d67059c654afff2e 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "mi_catch_ex"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnata ]] != "" } {
   return -1
 }
index 0b2013cecd369ca9de1c46318abed5c645906c66..efafed2af0a8ee1f699b717581e846b5c682a66a 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "mi_task_arg"
-set testfile "${testdir}/task_switch"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile task_switch
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnata ]] != "" } {
   return -1
 }
index 22e33757c58eccb6c0cd0861e569b59085966267..9625e98823ca4e2979ac5e9cf704d4e88d084103 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "mi_task_info"
-set testfile "${testdir}/task_switch"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile task_switch
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnata ]] != "" } {
   return -1
 }
index fe972451f79b59237d09333f958d2a9bd30f207d..ab1b2cab8122952636e6c41b71d9f8da5fb76d1e 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "mod_from_name"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 079577bf87cc971d9590137d89081e983f1fbed7..33ea5217206c1b08aa0b56079ef18105dd25133b 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "nested"
-set testfile "${testdir}/hello"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile hello
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 4a0541824e24ce8ff5ba5d6f6772cddf6223b1d9..22bc629e8e9bcbd0eb575fdf571f84a35b4c2bfc 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "null_array"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
   return -1
 }
index 97508b23efc522ee622dff071d2532dad65107f2..af12b7e932b33ed0502f98b18c91fefa37666f9b 100644 (file)
@@ -17,12 +17,8 @@ load_lib "ada.exp"
 
 if { [skip_ada_tests] } { return -1 }
 
-set testdir "null_record"
-set testfile "${testdir}/null_record"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile null_record
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
     return -1
 }
index 18cf46df28655391c345a38941b5cefd26966948..b0386f54c4746ae285de63d4d3d5968bb0c201f8 100644 (file)
@@ -17,12 +17,8 @@ load_lib "ada.exp"
 
 if { [skip_ada_tests] } { return -1 }
 
-set testdir "operator_bp"
-set testfile "${testdir}/ops_test"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile ops_test
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
     return -1
 }
index 678639cba42cb6edb231aa93ed2541c5a2a9f440..ef7b4d5f2ce2776a95a81bfc466929ae81587fe2 100644 (file)
@@ -17,12 +17,8 @@ load_lib "ada.exp"
 
 if { [skip_ada_tests] } { return -1 }
 
-set testdir "packed_array"
-set testfile "${testdir}/pa"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile pa
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
     return -1
 }
index 3cf8a2895ad161b2b3d9b43a8ed971e1130ffa1b..9ddc0a887889f1f2a71dc2c0a61cdcf1e9a45850 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "packed_tagged"
-set testfile "${testdir}/comp_bug"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile comp_bug
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
   return -1
 }
index 35dfcc6b85d548dd9211015853143857a15f5878..76bfa16e49accf9274329f653ee0a0271af32218 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "print_chars"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnat05 ]] != "" } {
   return -1
 }
index 371dd513cf8450b7d0a82c64b6ce046953a9ddb4..fe5a5595852bdff7a050ea84c9bd0031a1590a7c 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "start"
-set testfile "${testdir}/dummy"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile dummy start
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 8a3a4c71971bd1eed86952bd96ce6689ec38f601..ce6dd42116213ec2fdf793f5a21489bf16ec768a 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "ptr_typedef"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 03f8d8f3da6c66e119be93bd8c8b9f6f2713c970..1ca94e8d00a526b0cb3f8f3222ace08f5a729052 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "ptype_field"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnat05 ]] != "" } {
   return -1
 }
index d7107297b95ae106ace98d361c717ce830fceb52..e538b980d484ed15f4c75fa9885c9ea2fd9814ee 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "ptype_tagged_param"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 06fe4e63464e6505ab3821b8979075b7afcbd3b2..82d52ac1ce6142b8273212dd0ddf52d7376fafbf 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "rec_return"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 82fcc6163f6cfce4af7237b0a6e591ecab64d584..9d0a3a69877f515211da1b0ffa7c2f356ea55dc9 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "ref_param"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 8036723ec2e9387065d5dca1b86fd940bb5f1200..f71729b651200b53eaa08b63a090fc5cca8a3d6b 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "ref_tick_size"
-set testfile "${testdir}/p"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile p
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
   return -1
 }
index e9f1991a27d0e4cfd7cf865c1016f07f1c56ac7b..aa8826d0d4be1db100017d43c6a945789f583555 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "same_enum"
-set testfile "${testdir}/a"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile a
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 7f6f1d3ad95a8143f5f2cdf064f53dd97bcdf88e..6539535d02cf3e43d04af2faa30a98fd63eac32c 100644 (file)
@@ -17,12 +17,8 @@ load_lib "ada.exp"
 
 if { [skip_ada_tests] } { return -1 }
 
-set testdir "set_pckd_arr_elt"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
     return -1
 }
index c8ab9cf82db047f93d5b2d05d203d233c65bf468..77d830fae5df9743952ab4e53a489a4fdeda12a3 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "small_reg_param"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug optimize=-O1]] != "" } {
   return -1
 }
index 6ba180d0bca2dc7355b38dc73ba22346056b156b..7ccd17176c0fd06eda30adbfa82d2c90af28cc78 100644 (file)
@@ -24,12 +24,8 @@ if [target_info exists use_gdb_stub] {
     return
 }
 
-set testdir "start"
-set testfile "${testdir}/dummy"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile dummy
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
     return -1
 }
index b0db6aacc27e5ae9ec8e4fc707c17c728c804de0..6f24037f4a737e3e274279fd3cef2f482b1c01ee 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "str_ref_cmp"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
   return -1
 }
index 7a8765a7b7d492eda20bce3447ca2b5d088e4046..73b89e1478032eee90b89f64b19a2dff65700d99 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "sym_print_name"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
   return -1
 }
index b934ccc6c6beff3955bad13d053061f5ad4830f8..cc14d48b547a0e88714faad5f0b2fa5940d5c907 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "taft_type"
-set testfile "${testdir}/p"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile p
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 6cc316eb43eeb1f13e773395304f566048f3be6c..dcfe97843c385fc7123a0d88f08a6dbe83c4a423 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "tagged"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
   return -1
 }
index 013d76ab57861e97795b89b1c462320791e502cb..1113096b77184ae62c19775f130e94de175f7fda 100644 (file)
@@ -17,12 +17,8 @@ load_lib "ada.exp"
 
 if { [skip_ada_tests] } { return -1 }
 
-set testdir "tagged_not_init"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
     return -1
 }
index 11bdfacaea5319165360f87f0c20d4ae13c3eb44..1887bbd8e914e6cf0b23650bd59624f8461dd46a 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "task_bp"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
   return -1
 }
index 46a77ffbf0f3fe41fc0555eb5466998bda0dfd96..2807e2dfab30c6beb2c24605619a7f56f65a70c5 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "tasks"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index ce6782f7ef1b96cb80b89ac51249982a041bd8b1..bcde512e1a0e4f7be1cf39ec08ec0f87638dfb71 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "tick_last_segv"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 32b4136633db85cb2bb24e25faa13491ee8376a4..cb060cf38fdf6b4d4f138d02927f4606bed5a490 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "type_coercion"
-set testfile "${testdir}/assign"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile assign
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
   return -1
 }
index 0ce240e470ddc1ca53fa756807743752359270e9..412a2859b5fd8038c4e93b3e1c2fc4a85f4738b2 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "uninitialized_vars"
-set testfile "${testdir}/parse"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile parse
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
   return -1
 }
index 34bd3de789c706c5e6eaaa66beaada4e3e33d058..4df72ee48a266d64799aa0c2f2ea94ea443b93f2 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "variant_record_packed_array"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 1cb9ecaf494ea75f5a16ada1bf3715270889081a..b7b2156737d203b1a5bd6b3e5cf44f111cfda4a2 100644 (file)
@@ -17,12 +17,8 @@ load_lib "ada.exp"
 
 if { [skip_ada_tests] } { return -1 }
 
-set testdir "watch_arg"
-set testfile "${testdir}/watch"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile watch
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
     return -1
 }
index e937f0a57457857e8ef41f9d9f238aa74a86555f..0ac8d16f7c8cc997e4cf691ed9c7fa722f68274e 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "whatis_array_val"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index dbc5e5b49606dd83d673a545ef4dde6741a36ce5..ff7231a7b3c202546e27130f2c564b994b50114b 100644 (file)
 
 load_lib "ada.exp"
 
-set testdir "widewide"
-set testfile "${testdir}/foo"
-set srcfile ${srcdir}/${subdir}/${testfile}.adb
-set binfile ${objdir}/${subdir}/${testfile}
+standard_ada_testfile foo
 
-file mkdir ${objdir}/${subdir}/${testdir}
 if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
index 5845c1ace0cad3a124ea5024c8770fe0148676ab..612bfefdd696192a5e46c6a33108e3509f60f588 100644 (file)
@@ -38,3 +38,25 @@ proc gdb_compile_ada {source dest type options} {
     return $result
 }
 
+# Like standard_testfile, but for Ada.  Historically the Ada tests
+# used a different naming convention from many of the other gdb tests,
+# and this difference was preserved during the conversion to
+# standard_testfile.  DIR defaults to the base name of the test case;
+# but can be overridden to find sources in a different subdirectory of
+# gdb.ada.
+
+proc standard_ada_testfile {base_file {dir ""}} {
+    global gdb_test_file_name srcdir subdir
+    global testdir testfile srcfile binfile
+
+    if {$dir == ""} {
+       set testdir $gdb_test_file_name
+    } else {
+       set testdir $dir
+    }
+    set testfile $testdir/$base_file
+    set srcfile $srcdir/$subdir/$testfile.adb
+    set binfile [standard_output_file $testfile]
+
+    file mkdir [standard_output_file $testdir]
+}