* 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.
This commit is contained in:
Tom Tromey 2012-07-26 18:43:02 +00:00
parent 7cfe01b4b3
commit 8223e12c08
73 changed files with 186 additions and 372 deletions

View 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.

View 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
}

View File

@ -15,12 +15,8 @@
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
}

View 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
}

View File

@ -15,12 +15,8 @@
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
}

View 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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,17 +15,14 @@
load_lib "ada.exp"
set testdir "cond_lang"
set testfile "${testdir}/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}
standard_ada_testfile a
set cfile "${testdir}/foo"
set csrcfile ${srcdir}/${subdir}/${cfile}.c
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
}

View File

@ -15,12 +15,8 @@
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
}

View 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
}

View 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.

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View 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
}

View File

@ -26,13 +26,8 @@
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

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View 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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,17 +15,13 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View 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
}

View 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
}

View 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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View 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
}

View File

@ -15,12 +15,8 @@
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
}

View 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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View 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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -18,12 +18,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View 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
}

View File

@ -15,12 +15,8 @@
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
}

View File

@ -15,12 +15,8 @@
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
}

View 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]
}