aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.ada
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.ada')
-rw-r--r--gdb/testsuite/gdb.ada/O2_float_param.exp4
-rw-r--r--gdb/testsuite/gdb.ada/O2_float_param/caller.adb1
-rw-r--r--gdb/testsuite/gdb.ada/O2_float_param/caller.ads1
-rw-r--r--gdb/testsuite/gdb.ada/access_tagged_param.exp4
-rw-r--r--gdb/testsuite/gdb.ada/access_to_packed_array.exp2
-rw-r--r--gdb/testsuite/gdb.ada/access_to_unbounded_array.exp2
-rw-r--r--gdb/testsuite/gdb.ada/addr_arith.exp10
-rw-r--r--gdb/testsuite/gdb.ada/aliased_array.exp3
-rw-r--r--gdb/testsuite/gdb.ada/aliased_array/foo.adb1
-rw-r--r--gdb/testsuite/gdb.ada/arr_acc_idx_w_gap.exp2
-rw-r--r--gdb/testsuite/gdb.ada/arr_arr.exp2
-rw-r--r--gdb/testsuite/gdb.ada/arr_enum_idx_w_gap.exp2
-rw-r--r--gdb/testsuite/gdb.ada/array_bounds.exp12
-rw-r--r--gdb/testsuite/gdb.ada/array_bounds/bar.adb1
-rw-r--r--gdb/testsuite/gdb.ada/array_char_idx.exp8
-rw-r--r--gdb/testsuite/gdb.ada/array_long_idx.exp36
-rw-r--r--gdb/testsuite/gdb.ada/array_long_idx/main.adb31
-rw-r--r--gdb/testsuite/gdb.ada/array_long_idx/pck.adb21
-rw-r--r--gdb/testsuite/gdb.ada/array_long_idx/pck.ads19
-rw-r--r--gdb/testsuite/gdb.ada/array_of_symbolic_length.exp2
-rw-r--r--gdb/testsuite/gdb.ada/array_of_variable_length.exp2
-rw-r--r--gdb/testsuite/gdb.ada/array_of_variant.exp4
-rw-r--r--gdb/testsuite/gdb.ada/array_ptr_renaming.exp2
-rw-r--r--gdb/testsuite/gdb.ada/array_return.exp41
-rw-r--r--gdb/testsuite/gdb.ada/array_return/pck.ads1
-rw-r--r--gdb/testsuite/gdb.ada/array_subscript_addr.exp4
-rw-r--r--gdb/testsuite/gdb.ada/array_subscript_addr/p.adb1
-rw-r--r--gdb/testsuite/gdb.ada/arraydim.exp6
-rw-r--r--gdb/testsuite/gdb.ada/arraydim/pck.adb1
-rw-r--r--gdb/testsuite/gdb.ada/arraydim/pck.ads1
-rw-r--r--gdb/testsuite/gdb.ada/arrayidx.exp66
-rw-r--r--gdb/testsuite/gdb.ada/arrayparam.exp2
-rw-r--r--gdb/testsuite/gdb.ada/arrayparam/foo.adb1
-rw-r--r--gdb/testsuite/gdb.ada/arrayparam/pck.adb1
-rw-r--r--gdb/testsuite/gdb.ada/arrayparam/pck.ads1
-rw-r--r--gdb/testsuite/gdb.ada/arrayptr.exp2
-rw-r--r--gdb/testsuite/gdb.ada/assign_1.exp6
-rw-r--r--gdb/testsuite/gdb.ada/assign_arr.exp6
-rw-r--r--gdb/testsuite/gdb.ada/assoc.exp2
-rw-r--r--gdb/testsuite/gdb.ada/atomic_enum.exp13
-rw-r--r--gdb/testsuite/gdb.ada/attr_ref_and_charlit.exp4
-rw-r--r--gdb/testsuite/gdb.ada/ax-ada.exp2
-rw-r--r--gdb/testsuite/gdb.ada/bad-task-bp-keyword.exp14
-rw-r--r--gdb/testsuite/gdb.ada/bias.exp2
-rw-r--r--gdb/testsuite/gdb.ada/big_packed_array.exp26
-rw-r--r--gdb/testsuite/gdb.ada/boolean_expr.exp6
-rw-r--r--gdb/testsuite/gdb.ada/bp_c_mixed_case.exp26
-rw-r--r--gdb/testsuite/gdb.ada/bp_enum_homonym.exp11
-rw-r--r--gdb/testsuite/gdb.ada/bp_enum_homonym/p.adb1
-rw-r--r--gdb/testsuite/gdb.ada/bp_fun_addr.exp9
-rw-r--r--gdb/testsuite/gdb.ada/bp_inlined_func.exp12
-rw-r--r--gdb/testsuite/gdb.ada/bp_on_var.exp6
-rw-r--r--gdb/testsuite/gdb.ada/bp_on_var/pck.adb1
-rw-r--r--gdb/testsuite/gdb.ada/bp_on_var/pck.ads1
-rw-r--r--gdb/testsuite/gdb.ada/bp_range_type.exp8
-rw-r--r--gdb/testsuite/gdb.ada/bp_reset.exp6
-rw-r--r--gdb/testsuite/gdb.ada/break-label.exp2
-rw-r--r--gdb/testsuite/gdb.ada/byte_packed_arr.exp4
-rw-r--r--gdb/testsuite/gdb.ada/call-no-debug.exp2
-rw-r--r--gdb/testsuite/gdb.ada/call_pn.exp5
-rw-r--r--gdb/testsuite/gdb.ada/call_pn/foo.adb1
-rw-r--r--gdb/testsuite/gdb.ada/call_pn/pck.adb1
-rw-r--r--gdb/testsuite/gdb.ada/call_pn/pck.ads1
-rw-r--r--gdb/testsuite/gdb.ada/catch_assert_if.exp14
-rw-r--r--gdb/testsuite/gdb.ada/catch_assert_if/pck.ads1
-rw-r--r--gdb/testsuite/gdb.ada/catch_ex.exp48
-rw-r--r--gdb/testsuite/gdb.ada/catch_ex_std.exp6
-rw-r--r--gdb/testsuite/gdb.ada/char_enum.exp2
-rw-r--r--gdb/testsuite/gdb.ada/char_enum/pck.adb1
-rw-r--r--gdb/testsuite/gdb.ada/char_enum/pck.ads1
-rw-r--r--gdb/testsuite/gdb.ada/char_enum_overload.exp2
-rw-r--r--gdb/testsuite/gdb.ada/char_enum_unicode.exp2
-rw-r--r--gdb/testsuite/gdb.ada/char_param.exp24
-rw-r--r--gdb/testsuite/gdb.ada/char_param/foo.adb3
-rw-r--r--gdb/testsuite/gdb.ada/complete.exp56
-rw-r--r--gdb/testsuite/gdb.ada/complete/foo.adb1
-rw-r--r--gdb/testsuite/gdb.ada/cond_lang.exp10
-rw-r--r--gdb/testsuite/gdb.ada/cond_lang/foo.c1
-rw-r--r--gdb/testsuite/gdb.ada/convvar_comp.exp2
-rw-r--r--gdb/testsuite/gdb.ada/data-sections.exp2
-rw-r--r--gdb/testsuite/gdb.ada/delta-assign.exp2
-rw-r--r--gdb/testsuite/gdb.ada/dgopt.exp2
-rw-r--r--gdb/testsuite/gdb.ada/disc_arr_bound.exp6
-rw-r--r--gdb/testsuite/gdb.ada/discrete-char.exp2
-rw-r--r--gdb/testsuite/gdb.ada/display_nested.exp2
-rw-r--r--gdb/testsuite/gdb.ada/dot_all.exp2
-rw-r--r--gdb/testsuite/gdb.ada/dot_all/pck.adb2
-rw-r--r--gdb/testsuite/gdb.ada/dot_all/pck.ads2
-rw-r--r--gdb/testsuite/gdb.ada/dyn-bit-offset.exp79
-rw-r--r--gdb/testsuite/gdb.ada/dyn-bit-offset/exam.adb45
-rw-r--r--gdb/testsuite/gdb.ada/dyn-range.exp4
-rw-r--r--gdb/testsuite/gdb.ada/dyn_arrayidx.exp4
-rw-r--r--gdb/testsuite/gdb.ada/dyn_loc.exp15
-rw-r--r--gdb/testsuite/gdb.ada/dyn_stride.exp14
-rw-r--r--gdb/testsuite/gdb.ada/dynamic-iface.exp2
-rw-r--r--gdb/testsuite/gdb.ada/enum_idx_packed.exp2
-rw-r--r--gdb/testsuite/gdb.ada/enum_qual.exp2
-rw-r--r--gdb/testsuite/gdb.ada/enums_overload.exp2
-rw-r--r--gdb/testsuite/gdb.ada/excep_handle.exp24
-rw-r--r--gdb/testsuite/gdb.ada/exception-lto.exp2
-rw-r--r--gdb/testsuite/gdb.ada/exec_changed.exp16
-rw-r--r--gdb/testsuite/gdb.ada/expr_delims.exp24
-rw-r--r--gdb/testsuite/gdb.ada/expr_with_funcall.exp2
-rw-r--r--gdb/testsuite/gdb.ada/expr_with_funcall/expr_r821_013.adb1
-rw-r--r--gdb/testsuite/gdb.ada/exprs.exp2
-rw-r--r--gdb/testsuite/gdb.ada/extended-access.c38
-rw-r--r--gdb/testsuite/gdb.ada/extended-access.exp37
-rw-r--r--gdb/testsuite/gdb.ada/file-then-restart.exp8
-rw-r--r--gdb/testsuite/gdb.ada/fin_fun_out.exp6
-rw-r--r--gdb/testsuite/gdb.ada/finish-large.exp2
-rw-r--r--gdb/testsuite/gdb.ada/finish-var-size.exp14
-rw-r--r--gdb/testsuite/gdb.ada/fixed_cmp.exp10
-rw-r--r--gdb/testsuite/gdb.ada/fixed_points.exp6
-rw-r--r--gdb/testsuite/gdb.ada/fixed_points/fixed_points.adb7
-rw-r--r--gdb/testsuite/gdb.ada/fixed_points/pck.adb1
-rw-r--r--gdb/testsuite/gdb.ada/fixed_points/pck.ads1
-rw-r--r--gdb/testsuite/gdb.ada/fixed_points_function.exp8
-rw-r--r--gdb/testsuite/gdb.ada/float-bits.exp2
-rw-r--r--gdb/testsuite/gdb.ada/float_param.exp10
-rw-r--r--gdb/testsuite/gdb.ada/formatted_ref.exp22
-rw-r--r--gdb/testsuite/gdb.ada/frame_arg_lang.exp2
-rw-r--r--gdb/testsuite/gdb.ada/frame_args.exp12
-rw-r--r--gdb/testsuite/gdb.ada/frame_args/pck.adb1
-rw-r--r--gdb/testsuite/gdb.ada/frame_args/pck.ads1
-rw-r--r--gdb/testsuite/gdb.ada/fullname_bp.exp10
-rw-r--r--gdb/testsuite/gdb.ada/fullname_bp/pck.adb2
-rw-r--r--gdb/testsuite/gdb.ada/fullname_bp/pck.ads1
-rw-r--r--gdb/testsuite/gdb.ada/fun_addr.exp4
-rw-r--r--gdb/testsuite/gdb.ada/fun_in_declare.exp13
-rw-r--r--gdb/testsuite/gdb.ada/fun_overload_menu.exp20
-rw-r--r--gdb/testsuite/gdb.ada/fun_renaming.exp40
-rw-r--r--gdb/testsuite/gdb.ada/funcall_char.exp2
-rw-r--r--gdb/testsuite/gdb.ada/funcall_param.exp4
-rw-r--r--gdb/testsuite/gdb.ada/funcall_ptr.exp6
-rw-r--r--gdb/testsuite/gdb.ada/funcall_ref.exp4
-rw-r--r--gdb/testsuite/gdb.ada/ghost.exp2
-rw-r--r--gdb/testsuite/gdb.ada/homonym.exp46
-rw-r--r--gdb/testsuite/gdb.ada/huge.exp4
-rw-r--r--gdb/testsuite/gdb.ada/import.exp32
-rw-r--r--gdb/testsuite/gdb.ada/info_addr_mixed_case.exp2
-rw-r--r--gdb/testsuite/gdb.ada/info_addr_mixed_case/pck.adb1
-rw-r--r--gdb/testsuite/gdb.ada/info_addr_mixed_case/pck.ads1
-rw-r--r--gdb/testsuite/gdb.ada/info_auto_lang.exp5
-rw-r--r--gdb/testsuite/gdb.ada/info_exc.exp22
-rw-r--r--gdb/testsuite/gdb.ada/info_locals_renaming.exp3
-rw-r--r--gdb/testsuite/gdb.ada/info_types.c1
-rw-r--r--gdb/testsuite/gdb.ada/info_types.exp5
-rw-r--r--gdb/testsuite/gdb.ada/inline-section-gc.exp2
-rw-r--r--gdb/testsuite/gdb.ada/int_deref.exp9
-rw-r--r--gdb/testsuite/gdb.ada/interface.exp6
-rw-r--r--gdb/testsuite/gdb.ada/interface/foo.adb1
-rw-r--r--gdb/testsuite/gdb.ada/interface/types.adb1
-rw-r--r--gdb/testsuite/gdb.ada/interface/types.ads1
-rw-r--r--gdb/testsuite/gdb.ada/iterated-assign.exp2
-rw-r--r--gdb/testsuite/gdb.ada/iwide.exp12
-rw-r--r--gdb/testsuite/gdb.ada/lang_switch.exp10
-rw-r--r--gdb/testsuite/gdb.ada/lazy-string.exp2
-rw-r--r--gdb/testsuite/gdb.ada/length_cond.exp2
-rw-r--r--gdb/testsuite/gdb.ada/limited-length.exp4
-rw-r--r--gdb/testsuite/gdb.ada/limited-length/foo.adb1
-rw-r--r--gdb/testsuite/gdb.ada/local-enum.exp2
-rw-r--r--gdb/testsuite/gdb.ada/maint_with_ada.exp2
-rw-r--r--gdb/testsuite/gdb.ada/mi_catch_assert.exp18
-rw-r--r--gdb/testsuite/gdb.ada/mi_catch_assert/pck.ads1
-rw-r--r--gdb/testsuite/gdb.ada/mi_catch_ex.exp51
-rw-r--r--gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp26
-rw-r--r--gdb/testsuite/gdb.ada/mi_dyn_arr.exp6
-rw-r--r--gdb/testsuite/gdb.ada/mi_dyn_arr/foo.adb1
-rw-r--r--gdb/testsuite/gdb.ada/mi_ex_cond.exp8
-rw-r--r--gdb/testsuite/gdb.ada/mi_exc_info.exp7
-rw-r--r--gdb/testsuite/gdb.ada/mi_interface.exp6
-rw-r--r--gdb/testsuite/gdb.ada/mi_prot.exp6
-rw-r--r--gdb/testsuite/gdb.ada/mi_ref_changeable.exp6
-rw-r--r--gdb/testsuite/gdb.ada/mi_string_access.exp6
-rw-r--r--gdb/testsuite/gdb.ada/mi_task_arg.exp6
-rw-r--r--gdb/testsuite/gdb.ada/mi_task_info.exp7
-rw-r--r--gdb/testsuite/gdb.ada/mi_var_access.exp6
-rw-r--r--gdb/testsuite/gdb.ada/mi_var_array.exp6
-rw-r--r--gdb/testsuite/gdb.ada/mi_var_union.exp6
-rw-r--r--gdb/testsuite/gdb.ada/mi_variant.exp6
-rw-r--r--gdb/testsuite/gdb.ada/minsyms.exp10
-rw-r--r--gdb/testsuite/gdb.ada/mod_from_name.exp4
-rw-r--r--gdb/testsuite/gdb.ada/mod_from_name/foo.adb1
-rw-r--r--gdb/testsuite/gdb.ada/modular.exp36
-rw-r--r--gdb/testsuite/gdb.ada/modular/prog.adb32
-rw-r--r--gdb/testsuite/gdb.ada/multiarray.exp2
-rw-r--r--gdb/testsuite/gdb.ada/n_arr_bound.exp4
-rw-r--r--gdb/testsuite/gdb.ada/negative-bit-offset.exp36
-rw-r--r--gdb/testsuite/gdb.ada/negative-bit-offset/prog.adb36
-rw-r--r--gdb/testsuite/gdb.ada/nested.exp6
-rw-r--r--gdb/testsuite/gdb.ada/non-ascii-latin-1.exp2
-rw-r--r--gdb/testsuite/gdb.ada/non-ascii-latin-3.exp2
-rw-r--r--gdb/testsuite/gdb.ada/non-ascii-utf-8.exp2
-rw-r--r--gdb/testsuite/gdb.ada/notcplusplus.exp20
-rw-r--r--gdb/testsuite/gdb.ada/null_array.exp10
-rw-r--r--gdb/testsuite/gdb.ada/null_overload.exp2
-rw-r--r--gdb/testsuite/gdb.ada/null_record.exp6
-rw-r--r--gdb/testsuite/gdb.ada/null_record/null_record.adb1
-rw-r--r--gdb/testsuite/gdb.ada/operator_bp.exp16
-rw-r--r--gdb/testsuite/gdb.ada/operator_bp/ops.adb3
-rw-r--r--gdb/testsuite/gdb.ada/operator_bp/ops.ads2
-rw-r--r--gdb/testsuite/gdb.ada/operator_call.exp8
-rw-r--r--gdb/testsuite/gdb.ada/optim_drec.exp6
-rw-r--r--gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp2
-rw-r--r--gdb/testsuite/gdb.ada/overload_menu_crash.exp2
-rw-r--r--gdb/testsuite/gdb.ada/overloads.exp2
-rw-r--r--gdb/testsuite/gdb.ada/p-bounds.exp2
-rw-r--r--gdb/testsuite/gdb.ada/packed_array.exp2
-rw-r--r--gdb/testsuite/gdb.ada/packed_array_assign.exp2
-rw-r--r--gdb/testsuite/gdb.ada/packed_record.exp2
-rw-r--r--gdb/testsuite/gdb.ada/packed_record_2.exp61
-rw-r--r--gdb/testsuite/gdb.ada/packed_record_2/exam.adb51
-rw-r--r--gdb/testsuite/gdb.ada/packed_tagged.exp2
-rw-r--r--gdb/testsuite/gdb.ada/pckd_arr_ren.exp2
-rw-r--r--gdb/testsuite/gdb.ada/pckd_arr_ren/foo.adb1
-rw-r--r--gdb/testsuite/gdb.ada/pckd_neg.exp12
-rw-r--r--gdb/testsuite/gdb.ada/pkd_arr_elem.exp6
-rw-r--r--gdb/testsuite/gdb.ada/pkd_arr_elem/failure.adb1
-rw-r--r--gdb/testsuite/gdb.ada/pp-rec-component.exp6
-rw-r--r--gdb/testsuite/gdb.ada/print_chars.exp8
-rw-r--r--gdb/testsuite/gdb.ada/print_pc.exp4
-rw-r--r--gdb/testsuite/gdb.ada/ptr_typedef.exp4
-rw-r--r--gdb/testsuite/gdb.ada/ptype-o.exp2
-rw-r--r--gdb/testsuite/gdb.ada/ptype_arith_binop.exp6
-rw-r--r--gdb/testsuite/gdb.ada/ptype_array.exp2
-rw-r--r--gdb/testsuite/gdb.ada/ptype_array/pck.adb2
-rw-r--r--gdb/testsuite/gdb.ada/ptype_field.exp20
-rw-r--r--gdb/testsuite/gdb.ada/ptype_tagged_param.exp4
-rw-r--r--gdb/testsuite/gdb.ada/ptype_tagged_param/pck.adb1
-rw-r--r--gdb/testsuite/gdb.ada/ptype_tagged_param/pck.ads1
-rw-r--r--gdb/testsuite/gdb.ada/ptype_union.exp2
-rw-r--r--gdb/testsuite/gdb.ada/py_range.exp8
-rw-r--r--gdb/testsuite/gdb.ada/py_taft.exp2
-rw-r--r--gdb/testsuite/gdb.ada/rdv_wait.exp6
-rw-r--r--gdb/testsuite/gdb.ada/rec_comp.exp2
-rw-r--r--gdb/testsuite/gdb.ada/rec_comp/bar_o203_012.adb1
-rw-r--r--gdb/testsuite/gdb.ada/rec_ptype.exp2
-rw-r--r--gdb/testsuite/gdb.ada/rec_return.exp4
-rw-r--r--gdb/testsuite/gdb.ada/rec_return/foo.adb1
-rw-r--r--gdb/testsuite/gdb.ada/rec_return/pck.adb1
-rw-r--r--gdb/testsuite/gdb.ada/rec_return/pck.ads1
-rw-r--r--gdb/testsuite/gdb.ada/recursive-access.exp36
-rw-r--r--gdb/testsuite/gdb.ada/recursive-access/pack.ads26
-rw-r--r--gdb/testsuite/gdb.ada/recursive-access/prog.adb23
-rw-r--r--gdb/testsuite/gdb.ada/recursive-variant.exp2
-rw-r--r--gdb/testsuite/gdb.ada/ref_param.exp9
-rw-r--r--gdb/testsuite/gdb.ada/ref_tick_size.exp4
-rw-r--r--gdb/testsuite/gdb.ada/ref_tick_size/p.adb1
-rw-r--r--gdb/testsuite/gdb.ada/rename_subscript_param.exp18
-rw-r--r--gdb/testsuite/gdb.ada/repeat_dyn.exp4
-rw-r--r--gdb/testsuite/gdb.ada/return-small-char-array.exp50
-rw-r--r--gdb/testsuite/gdb.ada/return-small-char-array/proc.adb22
-rw-r--r--gdb/testsuite/gdb.ada/return-small-char-array/value.adb21
-rw-r--r--gdb/testsuite/gdb.ada/return-small-char-array/value.ads20
-rw-r--r--gdb/testsuite/gdb.ada/same_component_name.exp2
-rw-r--r--gdb/testsuite/gdb.ada/same_enum.exp2
-rw-r--r--gdb/testsuite/gdb.ada/same_enum/pck.adb1
-rw-r--r--gdb/testsuite/gdb.ada/same_enum/pck.ads1
-rw-r--r--gdb/testsuite/gdb.ada/scalar_storage.exp2
-rw-r--r--gdb/testsuite/gdb.ada/scalar_storage/storage.adb2
-rw-r--r--gdb/testsuite/gdb.ada/scoped_watch.exp24
-rw-r--r--gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp10
-rw-r--r--gdb/testsuite/gdb.ada/set_wstr.exp28
-rw-r--r--gdb/testsuite/gdb.ada/small_reg_param.exp3
-rw-r--r--gdb/testsuite/gdb.ada/start.exp8
-rw-r--r--gdb/testsuite/gdb.ada/static-link.exp4
-rw-r--r--gdb/testsuite/gdb.ada/str_binop_equal.exp8
-rw-r--r--gdb/testsuite/gdb.ada/str_binop_equal/pck.adb1
-rw-r--r--gdb/testsuite/gdb.ada/str_chars.exp2
-rw-r--r--gdb/testsuite/gdb.ada/str_ref_cmp.exp8
-rw-r--r--gdb/testsuite/gdb.ada/str_uninit.exp2
-rw-r--r--gdb/testsuite/gdb.ada/sub_variant.exp2
-rw-r--r--gdb/testsuite/gdb.ada/sym_print_name.exp11
-rw-r--r--gdb/testsuite/gdb.ada/taft_type.exp6
-rw-r--r--gdb/testsuite/gdb.ada/taft_type/p.adb1
-rw-r--r--gdb/testsuite/gdb.ada/tagged-lookup.exp2
-rw-r--r--gdb/testsuite/gdb.ada/tagged.exp18
-rw-r--r--gdb/testsuite/gdb.ada/tagged/pck.adb2
-rw-r--r--gdb/testsuite/gdb.ada/tagged/pck.ads2
-rw-r--r--gdb/testsuite/gdb.ada/tagged_access.exp2
-rw-r--r--gdb/testsuite/gdb.ada/tagged_not_init.exp3
-rw-r--r--gdb/testsuite/gdb.ada/task_bp.exp4
-rw-r--r--gdb/testsuite/gdb.ada/task_switch_in_core.exp28
-rw-r--r--gdb/testsuite/gdb.ada/task_watch.exp2
-rw-r--r--gdb/testsuite/gdb.ada/tasks.exp34
-rw-r--r--gdb/testsuite/gdb.ada/tick_last_segv.exp11
-rw-r--r--gdb/testsuite/gdb.ada/tick_length_array_enum_idx.exp2
-rw-r--r--gdb/testsuite/gdb.ada/tick_length_array_enum_idx/pck.adb2
-rw-r--r--gdb/testsuite/gdb.ada/tick_length_array_enum_idx/pck.ads1
-rw-r--r--gdb/testsuite/gdb.ada/type-tick-size.exp2
-rw-r--r--gdb/testsuite/gdb.ada/type_coercion.exp14
-rw-r--r--gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec.exp2
-rw-r--r--gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec/foo.adb1
-rw-r--r--gdb/testsuite/gdb.ada/unchecked_union.exp61
-rw-r--r--gdb/testsuite/gdb.ada/uninitialized-variable-record.exp6
-rw-r--r--gdb/testsuite/gdb.ada/uninitialized_vars.exp4
-rw-r--r--gdb/testsuite/gdb.ada/unsigned_last.exp2
-rw-r--r--gdb/testsuite/gdb.ada/unsigned_range.exp2
-rw-r--r--gdb/testsuite/gdb.ada/var_arr_attrs.exp2
-rw-r--r--gdb/testsuite/gdb.ada/var_arr_attrs/foo_o115_002.adb1
-rw-r--r--gdb/testsuite/gdb.ada/var_arr_typedef.exp8
-rw-r--r--gdb/testsuite/gdb.ada/var_arr_typedef/pack.adb2
-rw-r--r--gdb/testsuite/gdb.ada/var_arr_typedef/pack.ads4
-rw-r--r--gdb/testsuite/gdb.ada/var_arr_typedef/var_arr_typedef.adb2
-rw-r--r--gdb/testsuite/gdb.ada/var_rec_arr.exp2
-rw-r--r--gdb/testsuite/gdb.ada/variant-record.exp2
-rw-r--r--gdb/testsuite/gdb.ada/variant.exp2
-rw-r--r--gdb/testsuite/gdb.ada/variant_record_field.exp4
-rw-r--r--gdb/testsuite/gdb.ada/variant_record_packed_array.exp2
-rw-r--r--gdb/testsuite/gdb.ada/varsize_limit.exp2
-rw-r--r--gdb/testsuite/gdb.ada/verylong.exp10
-rw-r--r--gdb/testsuite/gdb.ada/vla.exp10
-rw-r--r--gdb/testsuite/gdb.ada/voidctx.exp2
-rw-r--r--gdb/testsuite/gdb.ada/watch_arg.exp16
-rw-r--r--gdb/testsuite/gdb.ada/watch_arg/watch.adb1
-rw-r--r--gdb/testsuite/gdb.ada/watch_minus_l.exp4
-rw-r--r--gdb/testsuite/gdb.ada/whatis_array_val.exp11
-rw-r--r--gdb/testsuite/gdb.ada/whatis_array_val/foo.adb1
-rw-r--r--gdb/testsuite/gdb.ada/widewide.exp2
-rw-r--r--gdb/testsuite/gdb.ada/win_fu_syms.exp11
320 files changed, 1702 insertions, 1025 deletions
diff --git a/gdb/testsuite/gdb.ada/O2_float_param.exp b/gdb/testsuite/gdb.ada/O2_float_param.exp
index f22dff4..2a2f1d0 100644
--- a/gdb/testsuite/gdb.ada/O2_float_param.exp
+++ b/gdb/testsuite/gdb.ada/O2_float_param.exp
@@ -21,7 +21,7 @@ standard_ada_testfile foo
set have_xfail 0
if {[is_aarch64_target]} {
- if { [gcc_major_version] <= 8 } {
+ if { [gnat_version_compare < 9] } {
set have_xfail 1
}
}
@@ -30,7 +30,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
lappend flags debug optimize=-O2
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
- return -1
+ return
}
clean_restart ${testfile}-${scenario}
diff --git a/gdb/testsuite/gdb.ada/O2_float_param/caller.adb b/gdb/testsuite/gdb.ada/O2_float_param/caller.adb
index 8736917..30d4baf 100644
--- a/gdb/testsuite/gdb.ada/O2_float_param/caller.adb
+++ b/gdb/testsuite/gdb.ada/O2_float_param/caller.adb
@@ -23,4 +23,3 @@ package body Caller is
Increment (Val, "Verbose_Increment");
end Verbose_Increment;
end Caller;
-
diff --git a/gdb/testsuite/gdb.ada/O2_float_param/caller.ads b/gdb/testsuite/gdb.ada/O2_float_param/caller.ads
index fe3ec2e..9ea162a 100644
--- a/gdb/testsuite/gdb.ada/O2_float_param/caller.ads
+++ b/gdb/testsuite/gdb.ada/O2_float_param/caller.ads
@@ -16,4 +16,3 @@
package Caller is
procedure Verbose_Increment (Val : in out Float; Msg : String);
end Caller;
-
diff --git a/gdb/testsuite/gdb.ada/access_tagged_param.exp b/gdb/testsuite/gdb.ada/access_tagged_param.exp
index 113ac33..f372225 100644
--- a/gdb/testsuite/gdb.ada/access_tagged_param.exp
+++ b/gdb/testsuite/gdb.ada/access_tagged_param.exp
@@ -23,7 +23,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -38,4 +38,4 @@ gdb_breakpoint "pck.adb:19"
# the value of all the parameters.
gdb_test "continue" \
- ".*Breakpoint $decimal, pck\\.inspect \\(obj=$hex, <objL>=\[1-9\]\\) at .*"
+ ".*Breakpoint $decimal, pck\\.inspect \\(obj=$hex, <objL>=\[1-9\]\\) at .*"
diff --git a/gdb/testsuite/gdb.ada/access_to_packed_array.exp b/gdb/testsuite/gdb.ada/access_to_packed_array.exp
index 420ea8c..bf75090 100644
--- a/gdb/testsuite/gdb.ada/access_to_packed_array.exp
+++ b/gdb/testsuite/gdb.ada/access_to_packed_array.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/access_to_unbounded_array.exp b/gdb/testsuite/gdb.ada/access_to_unbounded_array.exp
index 6959683..13e5a02 100644
--- a/gdb/testsuite/gdb.ada/access_to_unbounded_array.exp
+++ b/gdb/testsuite/gdb.ada/access_to_unbounded_array.exp
@@ -23,7 +23,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
lappend flags debug
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
- return -1
+ return
}
clean_restart ${testfile}-${scenario}
diff --git a/gdb/testsuite/gdb.ada/addr_arith.exp b/gdb/testsuite/gdb.ada/addr_arith.exp
index 049ecfb..cac98e0 100644
--- a/gdb/testsuite/gdb.ada/addr_arith.exp
+++ b/gdb/testsuite/gdb.ada/addr_arith.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo_na07_019
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -31,13 +31,13 @@ if {![runto "foo_na07_019.adb:$bp_location"]} {
}
gdb_test "print something'address + 0" \
- "\\(system\\.address\\) $hex <pck\\.something>"
+ "\\(system\\.address\\) $hex <pck\\.something>"
gdb_test "print 0 + something'address" \
- "\\(system\\.address\\) $hex <pck\\.something>"
+ "\\(system\\.address\\) $hex <pck\\.something>"
gdb_test "print something'address - 0" \
- "\\(system\\.address\\) $hex <pck\\.something>"
+ "\\(system\\.address\\) $hex <pck\\.something>"
gdb_test "print 0 - something'address" \
- "\\(system\\.address\\) $hex.*"
+ "\\(system\\.address\\) $hex.*"
diff --git a/gdb/testsuite/gdb.ada/aliased_array.exp b/gdb/testsuite/gdb.ada/aliased_array.exp
index fe195a2..3933cc5 100644
--- a/gdb/testsuite/gdb.ada/aliased_array.exp
+++ b/gdb/testsuite/gdb.ada/aliased_array.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
@@ -29,4 +29,3 @@ set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb]
runto "foo.adb:$bp_location"
gdb_test "print bt" " = \\(1, 2, 3\\)"
-
diff --git a/gdb/testsuite/gdb.ada/aliased_array/foo.adb b/gdb/testsuite/gdb.ada/aliased_array/foo.adb
index b859ddb..b10c0d7 100644
--- a/gdb/testsuite/gdb.ada/aliased_array/foo.adb
+++ b/gdb/testsuite/gdb.ada/aliased_array/foo.adb
@@ -19,4 +19,3 @@ procedure Foo is
begin
Do_Nothing (BT'Address); -- STOP
end Foo;
-
diff --git a/gdb/testsuite/gdb.ada/arr_acc_idx_w_gap.exp b/gdb/testsuite/gdb.ada/arr_acc_idx_w_gap.exp
index dbbe4a8..bb2b1f0 100644
--- a/gdb/testsuite/gdb.ada/arr_acc_idx_w_gap.exp
+++ b/gdb/testsuite/gdb.ada/arr_acc_idx_w_gap.exp
@@ -24,7 +24,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" \
executable $flags] != ""} {
- return -1
+ return
}
clean_restart ${testfile}-${scenario}
diff --git a/gdb/testsuite/gdb.ada/arr_arr.exp b/gdb/testsuite/gdb.ada/arr_arr.exp
index 1f252f0..a41d1d4 100644
--- a/gdb/testsuite/gdb.ada/arr_arr.exp
+++ b/gdb/testsuite/gdb.ada/arr_arr.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/arr_enum_idx_w_gap.exp b/gdb/testsuite/gdb.ada/arr_enum_idx_w_gap.exp
index 249c613..f90bcf4 100644
--- a/gdb/testsuite/gdb.ada/arr_enum_idx_w_gap.exp
+++ b/gdb/testsuite/gdb.ada/arr_enum_idx_w_gap.exp
@@ -23,7 +23,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
lappend flags debug
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
- return -1
+ return
}
clean_restart ${testfile}-${scenario}
diff --git a/gdb/testsuite/gdb.ada/array_bounds.exp b/gdb/testsuite/gdb.ada/array_bounds.exp
index 3675c9f..431e6d1 100644
--- a/gdb/testsuite/gdb.ada/array_bounds.exp
+++ b/gdb/testsuite/gdb.ada/array_bounds.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile bar
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -28,16 +28,16 @@ clean_restart ${testfile}
set bp_location [gdb_get_line_number "START" ${testdir}/bar.adb]
if {![runto "bar.adb:$bp_location"]} {
return
-}
+}
gdb_test "print itable'first" \
- "= 2"
+ "= 2"
gdb_test "print itable'last" \
- "= 5"
+ "= 5"
gdb_test "print table'first" \
- "= zero"
+ "= zero"
gdb_test "print table'last" \
- "= two"
+ "= two"
diff --git a/gdb/testsuite/gdb.ada/array_bounds/bar.adb b/gdb/testsuite/gdb.ada/array_bounds/bar.adb
index 0d2a81f..5ed73c4 100644
--- a/gdb/testsuite/gdb.ada/array_bounds/bar.adb
+++ b/gdb/testsuite/gdb.ada/array_bounds/bar.adb
@@ -24,4 +24,3 @@ begin
Table (Zero) := 5; -- START
ITable (3) := 10;
end Bar;
-
diff --git a/gdb/testsuite/gdb.ada/array_char_idx.exp b/gdb/testsuite/gdb.ada/array_char_idx.exp
index acc2bc4..166996f 100644
--- a/gdb/testsuite/gdb.ada/array_char_idx.exp
+++ b/gdb/testsuite/gdb.ada/array_char_idx.exp
@@ -20,18 +20,18 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
gdb_test "ptype char_table" \
- "= array \\(character\\) of natural"
+ "= array \\(character\\) of natural"
gdb_test "ptype global_char_table" \
- "= array \\(character\\) of natural"
+ "= array \\(character\\) of natural"
# Some more recent versions of gcc can statically initialize this
# array, so we allow either 0 or 4874.
gdb_test "print my_table" "= \\((0|4874) <repeats 256 times>\\)" \
- "Display my_table"
+ "Display my_table"
diff --git a/gdb/testsuite/gdb.ada/array_long_idx.exp b/gdb/testsuite/gdb.ada/array_long_idx.exp
new file mode 100644
index 0000000..13a4d3d
--- /dev/null
+++ b/gdb/testsuite/gdb.ada/array_long_idx.exp
@@ -0,0 +1,36 @@
+# Copyright 2025 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
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test that long array index types work.
+
+load_lib "ada.exp"
+
+require allow_ada_tests
+
+standard_ada_testfile main
+
+if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
+ return
+}
+
+clean_restart ${testfile}
+
+set bp_location [gdb_get_line_number STOP ${testdir}/main.adb]
+if {![runto "main.adb:$bp_location"]} {
+ return
+}
+
+gdb_test "print some_regular_access.all" \
+ [string_to_regexp " = (-2147483648 => (-9223372036854775808 => 1, 2, 3), (-9223372036854775808 => 4, 5, 6))"]
diff --git a/gdb/testsuite/gdb.ada/array_long_idx/main.adb b/gdb/testsuite/gdb.ada/array_long_idx/main.adb
new file mode 100644
index 0000000..6c4971f
--- /dev/null
+++ b/gdb/testsuite/gdb.ada/array_long_idx/main.adb
@@ -0,0 +1,31 @@
+-- Copyright 2025 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
+-- the Free Software Foundation; either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+with Pck; use Pck;
+
+procedure Main is
+
+ type Shorter_Integer is range -2147483648 .. 2147483647;
+ type Longer_Integer is range -9223372036854775808 .. 9223372036854775807;
+ type My_Array is array (Shorter_Integer range <>,
+ Longer_Integer range <>) of Integer;
+
+ type My_Reg_Acc is access all My_Array;
+
+ Some_Regular_Access : My_Reg_Acc := new My_Array'((1, 2, 3), (4, 5, 6));
+
+begin
+ Do_Nothing (Some_Regular_Access'Address); -- STOP
+end Main;
diff --git a/gdb/testsuite/gdb.ada/array_long_idx/pck.adb b/gdb/testsuite/gdb.ada/array_long_idx/pck.adb
new file mode 100644
index 0000000..54ddf5c
--- /dev/null
+++ b/gdb/testsuite/gdb.ada/array_long_idx/pck.adb
@@ -0,0 +1,21 @@
+-- Copyright 2012-2025 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
+-- the Free Software Foundation; either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+package body Pck is
+ procedure Do_Nothing (A : System.Address) is
+ begin
+ null;
+ end Do_Nothing;
+end Pck;
diff --git a/gdb/testsuite/gdb.ada/array_long_idx/pck.ads b/gdb/testsuite/gdb.ada/array_long_idx/pck.ads
new file mode 100644
index 0000000..db7c0a8
--- /dev/null
+++ b/gdb/testsuite/gdb.ada/array_long_idx/pck.ads
@@ -0,0 +1,19 @@
+-- Copyright 2012-2025 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
+-- the Free Software Foundation; either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+with System;
+package Pck is
+ procedure Do_Nothing (A : System.Address);
+end Pck;
diff --git a/gdb/testsuite/gdb.ada/array_of_symbolic_length.exp b/gdb/testsuite/gdb.ada/array_of_symbolic_length.exp
index 51dd5bb..8e6c32e 100644
--- a/gdb/testsuite/gdb.ada/array_of_symbolic_length.exp
+++ b/gdb/testsuite/gdb.ada/array_of_symbolic_length.exp
@@ -23,7 +23,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
lappend flags debug
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
- return -1
+ return
}
clean_restart ${testfile}-${scenario}
diff --git a/gdb/testsuite/gdb.ada/array_of_variable_length.exp b/gdb/testsuite/gdb.ada/array_of_variable_length.exp
index fa05bd8..62cbefe 100644
--- a/gdb/testsuite/gdb.ada/array_of_variable_length.exp
+++ b/gdb/testsuite/gdb.ada/array_of_variable_length.exp
@@ -23,7 +23,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
lappend flags debug
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
- return -1
+ return
}
clean_restart ${testfile}-${scenario}
diff --git a/gdb/testsuite/gdb.ada/array_of_variant.exp b/gdb/testsuite/gdb.ada/array_of_variant.exp
index 7b35bb0..5b95647 100644
--- a/gdb/testsuite/gdb.ada/array_of_variant.exp
+++ b/gdb/testsuite/gdb.ada/array_of_variant.exp
@@ -24,7 +24,7 @@ set old_gcc [gnat_version_compare < 8]
proc gdb_test_with_xfail { cmd re re_xfail msg } {
global scenario old_gcc
- set have_xfail [expr $old_gcc && [string equal "$scenario" "minimal"]]
+ set have_xfail [expr {$old_gcc && [string equal "$scenario" "minimal"]}]
gdb_test_multiple $cmd $msg {
-re -wrap $re {
@@ -44,7 +44,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
lappend flags debug
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
- return -1
+ return
}
clean_restart ${testfile}-${scenario}
diff --git a/gdb/testsuite/gdb.ada/array_ptr_renaming.exp b/gdb/testsuite/gdb.ada/array_ptr_renaming.exp
index b33adf4..42935d2 100644
--- a/gdb/testsuite/gdb.ada/array_ptr_renaming.exp
+++ b/gdb/testsuite/gdb.ada/array_ptr_renaming.exp
@@ -23,7 +23,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
lappend flags debug
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
- return -1
+ return
}
clean_restart ${testfile}-${scenario}
diff --git a/gdb/testsuite/gdb.ada/array_return.exp b/gdb/testsuite/gdb.ada/array_return.exp
index 903edf5..3973f9c 100644
--- a/gdb/testsuite/gdb.ada/array_return.exp
+++ b/gdb/testsuite/gdb.ada/array_return.exp
@@ -26,7 +26,7 @@ if { [ada_fvar_tracking] } {
}
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $opts] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
@@ -34,41 +34,41 @@ clean_restart ${testfile}
# Start the inferior
if {![runto_main]} {
- return 0
+ return
}
# Create a breakpoint in each function from which we want to test
# the "finish" command.
gdb_test "break create_small" \
- "Breakpoint \[0-9\]+ at.*: file .*pck.adb, line \[0-9\]+." \
- "insert breakpoint in create_small"
+ "Breakpoint \[0-9\]+ at.*: file .*pck.adb, line \[0-9\]+." \
+ "insert breakpoint in create_small"
gdb_test "break create_large" \
- "Breakpoint \[0-9\]+ at.*: file .*pck.adb, line \[0-9\]+." \
- "insert breakpoint in create_large"
+ "Breakpoint \[0-9\]+ at.*: file .*pck.adb, line \[0-9\]+." \
+ "insert breakpoint in create_large"
gdb_test "break create_small_float_vector" \
- "Breakpoint \[0-9\]+ at.*: file .*pck.adb, line \[0-9\]+." \
- "insert breakpoint in create_small_float_vector"
+ "Breakpoint \[0-9\]+ at.*: file .*pck.adb, line \[0-9\]+." \
+ "insert breakpoint in create_small_float_vector"
# Then continue until reaching the first breakpoint inside Create_Small,
# and then do a "finish".
gdb_test "cont" \
- "Breakpoint \[0-9\]+, pck.create_small \\(\\).*" \
- "continuing to Create_Small"
+ "Breakpoint \[0-9\]+, pck.create_small \\(\\).*" \
+ "continuing to Create_Small"
gdb_test "finish" \
- "Value returned is \\\$\[0-9\]+ = \\(1, 1\\)" \
- "value printed by finish of Create_Small"
+ "Value returned is \\\$\[0-9\]+ = \\(1, 1\\)" \
+ "value printed by finish of Create_Small"
# Now continue until reaching the second breakpoint inside Create_Large,
# and then do another "finish".
gdb_test "cont" \
- "Breakpoint \[0-9\]+, pck.create_large \\(\\).*" \
- "continuing to Create_Large"
+ "Breakpoint \[0-9\]+, pck.create_large \\(\\).*" \
+ "continuing to Create_Large"
# On hppa32, the value returned is too large to be returned via a register.
# Instead, it is returned using the struct convention, and the debugger
@@ -79,17 +79,16 @@ if {![istarget "hppa*64*-*-*"]} {
}
gdb_test "finish" \
- "Value returned is \\\$\[0-9\]+ = \\(2, 2, 2, 2\\)" \
- "value printed by finish of Create_Large"
+ "Value returned is \\\$\[0-9\]+ = \\(2, 2, 2, 2\\)" \
+ "value printed by finish of Create_Large"
# Now continue until reaching the third breakpoint, and then do another
# "finish" again.
gdb_test "cont" \
- "Breakpoint \[0-9\]+, pck.create_small_float_vector \\(\\).*" \
- "continuing to Create_Small_Float_Vector"
+ "Breakpoint \[0-9\]+, pck.create_small_float_vector \\(\\).*" \
+ "continuing to Create_Small_Float_Vector"
gdb_test "finish" \
- "Value returned is \\\$\[0-9\]+ = \\(4.25, 4.25\\)" \
- "value printed by finish of Create_Small_Float_Vector"
-
+ "Value returned is \\\$\[0-9\]+ = \\(4.25, 4.25\\)" \
+ "value printed by finish of Create_Small_Float_Vector"
diff --git a/gdb/testsuite/gdb.ada/array_return/pck.ads b/gdb/testsuite/gdb.ada/array_return/pck.ads
index 45284aa..2e3e035 100644
--- a/gdb/testsuite/gdb.ada/array_return/pck.ads
+++ b/gdb/testsuite/gdb.ada/array_return/pck.ads
@@ -25,4 +25,3 @@ package Pck is
function Create_Small_Float_Vector return Small_Float_Vector;
end Pck;
-
diff --git a/gdb/testsuite/gdb.ada/array_subscript_addr.exp b/gdb/testsuite/gdb.ada/array_subscript_addr.exp
index 07b97a4..a07992c 100644
--- a/gdb/testsuite/gdb.ada/array_subscript_addr.exp
+++ b/gdb/testsuite/gdb.ada/array_subscript_addr.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile p
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -31,4 +31,4 @@ runto "p.adb:$bp_location"
# Verify that we can compare a string slice with another string.
gdb_test "print a(2)'Address" \
- "= \\(system\\.address\\) 0x\[0-9a-fA-F\]+"
+ "= \\(system\\.address\\) 0x\[0-9a-fA-F\]+"
diff --git a/gdb/testsuite/gdb.ada/array_subscript_addr/p.adb b/gdb/testsuite/gdb.ada/array_subscript_addr/p.adb
index 057d7a0..838dddd 100644
--- a/gdb/testsuite/gdb.ada/array_subscript_addr/p.adb
+++ b/gdb/testsuite/gdb.ada/array_subscript_addr/p.adb
@@ -27,4 +27,3 @@ procedure P is
begin
C := A (1) + A (2); -- STOP
end P;
-
diff --git a/gdb/testsuite/gdb.ada/arraydim.exp b/gdb/testsuite/gdb.ada/arraydim.exp
index 037ed8a..e8f0b40 100644
--- a/gdb/testsuite/gdb.ada/arraydim.exp
+++ b/gdb/testsuite/gdb.ada/arraydim.exp
@@ -25,7 +25,7 @@ set cobject [standard_output_file ${cfile}.o]
gdb_compile "${csrcfile}" "${cobject}" object [list debug]
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-largs additional_flags=${cobject} additional_flags=-margs]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -34,7 +34,7 @@ set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb]
runto "foo.adb:$bp_location"
gdb_test "ptype m" \
- "array \\(1 \\.\\. 1, 2 \\.\\. 3, 4 \\.\\. 6\\) of integer"
+ "array \\(1 \\.\\. 1, 2 \\.\\. 3, 4 \\.\\. 6\\) of integer"
gdb_test "print m'first" " = 1"
gdb_test "print m'last" " = 1"
@@ -53,7 +53,7 @@ gdb_test "print m'last(3)" " = 6"
gdb_test "print m'length(3)" " = 3"
gdb_test "ptype global_3dim_for_gdb_testing" \
- "array \\(0 \\.\\. 0, 0 \\.\\. 1, 0 \\.\\. 2\\) of int"
+ "array \\(0 \\.\\. 0, 0 \\.\\. 1, 0 \\.\\. 2\\) of int"
gdb_test "print global_3dim_for_gdb_testing'first" " = 0"
gdb_test "print global_3dim_for_gdb_testing'last" " = 0"
diff --git a/gdb/testsuite/gdb.ada/arraydim/pck.adb b/gdb/testsuite/gdb.ada/arraydim/pck.adb
index d05dba8..04e2b8b 100644
--- a/gdb/testsuite/gdb.ada/arraydim/pck.adb
+++ b/gdb/testsuite/gdb.ada/arraydim/pck.adb
@@ -19,4 +19,3 @@ package body Pck is
null;
end Do_Nothing;
end Pck;
-
diff --git a/gdb/testsuite/gdb.ada/arraydim/pck.ads b/gdb/testsuite/gdb.ada/arraydim/pck.ads
index cfa98d4..16a570c 100644
--- a/gdb/testsuite/gdb.ada/arraydim/pck.ads
+++ b/gdb/testsuite/gdb.ada/arraydim/pck.ads
@@ -17,4 +17,3 @@ with System;
package Pck is
procedure Do_Nothing (A : System.Address);
end Pck;
-
diff --git a/gdb/testsuite/gdb.ada/arrayidx.exp b/gdb/testsuite/gdb.ada/arrayidx.exp
index 9481d28..7462027 100644
--- a/gdb/testsuite/gdb.ada/arrayidx.exp
+++ b/gdb/testsuite/gdb.ada/arrayidx.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile p
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
set old_gcc [gnat_version_compare <= {4 6}]
@@ -34,86 +34,86 @@ runto "p.adb:$bp_location"
gdb_test_no_output "set print array-indexes off"
-if $old_gcc {
+if {$old_gcc} {
setup_xfail "*-*-*"
}
gdb_test "print one_two_three" \
- "= \\(1, 2, 3\\)" \
- "print one_two_three, indexes off"
+ "= \\(1, 2, 3\\)" \
+ "print one_two_three, indexes off"
gdb_test "print e_one_two_three" \
- "= \\(1, 2, 3\\)" \
- "print e_one_two_three, indexes off"
+ "= \\(1, 2, 3\\)" \
+ "print e_one_two_three, indexes off"
gdb_test "print r_two_three" \
- "= \\(two => 2, 3\\)" \
- "print r_two_three, indexes off"
+ "= \\(two => 2, 3\\)" \
+ "print r_two_three, indexes off"
gdb_test "print u_one_two_three" \
- "= \\(1, 2, 3\\)" \
- "print u_one_two_three, indexes off"
+ "= \\(1, 2, 3\\)" \
+ "print u_one_two_three, indexes off"
gdb_test "print p_one_two_three" \
- "= \\(false, true, true\\)" \
- "print p_one_two_three, indexes off"
+ "= \\(false, true, true\\)" \
+ "print p_one_two_three, indexes off"
-if $old_gcc {
+if {$old_gcc} {
setup_xfail "*-*-*"
}
gdb_test "print few_reps" \
- "= \\(1, 2, 3, 3, 3, 3, 3, 4, 5\\)" \
- "print few_reps, indexes off"
+ "= \\(1, 2, 3, 3, 3, 3, 3, 4, 5\\)" \
+ "print few_reps, indexes off"
-if $old_gcc {
+if {$old_gcc} {
setup_xfail "*-*-*"
}
gdb_test "print many_reps" \
- "= \\(1, 2, 3 <repeats 12 times>, 4, 5\\)" \
- "print many_reps, indexes off"
+ "= \\(1, 2, 3 <repeats 12 times>, 4, 5\\)" \
+ "print many_reps, indexes off"
-if $old_gcc {
+if {$old_gcc} {
setup_xfail "*-*-*"
}
gdb_test "print empty" \
- "= \\(\\)" \
- "print empty, indexes off"
+ "= \\(\\)" \
+ "print empty, indexes off"
# Next, print all the arrays with the indexes
gdb_test_no_output "set print array-indexes on"
-if $old_gcc {
+if {$old_gcc} {
setup_xfail "*-*-*"
}
gdb_test "print one_two_three" \
- "= \\(1 => 1, 2 => 2, 3 => 3\\)"
+ "= \\(1 => 1, 2 => 2, 3 => 3\\)"
gdb_test "print e_one_two_three" \
- "= \\(one => 1, two => 2, three => 3\\)"
+ "= \\(one => 1, two => 2, three => 3\\)"
gdb_test "print r_two_three" \
- "= \\(two => 2, three => 3\\)"
+ "= \\(two => 2, three => 3\\)"
gdb_test "print u_one_two_three" \
- "= \\(1 => 1, 2 => 2, 3 => 3\\)"
+ "= \\(1 => 1, 2 => 2, 3 => 3\\)"
gdb_test "print p_one_two_three" \
- "= \\(one => false, two => true, three => true\\)"
+ "= \\(one => false, two => true, three => true\\)"
-if $old_gcc {
+if {$old_gcc} {
setup_xfail "*-*-*"
}
gdb_test "print few_reps" \
- "= \\(1 => 1, 2 => 2, 3 => 3, 4 => 3, 5 => 3, 6 => 3, 7 => 3, 8 => 4, 9 => 5\\)"
+ "= \\(1 => 1, 2 => 2, 3 => 3, 4 => 3, 5 => 3, 6 => 3, 7 => 3, 8 => 4, 9 => 5\\)"
-if $old_gcc {
+if {$old_gcc} {
setup_xfail "*-*-*"
}
gdb_test "print many_reps" \
- "= \\(1 => 1, 2 => 2, 3 => 3 <repeats 12 times>, 15 => 4, 16 => 5\\)"
+ "= \\(1 => 1, 2 => 2, 3 => 3 <repeats 12 times>, 15 => 4, 16 => 5\\)"
-if $old_gcc {
+if {$old_gcc} {
setup_xfail "*-*-*"
}
gdb_test "print empty" \
- "= \\(\\)"
+ "= \\(\\)"
diff --git a/gdb/testsuite/gdb.ada/arrayparam.exp b/gdb/testsuite/gdb.ada/arrayparam.exp
index f15e4c0..3e2d3b6 100644
--- a/gdb/testsuite/gdb.ada/arrayparam.exp
+++ b/gdb/testsuite/gdb.ada/arrayparam.exp
@@ -26,7 +26,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
lappend flags debug
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
- return -1
+ return
}
clean_restart ${testfile}-${scenario}
diff --git a/gdb/testsuite/gdb.ada/arrayparam/foo.adb b/gdb/testsuite/gdb.ada/arrayparam/foo.adb
index bdd2499..7d004d4 100644
--- a/gdb/testsuite/gdb.ada/arrayparam/foo.adb
+++ b/gdb/testsuite/gdb.ada/arrayparam/foo.adb
@@ -23,4 +23,3 @@ begin
Length := -1;
Call_Me (My_String); -- STOP
end Foo;
-
diff --git a/gdb/testsuite/gdb.ada/arrayparam/pck.adb b/gdb/testsuite/gdb.ada/arrayparam/pck.adb
index 794ac34..aae3a63 100644
--- a/gdb/testsuite/gdb.ada/arrayparam/pck.adb
+++ b/gdb/testsuite/gdb.ada/arrayparam/pck.adb
@@ -25,4 +25,3 @@ package body Pck is
end Call_Me;
end Pck;
-
diff --git a/gdb/testsuite/gdb.ada/arrayparam/pck.ads b/gdb/testsuite/gdb.ada/arrayparam/pck.ads
index af5c839..0fb6421 100644
--- a/gdb/testsuite/gdb.ada/arrayparam/pck.ads
+++ b/gdb/testsuite/gdb.ada/arrayparam/pck.ads
@@ -22,4 +22,3 @@ package Pck is
procedure Call_Me (Str : String);
end Pck;
-
diff --git a/gdb/testsuite/gdb.ada/arrayptr.exp b/gdb/testsuite/gdb.ada/arrayptr.exp
index 211d486..eecc9ae 100644
--- a/gdb/testsuite/gdb.ada/arrayptr.exp
+++ b/gdb/testsuite/gdb.ada/arrayptr.exp
@@ -23,7 +23,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
lappend flags debug
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
- return -1
+ return
}
clean_restart ${testfile}-${scenario}
diff --git a/gdb/testsuite/gdb.ada/assign_1.exp b/gdb/testsuite/gdb.ada/assign_1.exp
index 622fa96..2339beb 100644
--- a/gdb/testsuite/gdb.ada/assign_1.exp
+++ b/gdb/testsuite/gdb.ada/assign_1.exp
@@ -22,11 +22,11 @@ clean_restart
# Force the language to Ada, as this will not happen automatically
# in this case (no test program).
gdb_test_no_output "set lang ada" \
- "changing the language to ada"
+ "changing the language to ada"
gdb_test "print \$xxx := 1" \
- "= 1" \
- "set convenience variable \$xxx to 1"
+ "= 1" \
+ "set convenience variable \$xxx to 1"
gdb_test "print \$xxx := @ + 23 + @" \
diff --git a/gdb/testsuite/gdb.ada/assign_arr.exp b/gdb/testsuite/gdb.ada/assign_arr.exp
index 4954188..87ec190 100644
--- a/gdb/testsuite/gdb.ada/assign_arr.exp
+++ b/gdb/testsuite/gdb.ada/assign_arr.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile main_p324_051
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -29,10 +29,10 @@ set bp_location [gdb_get_line_number "STOP" ${testdir}/main_p324_051.adb]
runto "main_p324_051.adb:$bp_location"
gdb_test "print assign_arr_input.u2 :=(0.25,0.5,0.75)" \
- " = \\(0\\.25, 0\\.5, 0\\.75\\)"
+ " = \\(0\\.25, 0\\.5, 0\\.75\\)"
gdb_test "print assign_arr_input.u2 :=(0.25, others => 0.125)" \
- " = \\(0\\.25, 0\\.125, 0\\.125\\)"
+ " = \\(0\\.25, 0\\.125, 0\\.125\\)"
set line [gdb_get_line_number "STOP2" ${testdir}/target_wrapper.adb]
gdb_breakpoint target_wrapper.adb:$line
diff --git a/gdb/testsuite/gdb.ada/assoc.exp b/gdb/testsuite/gdb.ada/assoc.exp
index f7dba3d..b2a464e 100644
--- a/gdb/testsuite/gdb.ada/assoc.exp
+++ b/gdb/testsuite/gdb.ada/assoc.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile main
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable debug] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/atomic_enum.exp b/gdb/testsuite/gdb.ada/atomic_enum.exp
index f7d764d..22b0f87 100644
--- a/gdb/testsuite/gdb.ada/atomic_enum.exp
+++ b/gdb/testsuite/gdb.ada/atomic_enum.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnat05 ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -28,11 +28,10 @@ clean_restart ${testfile}
set test "ptype pck.data_flag"
gdb_test_multiple "$test" $test {
-re "type = \\(one, two, three\\).*$gdb_prompt $" {
- pass $test
- }
+ pass $test
+ }
-re "type = \\(\\).*$gdb_prompt $" {
- # This is a known compiler problem with Stabs.
- xfail $test
- }
+ # This is a known compiler problem with Stabs.
+ xfail $test
+ }
}
-
diff --git a/gdb/testsuite/gdb.ada/attr_ref_and_charlit.exp b/gdb/testsuite/gdb.ada/attr_ref_and_charlit.exp
index 3d0459a..4ea55fc 100644
--- a/gdb/testsuite/gdb.ada/attr_ref_and_charlit.exp
+++ b/gdb/testsuite/gdb.ada/attr_ref_and_charlit.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile "foo"
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -39,7 +39,7 @@ with_test_prefix "run" {
}
gdb_test "continue" \
- ".*Breakpoint \[0-9\]+, foo\\.p \\(s=.*\\) at .*foo.adb:\[0-9\]+.*"
+ ".*Breakpoint \[0-9\]+, foo\\.p \\(s=.*\\) at .*foo.adb:\[0-9\]+.*"
with_test_prefix "cont" {
gdb_test "print s'first" " = 4"
diff --git a/gdb/testsuite/gdb.ada/ax-ada.exp b/gdb/testsuite/gdb.ada/ax-ada.exp
index a824815..ee04168 100644
--- a/gdb/testsuite/gdb.ada/ax-ada.exp
+++ b/gdb/testsuite/gdb.ada/ax-ada.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile prog
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/bad-task-bp-keyword.exp b/gdb/testsuite/gdb.ada/bad-task-bp-keyword.exp
index c452b15..96fa335 100644
--- a/gdb/testsuite/gdb.ada/bad-task-bp-keyword.exp
+++ b/gdb/testsuite/gdb.ada/bad-task-bp-keyword.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -34,17 +34,17 @@ runto "foo.adb:$bp_location"
# report an error. Try various weird combinations too.
gdb_test "break *break_me'address TASK 2" \
- "Garbage 'TASK 2' at end of command"
+ "Garbage 'TASK 2' at end of command"
set test "break *break_me'address TASK Task TaSK 2"
gdb_test_multiple "$test" $test {
-re "Garbage 'TASK Task TaSK 2' at end of command\[\r\n\]+$gdb_prompt $" {
- pass $test
- }
+ pass $test
+ }
-re "Garbage 'TaSK 2' at end of command\[\r\n\]+$gdb_prompt $" {
- kfail gdb/14111 "$test"
- }
+ kfail gdb/14111 "$test"
+ }
}
gdb_test "break *break_me'address TASK if" \
- "Garbage 'TASK if' at end of command"
+ "Garbage 'TASK if' at end of command"
diff --git a/gdb/testsuite/gdb.ada/bias.exp b/gdb/testsuite/gdb.ada/bias.exp
index 4f83037..c9b875f 100644
--- a/gdb/testsuite/gdb.ada/bias.exp
+++ b/gdb/testsuite/gdb.ada/bias.exp
@@ -25,7 +25,7 @@ if {[ada_minimal_encodings]} {
}
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/big_packed_array.exp b/gdb/testsuite/gdb.ada/big_packed_array.exp
index b1566af..fbc20d5 100644
--- a/gdb/testsuite/gdb.ada/big_packed_array.exp
+++ b/gdb/testsuite/gdb.ada/big_packed_array.exp
@@ -27,7 +27,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
lappend flags debug
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
- return -1
+ return
}
clean_restart ${testfile}-${scenario}
@@ -38,21 +38,21 @@ foreach_gnat_encoding scenario flags {all minimal} {
gdb_test "print good" \
"= \\(false <repeats 196 times>\\)" \
- set have_xfail [expr $old_gcc && [string equal "$scenario" "minimal"]]
+ set have_xfail [expr {$old_gcc && [string equal "$scenario" "minimal"]}]
set re "= \\(false <repeats 196 times>\\)"
set re_xfail "= \\(0 => 0 <repeats 25 times>\\)"
set re_xfail2 "= \\(0 => 0 <repeats 24 times>, ($decimal)\\)"
gdb_test_multiple "print bad" "" {
-re -wrap $re {
- pass $gdb_test_name
+ pass $gdb_test_name
}
-re -wrap $re_xfail {
- if { $have_xfail } {
- # gcc/101643
- setup_xfail *-*-*
- }
- fail $gdb_test_name
+ if { $have_xfail } {
+ # gcc/101643
+ setup_xfail *-*-*
+ }
+ fail $gdb_test_name
}
-re -wrap $re_xfail2 {
set last $expect_out(1,string)
@@ -61,12 +61,12 @@ foreach_gnat_encoding scenario flags {all minimal} {
} else {
set mask 0xf0
}
- if { $have_xfail && [string is integer $last] \
+ if { $have_xfail && [string is integer $last] \
&& [expr ($last & $mask) == 0] } {
- # gcc/101643
- setup_xfail *-*-*
- }
- fail $gdb_test_name
+ # gcc/101643
+ setup_xfail *-*-*
+ }
+ fail $gdb_test_name
}
}
}
diff --git a/gdb/testsuite/gdb.ada/boolean_expr.exp b/gdb/testsuite/gdb.ada/boolean_expr.exp
index de6cc4c..9d52db7 100644
--- a/gdb/testsuite/gdb.ada/boolean_expr.exp
+++ b/gdb/testsuite/gdb.ada/boolean_expr.exp
@@ -25,10 +25,10 @@ set any_addr "0x\[0-9a-zA-Z\]+"
# Force the language to Ada, as this will not happen automatically
# in this case (no test program).
gdb_test_no_output "set lang ada" \
- "changing the language to ada"
+ "changing the language to ada"
gdb_test "print 1 = 2" \
- "= false"
+ "= false"
gdb_test "print 3 = 3" \
- "= true"
+ "= true"
diff --git a/gdb/testsuite/gdb.ada/bp_c_mixed_case.exp b/gdb/testsuite/gdb.ada/bp_c_mixed_case.exp
index 4231287..288ed29 100644
--- a/gdb/testsuite/gdb.ada/bp_c_mixed_case.exp
+++ b/gdb/testsuite/gdb.ada/bp_c_mixed_case.exp
@@ -41,7 +41,7 @@ set options [list debug \
additional_flags=${cobject2} \
additional_flags=-margs]
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $options] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -52,43 +52,43 @@ if {![runto "foo_h731_021"]} {
# Verify that the current language is Ada.
gdb_test "show lang" \
- "\"auto; currently ada\"\\."
+ "\"auto; currently ada\"\\."
# Before running to the C function (and thus switching out of Ada
# mode), try printing the function using the "<...>" notation.
gdb_test "p <MixedCaseFunc>" \
- " = void" \
- "p <MixedCaseFunc>, in Ada"
+ " = void" \
+ "p <MixedCaseFunc>, in Ada"
gdb_test "p <NoDebugMixedCaseFunc>" \
- " = {<text variable, no debug info>} $hex <NoDebugMixedCaseFunc>" \
- "p <NoDebugMixedCaseFunc>, in Ada"
+ " = {<text variable, no debug info>} $hex <NoDebugMixedCaseFunc>" \
+ "p <NoDebugMixedCaseFunc>, in Ada"
# Try inserting a breakpoint inside a C function. Because the function's
# name has some uppercase letters, we need to use the "<...>" notation.
# The purpose of this testcase is to verify that we can in fact do so
# and that it inserts the breakpoint at the expected location.
gdb_test "break <MixedCaseFunc>" \
- "Breakpoint $decimal at $hex: file .*bar.c, line $decimal\\."
+ "Breakpoint $decimal at $hex: file .*bar.c, line $decimal\\."
# Same, but this time on the function with no debug info.
gdb_test "break <NoDebugMixedCaseFunc>" \
- "Breakpoint $decimal at $hex"
+ "Breakpoint $decimal at $hex"
# Resume the program's execution, verifying that it lands at the expected
# location.
gdb_test "continue" \
- "Breakpoint $decimal, MixedCaseFunc \\(\\) at .*bar\\.c:$decimal.*"
+ "Breakpoint $decimal, MixedCaseFunc \\(\\) at .*bar\\.c:$decimal.*"
# Try printing again using the "<...>" notation. This shouldn't work
# now, since the current frame is a C function.
gdb_test "p <MixedCaseFunc>" \
- "A syntax error in expression, near `<MixedCaseFunc>'\\." \
- "p <MixedCaseFunc>, in C"
+ "A syntax error in expression, near `<MixedCaseFunc>'\\." \
+ "p <MixedCaseFunc>, in C"
gdb_test "p <NoDebugMixedCaseFunc>" \
- "A syntax error in expression, near `<NoDebugMixedCaseFunc>'\\." \
- "p <NoDebugMixedCaseFunc>, in C"
+ "A syntax error in expression, near `<NoDebugMixedCaseFunc>'\\." \
+ "p <NoDebugMixedCaseFunc>, in C"
set test "break <MixedCaseFunc>, in C"
gdb_test_multiple "break <MixedCaseFunc>" $test {
diff --git a/gdb/testsuite/gdb.ada/bp_enum_homonym.exp b/gdb/testsuite/gdb.ada/bp_enum_homonym.exp
index de826bd..d104ae4 100644
--- a/gdb/testsuite/gdb.ada/bp_enum_homonym.exp
+++ b/gdb/testsuite/gdb.ada/bp_enum_homonym.exp
@@ -20,14 +20,14 @@ require allow_ada_tests
standard_ada_testfile p
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
# Force GDB to convert the psymtab of pck.adb into a symtab.
gdb_test "list pck.adb:1" \
- "$decimal\[ \t\]+-- Copyright.*"
+ "$decimal\[ \t\]+-- Copyright.*"
# Break on subprogram "Archive". There is an enumeral that's an
# homonym, so verify that GDB doesn't provide the choice between
@@ -35,7 +35,7 @@ gdb_test "list pck.adb:1" \
# Instead, it should insert the breakpoint on the function alone.
gdb_test "break archive" \
- "Breakpoint $decimal at $hex: file .*pck.adb, line $decimal\\."
+ "Breakpoint $decimal at $hex: file .*pck.adb, line $decimal\\."
# Run the program. Make sure the program runs until it hits
# the breakpoint and that the debugger does not unexpectedly ask
@@ -45,6 +45,5 @@ gdb_test "break archive" \
gdb_run_cmd
gdb_test "" \
- "Breakpoint $decimal, pck\\.archive \\(\\).*" \
- "run to pck.archive breakpoint"
-
+ "Breakpoint $decimal, pck\\.archive \\(\\).*" \
+ "run to pck.archive breakpoint"
diff --git a/gdb/testsuite/gdb.ada/bp_enum_homonym/p.adb b/gdb/testsuite/gdb.ada/bp_enum_homonym/p.adb
index 84cb697..988f28f 100644
--- a/gdb/testsuite/gdb.ada/bp_enum_homonym/p.adb
+++ b/gdb/testsuite/gdb.ada/bp_enum_homonym/p.adb
@@ -23,4 +23,3 @@ begin
Archive;
end if;
end P;
-
diff --git a/gdb/testsuite/gdb.ada/bp_fun_addr.exp b/gdb/testsuite/gdb.ada/bp_fun_addr.exp
index 46f9d52..be67a2a 100644
--- a/gdb/testsuite/gdb.ada/bp_fun_addr.exp
+++ b/gdb/testsuite/gdb.ada/bp_fun_addr.exp
@@ -20,16 +20,15 @@ require allow_ada_tests
standard_ada_testfile bp_fun_addr
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
gdb_test "break *bp_fun_addr'address" \
- "Breakpoint \[0-9\]+ at.*: file .*bp_fun_addr.adb, line \[0-9\]+."
+ "Breakpoint \[0-9\]+ at.*: file .*bp_fun_addr.adb, line \[0-9\]+."
gdb_run_cmd
gdb_test "" \
- "Breakpoint $decimal, bp_fun_addr \\(\\).*" \
- "run until breakpoint at bp_fun_addr'address"
-
+ "Breakpoint $decimal, bp_fun_addr \\(\\).*" \
+ "run until breakpoint at bp_fun_addr'address"
diff --git a/gdb/testsuite/gdb.ada/bp_inlined_func.exp b/gdb/testsuite/gdb.ada/bp_inlined_func.exp
index 04cf755..8b05a42 100644
--- a/gdb/testsuite/gdb.ada/bp_inlined_func.exp
+++ b/gdb/testsuite/gdb.ada/bp_inlined_func.exp
@@ -20,21 +20,21 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
if {![runto_main]} {
- return 0
+ return
}
# Check that inserting breakpoint on read_small inlined function inserts
# 4 breakpoints (or possibly 5, including the read_small function itself).
gdb_test "break read_small" \
- "Breakpoint $decimal at $hex: read_small\\. \\(\[45\] locations\\)" \
- "set breakpoint at read_small"
+ "Breakpoint $decimal at $hex: read_small\\. \\(\[45\] locations\\)" \
+ "set breakpoint at read_small"
# We do not verify each breakpoint info, but use continue commands instead
# to verify that we properly stop on each expected breakpoint.
@@ -50,5 +50,5 @@ for {set i 0} {$i < 4} {incr i} {
}
gdb_test "continue" \
- "Continuing\\..*$inferior_exited_re.*" \
- "continuing to program completion"
+ "Continuing\\..*$inferior_exited_re.*" \
+ "continuing to program completion"
diff --git a/gdb/testsuite/gdb.ada/bp_on_var.exp b/gdb/testsuite/gdb.ada/bp_on_var.exp
index e540a92..0b5e6a1 100644
--- a/gdb/testsuite/gdb.ada/bp_on_var.exp
+++ b/gdb/testsuite/gdb.ada/bp_on_var.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
# Test inserting breakpoint on pck.my_global_variable.
@@ -33,7 +33,7 @@ clean_restart ${testfile}
gdb_test_no_output "set breakpoint pending off" "disable pending breakpoints"
gdb_test "break pck.my_global_variable" \
- "Function \"pck\\.my_global_variable\" not defined\\."
+ "Function \"pck\\.my_global_variable\" not defined\\."
# Test inserting breakpoint on pck.my_hidden_variable.
@@ -44,4 +44,4 @@ gdb_test_no_output "set breakpoint pending off" \
"disable pending breakpoints after restart"
gdb_test "break pck.my_hidden_variable" \
- "Function \"pck\\.my_hidden_variable\" not defined\\."
+ "Function \"pck\\.my_hidden_variable\" not defined\\."
diff --git a/gdb/testsuite/gdb.ada/bp_on_var/pck.adb b/gdb/testsuite/gdb.ada/bp_on_var/pck.adb
index 2371a1f..5b8641a 100644
--- a/gdb/testsuite/gdb.ada/bp_on_var/pck.adb
+++ b/gdb/testsuite/gdb.ada/bp_on_var/pck.adb
@@ -24,4 +24,3 @@ package body Pck is
My_Hidden_Variable := My_Hidden_Variable + 1;
end Do_Something;
end Pck;
-
diff --git a/gdb/testsuite/gdb.ada/bp_on_var/pck.ads b/gdb/testsuite/gdb.ada/bp_on_var/pck.ads
index 979207a..279678e 100644
--- a/gdb/testsuite/gdb.ada/bp_on_var/pck.ads
+++ b/gdb/testsuite/gdb.ada/bp_on_var/pck.ads
@@ -17,4 +17,3 @@ package Pck is
My_Global_Variable : Integer := 11;
procedure Do_Something (I : in out Integer);
end Pck;
-
diff --git a/gdb/testsuite/gdb.ada/bp_range_type.exp b/gdb/testsuite/gdb.ada/bp_range_type.exp
index 704b714..ba16fe2 100644
--- a/gdb/testsuite/gdb.ada/bp_range_type.exp
+++ b/gdb/testsuite/gdb.ada/bp_range_type.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -28,12 +28,12 @@ clean_restart ${testfile}
set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb]
gdb_test "break foo.adb:$bp_location if small_value > 20" \
- "Breakpoint $decimal at $hex: file .*foo.adb, line $decimal\\."
+ "Breakpoint $decimal at $hex: file .*foo.adb, line $decimal\\."
gdb_run_cmd
gdb_test "" \
- "Breakpoint $decimal, foo \\(\\).*" \
- "run to breakpoint"
+ "Breakpoint $decimal, foo \\(\\).*" \
+ "run to breakpoint"
# Verify that we stopped at the correct iteration.
gdb_test "print small_value" " = 25"
diff --git a/gdb/testsuite/gdb.ada/bp_reset.exp b/gdb/testsuite/gdb.ada/bp_reset.exp
index 8d84061..d5441de 100644
--- a/gdb/testsuite/gdb.ada/bp_reset.exp
+++ b/gdb/testsuite/gdb.ada/bp_reset.exp
@@ -20,16 +20,16 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
gdb_test "break nested_sub" \
- "Breakpoint $decimal at $hex: file .*foo.adb, line $decimal\\."
+ "Breakpoint $decimal at $hex: file .*foo.adb, line $decimal\\."
gdb_test "break do_nothing" \
- "Breakpoint $decimal at $hex: file .*pck.adb, line $decimal\\."
+ "Breakpoint $decimal at $hex: file .*pck.adb, line $decimal\\."
# Run the program. Make sure the program runs until it hits
# the first breakpoint inside nested_sub.
diff --git a/gdb/testsuite/gdb.ada/break-label.exp b/gdb/testsuite/gdb.ada/break-label.exp
index c30903c..22fa959 100644
--- a/gdb/testsuite/gdb.ada/break-label.exp
+++ b/gdb/testsuite/gdb.ada/break-label.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile proc
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable debug] != ""} {
- return -1
+ return
}
# Ada is case-insensitive, so both of these should work.
diff --git a/gdb/testsuite/gdb.ada/byte_packed_arr.exp b/gdb/testsuite/gdb.ada/byte_packed_arr.exp
index e240ffd..6014c08 100644
--- a/gdb/testsuite/gdb.ada/byte_packed_arr.exp
+++ b/gdb/testsuite/gdb.ada/byte_packed_arr.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile reprod_main
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
@@ -29,4 +29,4 @@ set bp_location [gdb_get_line_number "STOP" ${testdir}/reprod.adb]
runto "reprod.adb:$bp_location"
gdb_test "print broken" \
- " = \\(len => 1, data => \\(\\(i => 1\\)\\)\\)"
+ " = \\(len => 1, data => \\(\\(i => 1\\)\\)\\)"
diff --git a/gdb/testsuite/gdb.ada/call-no-debug.exp b/gdb/testsuite/gdb.ada/call-no-debug.exp
index 30e605a..baf8e9b 100644
--- a/gdb/testsuite/gdb.ada/call-no-debug.exp
+++ b/gdb/testsuite/gdb.ada/call-no-debug.exp
@@ -29,7 +29,7 @@ if {[gdb_compile_ada $srcdir/$subdir/$testdir/pck.adb \
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable \
{debug no-force}] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/call_pn.exp b/gdb/testsuite/gdb.ada/call_pn.exp
index 7e01523..13a6211 100644
--- a/gdb/testsuite/gdb.ada/call_pn.exp
+++ b/gdb/testsuite/gdb.ada/call_pn.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -37,8 +37,7 @@ if {![runto "foo.adb:$bp_location"]} {
# print.
gdb_test_no_output {maint expand-symtabs "\(pck\|foo\)\.adb"}
-set gcc_major_version [gcc_major_version]
-set have_xfail [expr $gcc_major_version >= 8 && $gcc_major_version <= 9]
+set have_xfail [expr {[gnat_version_compare >= 8] && [gnat_version_compare < 10]}]
# The xfail is for PR gcc/94469, which occurs with target board
# unix/-flto/-O0/-flto-partition=none/-ffat-lto-objects and gcc-8 and later.
diff --git a/gdb/testsuite/gdb.ada/call_pn/foo.adb b/gdb/testsuite/gdb.ada/call_pn/foo.adb
index 7923732..42ad7bd 100644
--- a/gdb/testsuite/gdb.ada/call_pn/foo.adb
+++ b/gdb/testsuite/gdb.ada/call_pn/foo.adb
@@ -20,4 +20,3 @@ procedure Foo is
begin
New_Node := Pn (1234); -- STOP
end Foo;
-
diff --git a/gdb/testsuite/gdb.ada/call_pn/pck.adb b/gdb/testsuite/gdb.ada/call_pn/pck.adb
index 6604aea..61f81d0 100644
--- a/gdb/testsuite/gdb.ada/call_pn/pck.adb
+++ b/gdb/testsuite/gdb.ada/call_pn/pck.adb
@@ -22,4 +22,3 @@ package body Pck is
return N;
end Pn;
end Pck;
-
diff --git a/gdb/testsuite/gdb.ada/call_pn/pck.ads b/gdb/testsuite/gdb.ada/call_pn/pck.ads
index f1cc9c2..6e9edd4 100644
--- a/gdb/testsuite/gdb.ada/call_pn/pck.ads
+++ b/gdb/testsuite/gdb.ada/call_pn/pck.ads
@@ -20,4 +20,3 @@ package Pck is
function Pn (N : Node_Id) return Node_Id;
end Pck;
-
diff --git a/gdb/testsuite/gdb.ada/catch_assert_if.exp b/gdb/testsuite/gdb.ada/catch_assert_if.exp
index 9e63c17..443a90f 100644
--- a/gdb/testsuite/gdb.ada/catch_assert_if.exp
+++ b/gdb/testsuite/gdb.ada/catch_assert_if.exp
@@ -20,7 +20,7 @@ require allow_ada_tests gnat_runtime_has_debug_info
standard_ada_testfile bla
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnata ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -35,12 +35,12 @@ set sp "\[ \t\]*"
# - continue, the program exits.
if {![runto_main]} {
- return 0
+ return
}
gdb_test "catch assert if Global_Var = 2" \
- "Catchpoint $decimal: failed Ada assertions" \
- "insert catchpoint on failed assertions with condition"
+ "Catchpoint $decimal: failed Ada assertions" \
+ "insert catchpoint on failed assertions with condition"
# Check that condition is stored and properly displayed.
@@ -53,8 +53,8 @@ set catchpoint_msg \
"Catchpoint $decimal, failed assertion at $hex in bla \\\(\\\).*at .*bla.adb:$bp_location"
gdb_test "continue" \
"Continuing\\.$eol$eol$catchpoint_msg$eol.*STOP" \
- "continuing to expected failed assertion"
+ "continuing to expected failed assertion"
gdb_test "continue" \
- "Continuing\\..*$inferior_exited_re.*" \
- "continuing to program completion"
+ "Continuing\\..*$inferior_exited_re.*" \
+ "continuing to program completion"
diff --git a/gdb/testsuite/gdb.ada/catch_assert_if/pck.ads b/gdb/testsuite/gdb.ada/catch_assert_if/pck.ads
index 62409d5..3f48421 100644
--- a/gdb/testsuite/gdb.ada/catch_assert_if/pck.ads
+++ b/gdb/testsuite/gdb.ada/catch_assert_if/pck.ads
@@ -16,4 +16,3 @@
package Pck is
Global_Var : Integer := 0;
end Pck;
-
diff --git a/gdb/testsuite/gdb.ada/catch_ex.exp b/gdb/testsuite/gdb.ada/catch_ex.exp
index 6b57735..8ea718e 100644
--- a/gdb/testsuite/gdb.ada/catch_ex.exp
+++ b/gdb/testsuite/gdb.ada/catch_ex.exp
@@ -20,7 +20,7 @@ require allow_ada_tests gnat_runtime_has_debug_info
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnata ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -41,7 +41,7 @@ set catch_exception_info \
####################################
if {![runto_main]} {
- return 0
+ return
}
gdb_test "catch exception" \
@@ -49,20 +49,20 @@ gdb_test "catch exception" \
"insert catchpoint on all Ada exceptions"
gdb_test "info break" \
- "$info_break_header$eol.*$catch_exception_info" \
- "info break, catch all Ada exceptions"
+ "$info_break_header$eol.*$catch_exception_info" \
+ "info break, catch all Ada exceptions"
set catchpoint_msg \
"Catchpoint $any_nb, CONSTRAINT_ERROR (\\\(ignore C_E\\\) )?at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb"
gdb_test "continue" \
"Continuing\\.$eol$eol$catchpoint_msg$eol.*SPOT1" \
- "continuing to first exception"
+ "continuing to first exception"
set catchpoint_msg \
"Catchpoint $any_nb, PROGRAM_ERROR (\\\(foo\\.adb:$decimal explicit raise\\\) )?at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb"
gdb_test "continue" \
"Continuing\\.$eol$eol$catchpoint_msg$eol.*SPOT2" \
- "continuing to second exception"
+ "continuing to second exception"
################################################
# 2. Try catching only some of the exceptions. #
@@ -79,20 +79,20 @@ gdb_test "continue" \
# - continue, the program exits.
if {![runto_main]} {
- return 0
+ return
}
gdb_test "catch exception Program_Error" \
- "Catchpoint $any_nb: \`Program_Error' Ada exception" \
- "insert catchpoint on Program_Error"
+ "Catchpoint $any_nb: \`Program_Error' Ada exception" \
+ "insert catchpoint on Program_Error"
gdb_test "catch assert" \
- "Catchpoint $any_nb: failed Ada assertions" \
- "insert catchpoint on failed assertions"
+ "Catchpoint $any_nb: failed Ada assertions" \
+ "insert catchpoint on failed assertions"
gdb_test "catch exception unhandled" \
- "Catchpoint $any_nb: unhandled Ada exceptions" \
- "insert catchpoint on unhandled exceptions"
+ "Catchpoint $any_nb: unhandled Ada exceptions" \
+ "insert catchpoint on unhandled exceptions"
set catch_exception_entry \
"$any_nb${sp}catchpoint${sp}keep${sp}y${sp}\`Program_Error' Ada exception"
@@ -102,30 +102,30 @@ set catch_unhandled_entry \
"$any_nb${sp}catchpoint${sp}keep${sp}y${sp}unhandled Ada exceptions"
gdb_test "info break" \
- "$info_break_header$eol.*$catch_exception_entry$eol$catch_assert_entry$eol$catch_unhandled_entry" \
- "info break, second run"
+ "$info_break_header$eol.*$catch_exception_entry$eol$catch_assert_entry$eol$catch_unhandled_entry" \
+ "info break, second run"
set catchpoint_msg \
"Catchpoint $any_nb, PROGRAM_ERROR (\\\(foo.adb:$decimal explicit raise\\\) )?at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb"
gdb_test "continue" \
"Continuing\\.$eol$eol$catchpoint_msg$eol.*SPOT2" \
- "continuing to Program_Error exception"
+ "continuing to Program_Error exception"
set catchpoint_msg \
"Catchpoint $any_nb, failed assertion at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb"
gdb_test "continue" \
"Continuing\\.$eol$eol$catchpoint_msg$eol.*SPOT3" \
- "continuing to failed assertion"
+ "continuing to failed assertion"
set catchpoint_msg \
"Catchpoint $any_nb, unhandled CONSTRAINT_ERROR at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb"
gdb_test "continue" \
"Continuing\\.$eol$eol$catchpoint_msg$eol.*SPOT4" \
- "continuing to unhandled exception"
+ "continuing to unhandled exception"
gdb_test "continue" \
- "Continuing\\..*$inferior_exited_re.*" \
- "continuing to program completion"
+ "Continuing\\..*$inferior_exited_re.*" \
+ "continuing to program completion"
#################################
# 3. Try temporary catchpoints. #
@@ -139,22 +139,20 @@ gdb_test "continue" \
# the program.
if {![runto_main]} {
- return 0
+ return
}
gdb_test "tcatch exception" \
- "Temporary catchpoint $any_nb: all Ada exceptions"
+ "Temporary catchpoint $any_nb: all Ada exceptions"
set temp_catchpoint_msg \
"Temporary catchpoint $any_nb, CONSTRAINT_ERROR (\\\(.*\\\) )?at $any_addr in foo \\\(\\\).*at .*foo.adb:$any_nb"
gdb_test "continue" \
"Continuing\\.$eol$eol$temp_catchpoint_msg$eol.*SPOT1" \
- "continuing to temporary catchpoint"
+ "continuing to temporary catchpoint"
with_test_prefix "temporary catchpoint" {
gdb_test "continue" \
"Continuing\\..*$inferior_exited_re.*" \
"continuing to program completion"
}
-
-
diff --git a/gdb/testsuite/gdb.ada/catch_ex_std.exp b/gdb/testsuite/gdb.ada/catch_ex_std.exp
index 8326395..d1f17f8 100644
--- a/gdb/testsuite/gdb.ada/catch_ex_std.exp
+++ b/gdb/testsuite/gdb.ada/catch_ex_std.exp
@@ -28,7 +28,7 @@ set outdir [file dirname $binfile]
# Create the shared library.
if {[gdb_compile_shlib $srcfile2 $sofile {ada debug}] != ""} {
- return -1
+ return
}
# Set linkarg such that the executable can find the shared library.
@@ -56,7 +56,7 @@ foreach option [concat $gnatbind_options $gnatlink_options] {
# Create executable.
if {[gdb_compile_ada $srcfile $binfile executable $options] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
@@ -66,7 +66,7 @@ clean_restart ${testfile}
gdb_load_shlib $sofile
if {![runto_main]} {
- return 0
+ return
}
gdb_test "catch exception some_kind_of_error" \
diff --git a/gdb/testsuite/gdb.ada/char_enum.exp b/gdb/testsuite/gdb.ada/char_enum.exp
index 8757a10..6fbfb7b 100644
--- a/gdb/testsuite/gdb.ada/char_enum.exp
+++ b/gdb/testsuite/gdb.ada/char_enum.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/char_enum/pck.adb b/gdb/testsuite/gdb.ada/char_enum/pck.adb
index fc67d2f..2bfbe8c 100644
--- a/gdb/testsuite/gdb.ada/char_enum/pck.adb
+++ b/gdb/testsuite/gdb.ada/char_enum/pck.adb
@@ -19,4 +19,3 @@ package body Pck is
null;
end Do_Nothing;
end Pck;
-
diff --git a/gdb/testsuite/gdb.ada/char_enum/pck.ads b/gdb/testsuite/gdb.ada/char_enum/pck.ads
index 0293c79..e83e744 100644
--- a/gdb/testsuite/gdb.ada/char_enum/pck.ads
+++ b/gdb/testsuite/gdb.ada/char_enum/pck.ads
@@ -19,4 +19,3 @@ package Pck is
type Global_Enum_Type is ('x', 'Y', '+');
procedure Do_Nothing (A : System.Address);
end Pck;
-
diff --git a/gdb/testsuite/gdb.ada/char_enum_overload.exp b/gdb/testsuite/gdb.ada/char_enum_overload.exp
index 1ab8e9e..8a8cc5a 100644
--- a/gdb/testsuite/gdb.ada/char_enum_overload.exp
+++ b/gdb/testsuite/gdb.ada/char_enum_overload.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/char_enum_unicode.exp b/gdb/testsuite/gdb.ada/char_enum_unicode.exp
index 838bae0..33e5aeb 100644
--- a/gdb/testsuite/gdb.ada/char_enum_unicode.exp
+++ b/gdb/testsuite/gdb.ada/char_enum_unicode.exp
@@ -21,7 +21,7 @@ standard_ada_testfile foo
set flags [list debug additional_flags=-gnatW8]
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/char_param.exp b/gdb/testsuite/gdb.ada/char_param.exp
index fe19a83..b33d820 100644
--- a/gdb/testsuite/gdb.ada/char_param.exp
+++ b/gdb/testsuite/gdb.ada/char_param.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -34,23 +34,21 @@ runto "foo.adb:$bp_location"
# the function call.
gdb_test "print procedure_result" \
- "= 32 ' '" \
- "print procedure_result before calling same"
+ "= 32 ' '" \
+ "print procedure_result before calling same"
gdb_test "call same (first)" \
- "" \
- "call same"
+ "" \
+ "call same"
gdb_test "print procedure_result" \
- "= 97 'a'" \
- "print procedure_result after calling same"
+ "= 97 'a'" \
+ "print procedure_result after calling same"
gdb_test "call next (first)" \
- "= 98 'b'" \
- "call next"
+ "= 98 'b'" \
+ "call next"
gdb_test "print procedure_result" \
- "= 98 'b'" \
- "print procedure_result after calling next"
-
-
+ "= 98 'b'" \
+ "print procedure_result after calling next"
diff --git a/gdb/testsuite/gdb.ada/char_param/foo.adb b/gdb/testsuite/gdb.ada/char_param/foo.adb
index b1e4bfd..b07fc9e 100644
--- a/gdb/testsuite/gdb.ada/char_param/foo.adb
+++ b/gdb/testsuite/gdb.ada/char_param/foo.adb
@@ -22,6 +22,3 @@ begin
Same (First); -- STOP
Next (First);
end Foo;
-
-
-
diff --git a/gdb/testsuite/gdb.ada/complete.exp b/gdb/testsuite/gdb.ada/complete.exp
index c8fcc47..725f06b 100644
--- a/gdb/testsuite/gdb.ada/complete.exp
+++ b/gdb/testsuite/gdb.ada/complete.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -50,7 +50,7 @@ proc test_gdb_complete { expr expected_output {msg ""} } {
set msg $cmd
}
gdb_test "complete p $expr" \
- "$expected_output" $msg
+ "$expected_output" $msg
}
# A convenience function that verifies that the "complete EXPR" command
@@ -63,12 +63,12 @@ proc test_gdb_no_completion { expr } {
# Try a global variable, only one match should be found:
test_gdb_complete "my_glob" \
- "p my_global_variable"
+ "p my_global_variable"
# A global variable, inside a nested package:
test_gdb_complete "insi" \
- "p inside_variable"
+ "p inside_variable"
# A global variable inside a nested package, but only giving part of
# the fully qualified name (top level package name missing):
@@ -77,16 +77,16 @@ test_gdb_no_completion "inner.insi"
# An incomplete nested package name, were lies a single symbol:
test_gdb_complete "pck.inne" \
- "p pck.inner.inside_variable" \
- "complete nested package name"
+ "p pck.inner.inside_variable" \
+ "complete nested package name"
# A fully qualified symbol name, mangled...
test_gdb_complete "pck__inner__ins" \
- "p pck__inner__inside_variable"
+ "p pck__inner__inside_variable"
# A fully qualified symbol name...
test_gdb_complete "pck.inner.ins" \
- "p pck.inner.inside_variable"
+ "p pck.inner.inside_variable"
# Make sure that "inside" is not returned as a possible completion
# for "side"...
@@ -98,7 +98,7 @@ test_gdb_no_completion "exported"
# check the "<...>" notation.
test_gdb_complete "<Exported" \
- "p <Exported_Capitalized>"
+ "p <Exported_Capitalized>"
# While at it, make sure we can print the symbol too, using the '<'
# notation.
@@ -112,16 +112,16 @@ gdb_test "p exported_capitalized" \
# A global symbol, created by the binder, that starts with __gnat...
test_gdb_complete "__gnat_ada_main_progra" \
- "p __gnat_ada_main_program_name"
+ "p __gnat_ada_main_program_name"
# A global symbol, created by the binder, that starts with __gnat,
# and using the '<' notation.
test_gdb_complete "<__gnat_ada_main_prog" \
- "p <__gnat_ada_main_program_name>"
+ "p <__gnat_ada_main_program_name>"
# A local variable
test_gdb_complete "some" \
- "p some_local_variable"
+ "p some_local_variable"
# A local variable variable, but in a different procedure. No match
# should be returned.
@@ -132,7 +132,7 @@ test_gdb_no_completion "pck.ins"
# A fully qualified variable name that does exist...
test_gdb_complete "pck.my" \
- "p pck.my_global_variable"
+ "p pck.my_global_variable"
# A fully qualified package name
test_gdb_complete "pck.inner" \
@@ -141,30 +141,30 @@ test_gdb_complete "pck.inner" \
# A fully qualified package name, with a dot at the end
test_gdb_complete "pck.inner." \
- "p pck.inner.inside_variable"
+ "p pck.inner.inside_variable"
# Two matches, from the global scope:
test_gdb_complete "local_ident" \
- [multi_line "p local_identical_one" \
- "p local_identical_two" ]
+ [multi_line "p local_identical_one" \
+ "p local_identical_two" ]
# Two matches, from the global scope, but using fully qualified names:
test_gdb_complete "pck.local_ident" \
- [multi_line "p pck.local_identical_one" \
- "p pck.local_identical_two" ]
+ [multi_line "p pck.local_identical_one" \
+ "p pck.local_identical_two" ]
# Two matches, from the global scope, but using mangled fully qualified
# names:
test_gdb_complete "pck__local_ident" \
- [multi_line "p pck__local_identical_one" \
- "p pck__local_identical_two" ]
+ [multi_line "p pck__local_identical_one" \
+ "p pck__local_identical_two" ]
# Two matches, one from the global scope, the other from the local scope:
test_gdb_complete "external_ident" \
- [multi_line "p external_identical_one" \
- "p external_identical_two" ]
+ [multi_line "p external_identical_one" \
+ "p external_identical_two" ]
-# Complete on the name of package.
+# Complete on the name of package.
test_gdb_complete "pck" \
[multi_line_with_optional \
"(p pck)?" \
@@ -198,7 +198,7 @@ test_gdb_complete "pck." \
# Complete a mangled symbol name, but using the '<...>' notation.
test_gdb_complete "<pck__my" \
- "p <pck__my_global_variable>"
+ "p <pck__my_global_variable>"
# Very simple completion, but using the interactive form, this time.
# The verification we are trying to make involves the event loop,
@@ -224,12 +224,12 @@ if { [readline_is_used] } {
# which users can select a specific function. This should not happen during
# completion, though.
test_gdb_complete "ambig" \
- [multi_line "p ambiguous_func" \
- "p ambiguous_proc" ]
+ [multi_line "p ambiguous_func" \
+ "p ambiguous_proc" ]
test_gdb_complete "ambiguous_f" \
- "p ambiguous_func"
+ "p ambiguous_func"
test_gdb_complete "ambiguous_func" \
- "p ambiguous_func"
+ "p ambiguous_func"
# Perform a test intended to verify the behavior where the number
# of possible completions is very large. The goal is not to verify
diff --git a/gdb/testsuite/gdb.ada/complete/foo.adb b/gdb/testsuite/gdb.ada/complete/foo.adb
index 446d054..5d93e53 100644
--- a/gdb/testsuite/gdb.ada/complete/foo.adb
+++ b/gdb/testsuite/gdb.ada/complete/foo.adb
@@ -26,4 +26,3 @@ begin
Aux_Pck.Ambiguous_Proc;
Pck.Ambiguous_Func;
end Foo;
-
diff --git a/gdb/testsuite/gdb.ada/cond_lang.exp b/gdb/testsuite/gdb.ada/cond_lang.exp
index 3577ad7..599a122 100644
--- a/gdb/testsuite/gdb.ada/cond_lang.exp
+++ b/gdb/testsuite/gdb.ada/cond_lang.exp
@@ -25,7 +25,7 @@ set cobject [standard_output_file ${cfile}.o]
gdb_compile "${csrcfile}" "${cobject}" object [list debug]
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -33,7 +33,7 @@ clean_restart ${testfile}
# Run to c_function an verify that the language automatically gets set to C.
runto c_function
gdb_test "show lang" \
- "The current source language is \"auto; currently c\"\\."
+ "The current source language is \"auto; currently c\"\\."
# Now, insert a breakpoint inside an Ada unit, using a condition written
# in Ada. Even though the current language is "auto; currently c", we
@@ -41,13 +41,11 @@ gdb_test "show lang" \
# current language mode is auto, and the breakpoint is inside Ada code.
set bp_location [gdb_get_line_number "STOP" ${testdir}/mixed.adb]
gdb_test "break mixed.adb:${bp_location} if light = green" \
- "Breakpoint \[0-9\]* at .*: file (.*/)?mixed.adb, line \[0-9\]*\\."
+ "Breakpoint \[0-9\]* at .*: file (.*/)?mixed.adb, line \[0-9\]*\\."
# Now, continue until we hit the breakpoint. If the condition is
# evaluated correctly, the first hit will be ignored, and the debugger
# will stop at the second hit only, when the "light" argument is equal
# to green.
gdb_test "continue" \
- "Breakpoint \[0-9\]*, mixed\\.break_me \\(light=green\\) at .*"
-
-
+ "Breakpoint \[0-9\]*, mixed\\.break_me \\(light=green\\) at .*"
diff --git a/gdb/testsuite/gdb.ada/cond_lang/foo.c b/gdb/testsuite/gdb.ada/cond_lang/foo.c
index aeb28b8..55fb1a8 100644
--- a/gdb/testsuite/gdb.ada/cond_lang/foo.c
+++ b/gdb/testsuite/gdb.ada/cond_lang/foo.c
@@ -22,4 +22,3 @@ c_function (void)
{
callme ();
}
-
diff --git a/gdb/testsuite/gdb.ada/convvar_comp.exp b/gdb/testsuite/gdb.ada/convvar_comp.exp
index 0b847cc..339fb34 100644
--- a/gdb/testsuite/gdb.ada/convvar_comp.exp
+++ b/gdb/testsuite/gdb.ada/convvar_comp.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile pb16_063
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/data-sections.exp b/gdb/testsuite/gdb.ada/data-sections.exp
index ff9be0f..51844b0 100644
--- a/gdb/testsuite/gdb.ada/data-sections.exp
+++ b/gdb/testsuite/gdb.ada/data-sections.exp
@@ -22,7 +22,7 @@ standard_ada_testfile main
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable \
{debug additional_flags=-fdata-sections ldflags=-Wl,--gc-sections}] \
!= ""} {
- return -1
+ return
}
# The bug was that the DWARF reader would crash when processing a
diff --git a/gdb/testsuite/gdb.ada/delta-assign.exp b/gdb/testsuite/gdb.ada/delta-assign.exp
index 13b62b8..fbb8767 100644
--- a/gdb/testsuite/gdb.ada/delta-assign.exp
+++ b/gdb/testsuite/gdb.ada/delta-assign.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile main
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/dgopt.exp b/gdb/testsuite/gdb.ada/dgopt.exp
index 7967f32..438840f 100644
--- a/gdb/testsuite/gdb.ada/dgopt.exp
+++ b/gdb/testsuite/gdb.ada/dgopt.exp
@@ -23,7 +23,7 @@ standard_ada_testfile x
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable \
{debug additional_flags=-gnatDG}] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/disc_arr_bound.exp b/gdb/testsuite/gdb.ada/disc_arr_bound.exp
index e11bc56..e34ab4e 100644
--- a/gdb/testsuite/gdb.ada/disc_arr_bound.exp
+++ b/gdb/testsuite/gdb.ada/disc_arr_bound.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo_n612_026
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -31,7 +31,7 @@ if {![runto "foo_n612_026.adb:$bp_location"]} {
}
gdb_test "print r" \
- " = \\(n => 10, a => \\(10, 20, 30, 40, 50, 60, 70, 80, 90, 100\\)\\)"
+ " = \\(n => 10, a => \\(10, 20, 30, 40, 50, 60, 70, 80, 90, 100\\)\\)"
gdb_test "print r.a" \
- " = \\(10, 20, 30, 40, 50, 60, 70, 80, 90, 100\\)"
+ " = \\(10, 20, 30, 40, 50, 60, 70, 80, 90, 100\\)"
diff --git a/gdb/testsuite/gdb.ada/discrete-char.exp b/gdb/testsuite/gdb.ada/discrete-char.exp
index dfe698a..515219a 100644
--- a/gdb/testsuite/gdb.ada/discrete-char.exp
+++ b/gdb/testsuite/gdb.ada/discrete-char.exp
@@ -22,7 +22,7 @@ require allow_ada_tests
standard_ada_testfile main
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/display_nested.exp b/gdb/testsuite/gdb.ada/display_nested.exp
index fbc072b..4316dc9 100644
--- a/gdb/testsuite/gdb.ada/display_nested.exp
+++ b/gdb/testsuite/gdb.ada/display_nested.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable debug] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/dot_all.exp b/gdb/testsuite/gdb.ada/dot_all.exp
index ba5d9df..3bae392 100644
--- a/gdb/testsuite/gdb.ada/dot_all.exp
+++ b/gdb/testsuite/gdb.ada/dot_all.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/dot_all/pck.adb b/gdb/testsuite/gdb.ada/dot_all/pck.adb
index 7b1933a..4c32dd5 100644
--- a/gdb/testsuite/gdb.ada/dot_all/pck.adb
+++ b/gdb/testsuite/gdb.ada/dot_all/pck.adb
@@ -21,5 +21,3 @@ package body Pck is
end Do_Nothing;
end Pck;
-
-
diff --git a/gdb/testsuite/gdb.ada/dot_all/pck.ads b/gdb/testsuite/gdb.ada/dot_all/pck.ads
index 90ba348..778ac5a 100644
--- a/gdb/testsuite/gdb.ada/dot_all/pck.ads
+++ b/gdb/testsuite/gdb.ada/dot_all/pck.ads
@@ -18,5 +18,3 @@ with System;
package Pck is
procedure Do_Nothing (A : System.Address);
end Pck;
-
-
diff --git a/gdb/testsuite/gdb.ada/dyn-bit-offset.exp b/gdb/testsuite/gdb.ada/dyn-bit-offset.exp
new file mode 100644
index 0000000..a825d3b
--- /dev/null
+++ b/gdb/testsuite/gdb.ada/dyn-bit-offset.exp
@@ -0,0 +1,79 @@
+# Copyright 2025 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
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+load_lib "ada.exp"
+
+require allow_ada_tests
+
+standard_ada_testfile exam
+
+set flags {debug}
+if {[ada_minimal_encodings]} {
+ lappend flags additional_flags=-fgnat-encodings=minimal
+}
+
+if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
+ return
+}
+
+# GCC needs to have fixes:
+# - 809b46d2ccc ("Partially lift restriction from loc_list_from_tree_1")
+# - d7f24e37d4b ("Fix oversight about big-endian targets in latest change")
+set have_xfail [gnat_version_compare <= {16 1}]
+
+clean_restart ${testfile}
+
+set bp_location [gdb_get_line_number "STOP" ${testdir}/exam.adb]
+runto "exam.adb:$bp_location"
+
+set re_pass \
+ [string_to_regexp \
+ " = (discr => 3, array_field => (-5, -6, -7), field => -5, another_field => -6)"]
+set re_xfail_le \
+ [string_to_regexp \
+ " = (discr => 3, array_field => (-5, -6, -7), field => -4, another_field => -4)"]
+set re_xfail_be \
+ [string_to_regexp \
+ " = (discr => 3, array_field => (-5, -6, -7), field => -6, another_field => -6)"]
+
+gdb_test_multiple "print spr" "" {
+ -re -wrap $re_pass {
+ pass $gdb_test_name
+ }
+ -re -wrap $re_xfail_le|$re_xfail_be {
+ if { $have_xfail } {
+ xfail $gdb_test_name
+ } else {
+ fail $gdb_test_name
+ }
+ }
+}
+
+set re_pass " = -5"
+set re_xfail_le " = -4"
+set re_xfail_be " = -6"
+
+gdb_test_multiple "print spr.field" "" {
+ -re -wrap $re_pass {
+ pass $gdb_test_name
+ }
+ -re -wrap $re_xfail_le|$re_xfail_be {
+ if { $have_xfail } {
+ xfail $gdb_test_name
+ } else {
+ fail $gdb_test_name
+ }
+ }
+}
diff --git a/gdb/testsuite/gdb.ada/dyn-bit-offset/exam.adb b/gdb/testsuite/gdb.ada/dyn-bit-offset/exam.adb
new file mode 100644
index 0000000..5c7f70b
--- /dev/null
+++ b/gdb/testsuite/gdb.ada/dyn-bit-offset/exam.adb
@@ -0,0 +1,45 @@
+-- Copyright 2025 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
+-- the Free Software Foundation; either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+procedure Exam is
+ type Small is range -7 .. -4;
+ for Small'Size use 2;
+
+ type Packed_Array is array (Integer range <>) of Small;
+ pragma pack (Packed_Array);
+
+ subtype Range_Int is Natural range 0 .. 7;
+
+ type Some_Packed_Record (Discr : Range_Int := 3) is record
+ Array_Field : Packed_Array (1 .. Discr);
+ Field: Small;
+ case Discr is
+ when 3 =>
+ Another_Field : Small;
+ when others =>
+ null;
+ end case;
+ end record;
+ pragma Pack (Some_Packed_Record);
+ pragma No_Component_Reordering (Some_Packed_Record);
+
+ SPR : Some_Packed_Record := (Discr => 3,
+ Field => -5,
+ Another_Field => -6,
+ Array_Field => (-5, -6, -7));
+
+begin
+ null; -- STOP
+end Exam;
diff --git a/gdb/testsuite/gdb.ada/dyn-range.exp b/gdb/testsuite/gdb.ada/dyn-range.exp
index aed5847..a0dabb9 100644
--- a/gdb/testsuite/gdb.ada/dyn-range.exp
+++ b/gdb/testsuite/gdb.ada/dyn-range.exp
@@ -20,14 +20,14 @@ require allow_ada_tests
standard_ada_testfile dyn
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
set bp_location [gdb_get_line_number "STOP" ${testdir}/dyn.adb]
if {![runto "dyn.adb:$bp_location"]} {
- return -1
+ return
}
# Accept "dyn." prefix for older versions of GNAT.
diff --git a/gdb/testsuite/gdb.ada/dyn_arrayidx.exp b/gdb/testsuite/gdb.ada/dyn_arrayidx.exp
index fa5b95e..0affece 100644
--- a/gdb/testsuite/gdb.ada/dyn_arrayidx.exp
+++ b/gdb/testsuite/gdb.ada/dyn_arrayidx.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug additional_flags=-gnat12}] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
@@ -33,4 +33,4 @@ runto "foo.adb:$bp_location"
gdb_test_no_output "maintenance set ada ignore-descriptive-types"
gdb_test "ptype array_type" \
- " = array \\(5 \\.\\. 10\\) of natural" \
+ " = array \\(5 \\.\\. 10\\) of natural" \
diff --git a/gdb/testsuite/gdb.ada/dyn_loc.exp b/gdb/testsuite/gdb.ada/dyn_loc.exp
index 0a1313b..5ff2287 100644
--- a/gdb/testsuite/gdb.ada/dyn_loc.exp
+++ b/gdb/testsuite/gdb.ada/dyn_loc.exp
@@ -20,14 +20,14 @@ require allow_ada_tests
standard_ada_testfile p
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
set bp_location [gdb_get_line_number "BREAK" ${testdir}/pack.adb]
if {![runto "pack.adb:$bp_location"]} {
- return -1
+ return
}
set eol "\r\n"
@@ -35,13 +35,12 @@ set eol "\r\n"
set test "info locals"
gdb_test_multiple "$test" "$test" {
-re "i = \"AA\"${eol}s = \" \"" {
- pass $test
+ pass $test
}
-re "i = \"AA\"${eol}.*${eol}s = \" \"" {
- # The debugger printed the two local variable correctly, but
- # it probably failed to NOT print some variables internally
- # generated by the compiler. This is a known issue.
- xfail $test
+ # The debugger printed the two local variable correctly, but
+ # it probably failed to NOT print some variables internally
+ # generated by the compiler. This is a known issue.
+ xfail $test
}
}
-
diff --git a/gdb/testsuite/gdb.ada/dyn_stride.exp b/gdb/testsuite/gdb.ada/dyn_stride.exp
index deeeddd..b25a569 100644
--- a/gdb/testsuite/gdb.ada/dyn_stride.exp
+++ b/gdb/testsuite/gdb.ada/dyn_stride.exp
@@ -20,27 +20,27 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb]
if {![runto "foo.adb:$bp_location"]} {
- return -1
+ return
}
gdb_test "print A1(1)" \
- "\\(i => 0, s => \"\"\\)"
+ "\\(i => 0, s => \"\"\\)"
gdb_test "print A1(2)" \
- "\\(i => 1, s => \"A\"\\)"
+ "\\(i => 1, s => \"A\"\\)"
gdb_test "print A1(3)" \
- "\\(i => 2, s => \"AB\"\\)"
+ "\\(i => 2, s => \"AB\"\\)"
gdb_test "print A1(1..3)" \
- "\\(\\(i => 0, s => \"\"\\), \\(i => 1, s => \"A\"\\), \\(i => 2, s => \"AB\"\\)\\)"
+ "\\(\\(i => 0, s => \"\"\\), \\(i => 1, s => \"A\"\\), \\(i => 2, s => \"AB\"\\)\\)"
# Test the use of the "repeat" operator (@).
#
@@ -59,4 +59,4 @@ gdb_test "print A1(1..3)" \
# of the array).
gdb_test "print a1(1)@3" \
- " = \\(\\(i => 0, s => \"\"\\), \\(i => -?$decimal, s => .*\\), \\(i => -?$decimal, s => .*\\)\\)"
+ " = \\(\\(i => 0, s => \"\"\\), \\(i => -?$decimal, s => .*\\), \\(i => -?$decimal, s => .*\\)\\)"
diff --git a/gdb/testsuite/gdb.ada/dynamic-iface.exp b/gdb/testsuite/gdb.ada/dynamic-iface.exp
index a3add3f..3e55be9 100644
--- a/gdb/testsuite/gdb.ada/dynamic-iface.exp
+++ b/gdb/testsuite/gdb.ada/dynamic-iface.exp
@@ -22,7 +22,7 @@ require gnat_runtime_has_debug_info
standard_ada_testfile main
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug additional_flags=-gnat05}] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/enum_idx_packed.exp b/gdb/testsuite/gdb.ada/enum_idx_packed.exp
index c274d2b..e669055 100644
--- a/gdb/testsuite/gdb.ada/enum_idx_packed.exp
+++ b/gdb/testsuite/gdb.ada/enum_idx_packed.exp
@@ -23,7 +23,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
lappend flags debug
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
- return -1
+ return
}
clean_restart ${testfile}-${scenario}
diff --git a/gdb/testsuite/gdb.ada/enum_qual.exp b/gdb/testsuite/gdb.ada/enum_qual.exp
index 75df83c..e5e57e6 100644
--- a/gdb/testsuite/gdb.ada/enum_qual.exp
+++ b/gdb/testsuite/gdb.ada/enum_qual.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile qual
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable debug] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/enums_overload.exp b/gdb/testsuite/gdb.ada/enums_overload.exp
index 8109e86..cbb8b5c 100644
--- a/gdb/testsuite/gdb.ada/enums_overload.exp
+++ b/gdb/testsuite/gdb.ada/enums_overload.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile enums_overload_main
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/excep_handle.exp b/gdb/testsuite/gdb.ada/excep_handle.exp
index 9d91d45..b2dc3bf 100644
--- a/gdb/testsuite/gdb.ada/excep_handle.exp
+++ b/gdb/testsuite/gdb.ada/excep_handle.exp
@@ -20,7 +20,7 @@ require allow_ada_tests gnat_runtime_has_debug_info
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnata ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -41,7 +41,7 @@ set catchpoint_storage_error_msg \
"Catchpoint $decimal, exception at $hex in foo \\\(\\\).*at .*foo.adb:$decimal$eol$decimal$sp$when Storage_Error =>"
if {![runto_main]} {
- return 0
+ return
}
############################################
@@ -70,7 +70,7 @@ gdb_test "continue" \
"continuing and stopping in Storage_Error exception handlers"
gdb_test_no_output "delete 2" \
- "delete catchpoint on all Ada exceptions handlers"
+ "delete catchpoint on all Ada exceptions handlers"
##################################################
# 2. Try catching some named exception handlers. #
@@ -79,8 +79,8 @@ gdb_test_no_output "delete 2" \
# Insert a catchpoint on Program_Error Ada exception handlers.
gdb_test "catch handlers Program_Error" \
- "Catchpoint $decimal: `Program_Error' Ada exception handlers" \
- "insert catchpoint on Program_Error Ada exception handlers"
+ "Catchpoint $decimal: `Program_Error' Ada exception handlers" \
+ "insert catchpoint on Program_Error Ada exception handlers"
# Continue, we should not stop at ABORT_SIGNAL but at Program_Error one.
@@ -95,8 +95,8 @@ gdb_test_no_output \
# Insert a catchpoint on Storage_Error Ada exception handlers.
gdb_test "catch handlers Storage_Error" \
- "Catchpoint $decimal: `Storage_Error' Ada exception handlers" \
- "insert catchpoint on Storage_Error Ada exception handlers"
+ "Catchpoint $decimal: `Storage_Error' Ada exception handlers" \
+ "insert catchpoint on Storage_Error Ada exception handlers"
# Continue, we should stop at Storage_Error handlers.
@@ -115,13 +115,13 @@ gdb_test_no_output \
# Insert a catchpoint on all Ada exceptions handlers with condition.
gdb_test "catch handlers if Global_Var = 2" \
- "Catchpoint $decimal: all Ada exceptions handlers" \
- "insert catchpoint on all Ada exception handlers with condition"
+ "Catchpoint $decimal: all Ada exceptions handlers" \
+ "insert catchpoint on all Ada exception handlers with condition"
# Check that condition is stored and properly displayed.
gdb_test "info breakpoint" "stop only if Global_Var = 2" \
- "Check catch handlers with condition"
+ "Check catch handlers with condition"
# Continue, we should not stop at ABORT_SIGNAL but at Program_Error one.
@@ -154,5 +154,5 @@ gdb_test "continue" \
# Continue, the program should exit properly.
gdb_test "continue" \
- "Continuing\\..*$inferior_exited_re.*" \
- "continuing to program completion"
+ "Continuing\\..*$inferior_exited_re.*" \
+ "continuing to program completion"
diff --git a/gdb/testsuite/gdb.ada/exception-lto.exp b/gdb/testsuite/gdb.ada/exception-lto.exp
index 42a5472..94f0483 100644
--- a/gdb/testsuite/gdb.ada/exception-lto.exp
+++ b/gdb/testsuite/gdb.ada/exception-lto.exp
@@ -24,7 +24,7 @@ require allow_ada_tests
standard_testfile .c
if {[build_executable "failed to prepare" $testfile $srcfile] == -1} {
- return -1
+ return
}
# Try this test in both the C and Ada language modes.
diff --git a/gdb/testsuite/gdb.ada/exec_changed.exp b/gdb/testsuite/gdb.ada/exec_changed.exp
index c52757e..8f64be3 100644
--- a/gdb/testsuite/gdb.ada/exec_changed.exp
+++ b/gdb/testsuite/gdb.ada/exec_changed.exp
@@ -25,7 +25,7 @@ standard_ada_testfile first
# Build the first test program (note that cygwin needs the $EXEEXT).
if {[gdb_compile_ada "${srcfile}" "${binfile}$EXEEXT" executable {debug}] != ""} {
- return -1
+ return
}
# Build the second test program
@@ -33,7 +33,7 @@ set srcfile2 ${srcdir}/${subdir}/${testdir}/second.adb
set binfile2 [standard_output_file second$EXEEXT]
if {[gdb_compile_ada "${srcfile2}" "${binfile2}" executable {debug}] != ""} {
- return -1
+ return
}
# Start with a fresh gdb.
@@ -52,12 +52,12 @@ gdb_load ${common_binfile}
# Start the program, we should land in the program main procedure
if { [gdb_start_cmd] < 0 } {
fail start
- return -1
+ return
}
gdb_test "" \
- "first \\(\\) at .*first.adb.*" \
- "start first"
+ "first \\(\\) at .*first.adb.*" \
+ "start first"
# Restore first executable to its original name, and move
# second executable into its place. Ensure that the new
@@ -78,13 +78,13 @@ if { [gdb_start_cmd] < 0 } {
fail "start second"
} else {
gdb_test "" \
- "second \\(\\) at .*second.adb.*" \
- "start second"
+ "second \\(\\) at .*second.adb.*" \
+ "start second"
}
# Try again, this time with just changing the file time of first.
-clean_restart "${binfile}$EXEEXT"
+clean_restart "${::testfile}$EXEEXT"
# Ensure we don't accidentally use the main symbol cache.
gdb_test_no_output "mt set symbol-cache-size 0"
diff --git a/gdb/testsuite/gdb.ada/expr_delims.exp b/gdb/testsuite/gdb.ada/expr_delims.exp
index f343774..332cc81 100644
--- a/gdb/testsuite/gdb.ada/expr_delims.exp
+++ b/gdb/testsuite/gdb.ada/expr_delims.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -36,32 +36,32 @@ gdb_run_cmd
gdb_test "" "Breakpoint $decimal, foo \\(\\).*" \
"run to foo"
gdb_test "continue" \
- "Continuing\\..*Breakpoint $decimal, foo \\(\\).*"
+ "Continuing\\..*Breakpoint $decimal, foo \\(\\).*"
# Make sure that "thread" may be used as a variable without being mistaken
# for an expression delimiter.
gdb_test "print thread" \
- "= 1" \
- "print variable 'thread'"
+ "= 1" \
+ "print variable 'thread'"
gdb_test_no_output "delete 1"
gdb_test "watch thread" \
- ".*atchpoint \[0-9\]+: thread" \
- "set plain watchpoint on variable 'thread'"
+ ".*atchpoint \[0-9\]+: thread" \
+ "set plain watchpoint on variable 'thread'"
# Make sure that 'if' when followed by an expression beginning
# with 'i' works.
gdb_test "watch thread if i = 2" \
- ".*atchpoint \[0-9\]+: thread" \
- "set conditional watchpoint."
+ ".*atchpoint \[0-9\]+: thread" \
+ "set conditional watchpoint."
gdb_test "info break" \
- ".*${ws}.*atchpoint${ws}keep${ws}y${ws}thread${ws}.*atchpoint${ws}keep${ws}y${ws}thread${ws}stop only if i = 2" \
- "check that watchpoint is set correctly."
+ ".*${ws}.*atchpoint${ws}keep${ws}y${ws}thread${ws}.*atchpoint${ws}keep${ws}y${ws}thread${ws}stop only if i = 2" \
+ "check that watchpoint is set correctly."
# Check for right error when using both 'if' and 'thread' clauses.
gdb_test "break foo.adb:$bp_location if thread = 10 thread 999" \
- ".*Unknown thread 999\\." \
- "combination of 'if' and 'thread' delimiters."
+ ".*Unknown thread 999\\." \
+ "combination of 'if' and 'thread' delimiters."
diff --git a/gdb/testsuite/gdb.ada/expr_with_funcall.exp b/gdb/testsuite/gdb.ada/expr_with_funcall.exp
index db73a7a..fc06b7a 100644
--- a/gdb/testsuite/gdb.ada/expr_with_funcall.exp
+++ b/gdb/testsuite/gdb.ada/expr_with_funcall.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile expr_r821_013
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/expr_with_funcall/expr_r821_013.adb b/gdb/testsuite/gdb.ada/expr_with_funcall/expr_r821_013.adb
index 8df4b17..ba12a53 100644
--- a/gdb/testsuite/gdb.ada/expr_with_funcall/expr_r821_013.adb
+++ b/gdb/testsuite/gdb.ada/expr_with_funcall/expr_r821_013.adb
@@ -20,4 +20,3 @@ procedure Expr_R821_013 is
begin
Do_Nothing (Val'Address); -- STOP
end Expr_R821_013;
-
diff --git a/gdb/testsuite/gdb.ada/exprs.exp b/gdb/testsuite/gdb.ada/exprs.exp
index 1a5a524..1ff5ed0 100644
--- a/gdb/testsuite/gdb.ada/exprs.exp
+++ b/gdb/testsuite/gdb.ada/exprs.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile p
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/extended-access.c b/gdb/testsuite/gdb.ada/extended-access.c
new file mode 100644
index 0000000..9a1b299
--- /dev/null
+++ b/gdb/testsuite/gdb.ada/extended-access.c
@@ -0,0 +1,38 @@
+/* This test program is part of GDB, the GNU debugger.
+
+ Copyright 2025 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
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+int array_data[] = { 23, 24, 25, 26, 27 };
+
+struct bounds
+{
+ int LB0;
+ int UB0;
+};
+
+struct extended_access_ptr
+{
+ int (*P_ARRAY)[];
+ struct bounds BOUNDS;
+};
+
+struct extended_access_ptr the_array = { &array_data, { 93, 97 } };
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/gdb/testsuite/gdb.ada/extended-access.exp b/gdb/testsuite/gdb.ada/extended-access.exp
new file mode 100644
index 0000000..c54c5f6
--- /dev/null
+++ b/gdb/testsuite/gdb.ada/extended-access.exp
@@ -0,0 +1,37 @@
+# Copyright 2025 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
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+require allow_ada_tests
+
+standard_testfile
+
+if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
+ return
+}
+
+# For riscv64-linux, we need to run to main, or the_array.p_array will still
+# be nullptr.
+if {![runto "main"]} {
+ return
+}
+
+# The test case is written in C, because it was easy to make the
+# required type there without requiring a new version of GNAT.
+gdb_test "set lang ada" \
+ [string_to_regexp \
+ "Warning: the current language does not match this frame."]
+
+gdb_test "print the_array.all" \
+ [string_to_regexp " = (93 => 23, 24, 25, 26, 27)"]
diff --git a/gdb/testsuite/gdb.ada/file-then-restart.exp b/gdb/testsuite/gdb.ada/file-then-restart.exp
index faa9962..40d0959 100644
--- a/gdb/testsuite/gdb.ada/file-then-restart.exp
+++ b/gdb/testsuite/gdb.ada/file-then-restart.exp
@@ -24,7 +24,7 @@ require !use_gdb_stub
standard_ada_testfile first
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
# Build the second test program
@@ -32,16 +32,16 @@ set srcfile2 ${srcdir}/${subdir}/${testdir}/second.adb
set binfile2 [standard_output_file second]
if {[gdb_compile_ada "${srcfile2}" "${binfile2}" executable {debug}] != ""} {
- return -1
+ return
}
foreach_with_prefix scenario {kill no-kill} {
- clean_restart $binfile
+ clean_restart $::testfile
# Start the program, we should land in the program main procedure
if {[gdb_start_cmd] < 0} {
fail start
- return -1
+ return
}
gdb_test "" \
diff --git a/gdb/testsuite/gdb.ada/fin_fun_out.exp b/gdb/testsuite/gdb.ada/fin_fun_out.exp
index 6ba7377..d71a31f 100644
--- a/gdb/testsuite/gdb.ada/fin_fun_out.exp
+++ b/gdb/testsuite/gdb.ada/fin_fun_out.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo_o525_013
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -33,8 +33,8 @@ runto "bar.f"
# to display, depending on the ABI. The objective of the test is
# to verify that we don't crash, so keep the expected output simple...
gdb_test "finish" \
- ".*Value returned.*"
+ ".*Value returned.*"
# Verify that GDB is still alive...
gdb_test "print 1" \
- "= 1"
+ "= 1"
diff --git a/gdb/testsuite/gdb.ada/finish-large.exp b/gdb/testsuite/gdb.ada/finish-large.exp
index 10cb840..61e7a79 100644
--- a/gdb/testsuite/gdb.ada/finish-large.exp
+++ b/gdb/testsuite/gdb.ada/finish-large.exp
@@ -26,7 +26,7 @@ if {[ada_fvar_tracking]} {
}
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/finish-var-size.exp b/gdb/testsuite/gdb.ada/finish-var-size.exp
index e038ed4..7486dcc 100644
--- a/gdb/testsuite/gdb.ada/finish-var-size.exp
+++ b/gdb/testsuite/gdb.ada/finish-var-size.exp
@@ -18,12 +18,18 @@ load_lib "ada.exp"
require allow_ada_tests
# GCC 12 has the needed fix.
-require {expr [gcc_major_version] >= 12}
+require {gnat_version_compare >= 12}
standard_ada_testfile p
-if {[gdb_compile_ada "${srcfile}" "${binfile}" executable debug] != ""} {
- return -1
+set opts {}
+lappend opts debug
+if { [ada_fvar_tracking] } {
+ lappend opts additional_flags=-fvar-tracking
+}
+
+if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $opts] != ""} {
+ return
}
clean_restart ${testfile}
@@ -34,7 +40,7 @@ set value [string_to_regexp "= (defined => true, payload => true)"]
# With some ABIs the return value cannot be determined. Accept this,
# or the correct result.
gdb_test "finish" \
- "Value returned .*($value|Cannot determine contents)"
+ "Value returned .*($value|Cannot determine contents)"
# Test that an inferior call yields the correct result.
gdb_test "print pck.get(True)" $value
diff --git a/gdb/testsuite/gdb.ada/fixed_cmp.exp b/gdb/testsuite/gdb.ada/fixed_cmp.exp
index 6d546f2..0385f8e 100644
--- a/gdb/testsuite/gdb.ada/fixed_cmp.exp
+++ b/gdb/testsuite/gdb.ada/fixed_cmp.exp
@@ -23,7 +23,7 @@ foreach_gnat_encoding gnat_encodings flags {all minimal} {
lappend flags debug
if {[gdb_compile_ada "${srcfile}" "${binfile}-${gnat_encodings}" executable $flags] != "" } {
- return -1
+ return
}
clean_restart ${testfile}-${gnat_encodings}
@@ -32,16 +32,16 @@ foreach_gnat_encoding gnat_encodings flags {all minimal} {
runto "fixed.adb:$bp_location"
gdb_test "print My_Var > 10.0" \
- "= true"
+ "= true"
gdb_test "print My_Var > 20.0" \
- "= false"
+ "= false"
# Do the same, but with integer values.
gdb_test "print My_Var > 10" \
- "= true"
+ "= true"
gdb_test "print My_Var > 20" \
- "= false"
+ "= false"
}
diff --git a/gdb/testsuite/gdb.ada/fixed_points.exp b/gdb/testsuite/gdb.ada/fixed_points.exp
index 8bb9e10..79df7af 100644
--- a/gdb/testsuite/gdb.ada/fixed_points.exp
+++ b/gdb/testsuite/gdb.ada/fixed_points.exp
@@ -22,7 +22,7 @@ standard_ada_testfile fixed_points
foreach_gnat_encoding scenario flags {all minimal} {
lappend flags debug
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
- return -1
+ return
}
clean_restart ${testfile}-${scenario}
@@ -90,6 +90,10 @@ foreach_gnat_encoding scenario flags {all minimal} {
# This only started working in GCC 11.
if {$scenario == "minimal" && [gnat_version_compare >= 11]} {
gdb_test "print fp5_var" " = 3e-19"
+
+ gdb_test "print Float(Object_Fixed) = Float(Semicircle_Delta * 5)" \
+ " = true" \
+ "examine object_fixed"
}
# This failed before GCC 10.
diff --git a/gdb/testsuite/gdb.ada/fixed_points/fixed_points.adb b/gdb/testsuite/gdb.ada/fixed_points/fixed_points.adb
index adab614..94a41b9 100644
--- a/gdb/testsuite/gdb.ada/fixed_points/fixed_points.adb
+++ b/gdb/testsuite/gdb.ada/fixed_points/fixed_points.adb
@@ -64,6 +64,12 @@ procedure Fixed_Points is
for Another_Type'size use 64;
Another_Fixed : Another_Type := Another_Delta * 5;
+ Semicircle_Delta : constant := 1.0/(2**31);
+ type Semicircle_Type is delta Semicircle_Delta range -1.0 .. (1.0 - Semicircle_Delta);
+ for Semicircle_Type'small use Semicircle_Delta;
+ for Semicircle_Type'size use 32;
+ Object_Fixed : Semicircle_Type := Semicircle_Delta * 5;
+
begin
Base_Object := 1.0/16.0; -- Set breakpoint here
Subtype_Object := 1.0/16.0;
@@ -75,4 +81,5 @@ begin
Do_Nothing (FP4_Var'Address);
Do_Nothing (FP5_Var'Address);
Do_Nothing (Another_Fixed'Address);
+ Do_Nothing (Object_Fixed'Address);
end Fixed_Points;
diff --git a/gdb/testsuite/gdb.ada/fixed_points/pck.adb b/gdb/testsuite/gdb.ada/fixed_points/pck.adb
index 06ff0af..00c9510 100644
--- a/gdb/testsuite/gdb.ada/fixed_points/pck.adb
+++ b/gdb/testsuite/gdb.ada/fixed_points/pck.adb
@@ -19,4 +19,3 @@ package body Pck is
null;
end Do_Nothing;
end pck;
-
diff --git a/gdb/testsuite/gdb.ada/fixed_points/pck.ads b/gdb/testsuite/gdb.ada/fixed_points/pck.ads
index 74a8144..e292644 100644
--- a/gdb/testsuite/gdb.ada/fixed_points/pck.ads
+++ b/gdb/testsuite/gdb.ada/fixed_points/pck.ads
@@ -36,4 +36,3 @@ package Pck is
procedure Do_Nothing (A : System.Address);
end pck;
-
diff --git a/gdb/testsuite/gdb.ada/fixed_points_function.exp b/gdb/testsuite/gdb.ada/fixed_points_function.exp
index 005ea07..2299fd3 100644
--- a/gdb/testsuite/gdb.ada/fixed_points_function.exp
+++ b/gdb/testsuite/gdb.ada/fixed_points_function.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile fixed_points_function
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -29,10 +29,10 @@ set bp_location [gdb_get_line_number "STOP" ${testdir}/fixed_points_function.adb
runto "fixed_points_function.adb:$bp_location"
gdb_test "print call_fp1(1)" \
- " = 1"
+ " = 1"
gdb_test "print call_fp1(0.5)" \
- " = 0.5"
+ " = 0.5"
gdb_test "print call_fp1(-0.5)" \
- " = -0.5"
+ " = -0.5"
diff --git a/gdb/testsuite/gdb.ada/float-bits.exp b/gdb/testsuite/gdb.ada/float-bits.exp
index 848cbc2..f000d5d 100644
--- a/gdb/testsuite/gdb.ada/float-bits.exp
+++ b/gdb/testsuite/gdb.ada/float-bits.exp
@@ -22,7 +22,7 @@ require allow_ada_tests
standard_ada_testfile prog
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
# Given a floating point EXPRESSION, return the size of the result.
diff --git a/gdb/testsuite/gdb.ada/float_param.exp b/gdb/testsuite/gdb.ada/float_param.exp
index 1fe0292..78384fa 100644
--- a/gdb/testsuite/gdb.ada/float_param.exp
+++ b/gdb/testsuite/gdb.ada/float_param.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
@@ -30,14 +30,12 @@ runto "foo.adb:$bp_location"
gdb_test_no_output "call set_float(2.0)"
gdb_test "print global_float" \
- " = 2\\.0"
+ " = 2\\.0"
gdb_test_no_output "call set_double(1, 3.0)"
gdb_test "print global_double" \
- " = 3\\.0"
+ " = 3\\.0"
gdb_test_no_output "call set_long_double(1, global_small_struct, 4.0)"
gdb_test "print global_long_double" \
- " = 4\\.0"
-
-
+ " = 4\\.0"
diff --git a/gdb/testsuite/gdb.ada/formatted_ref.exp b/gdb/testsuite/gdb.ada/formatted_ref.exp
index c63f847..b1ea6ea 100644
--- a/gdb/testsuite/gdb.ada/formatted_ref.exp
+++ b/gdb/testsuite/gdb.ada/formatted_ref.exp
@@ -16,8 +16,8 @@
# Author: P. N. Hilfinger, AdaCore Inc.
# Note: This test is essentially a transcription of gdb.cp/formatted-ref.exp,
-# and is thus much more wordy than it needs to be. There are fewer
-# tests because only a few parameter types in Ada are required to be
+# and is thus much more wordy than it needs to be. There are fewer
+# tests because only a few parameter types in Ada are required to be
# passed by reference, and there is no equivalent of &(&x) for reference
# values.
# This also tests that some other arithmetic operations on references
@@ -32,7 +32,7 @@ standard_ada_testfile formatted_ref
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
untested formatted-ref.exp
- return -1
+ return
}
proc get_address { var } {
@@ -41,8 +41,8 @@ proc get_address { var } {
gdb_test_multiple "print $var'access" "address of $var" {
-re "\\$\[0-9\]+ = \\(.*\\) (0x\[0-9a-f\]+).*$gdb_prompt $" {
- return $expect_out(1,string)
- }
+ return $expect_out(1,string)
+ }
}
return ""
}
@@ -52,15 +52,15 @@ proc test_p_x { var val addr } {
set test "print/x $var"
gdb_test_multiple "$test" $test {
- -re "\\$\[0-9\]+ = [string_to_regexp $val].*$gdb_prompt $" {
+ -re "\\$\[0-9\]+ = [string_to_regexp $val].*$gdb_prompt $" {
pass $test
- }
+ }
-re "\\$\[0-9\]+ = $addr.*$gdb_prompt $" {
- fail "$test (prints just address)"
- }
+ fail "$test (prints just address)"
+ }
-re "\\$\[0-9\]+ = 0x\[a-f0-9\]+.*$gdb_prompt $" {
- fail "$test (prints unexpected address)"
- }
+ fail "$test (prints unexpected address)"
+ }
}
return 0
}
diff --git a/gdb/testsuite/gdb.ada/frame_arg_lang.exp b/gdb/testsuite/gdb.ada/frame_arg_lang.exp
index 073c256..13a317f 100644
--- a/gdb/testsuite/gdb.ada/frame_arg_lang.exp
+++ b/gdb/testsuite/gdb.ada/frame_arg_lang.exp
@@ -33,7 +33,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
additional_flags=-margs
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
- return -1
+ return
}
clean_restart ${testfile}-${scenario}
diff --git a/gdb/testsuite/gdb.ada/frame_args.exp b/gdb/testsuite/gdb.ada/frame_args.exp
index 4ffc3d1..701a8a1 100644
--- a/gdb/testsuite/gdb.ada/frame_args.exp
+++ b/gdb/testsuite/gdb.ada/frame_args.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -32,15 +32,13 @@ set sp "\[ \t\]*"
if {![runto break_me]} {
return
-}
+}
# First, print all the arrays without indexes
gdb_test_no_output "set print frame-arguments scalars" \
- "set print frame-arguments scalars"
+ "set print frame-arguments scalars"
gdb_test "frame 1" \
- "#1$sp$any_addr in pck.call_me \\(int=1, flt=2.0, bln=true, ary=\\.\\.\\., chr=106 'j', sad=\\(system.address\\) $any_addr, rec=\\.\\.\\.\\).*" \
- "display frame 1 with frame-arguments set to scalars"
-
-
+ "#1$sp$any_addr in pck.call_me \\(int=1, flt=2.0, bln=true, ary=\\.\\.\\., chr=106 'j', sad=\\(system.address\\) $any_addr, rec=\\.\\.\\.\\).*" \
+ "display frame 1 with frame-arguments set to scalars"
diff --git a/gdb/testsuite/gdb.ada/frame_args/pck.adb b/gdb/testsuite/gdb.ada/frame_args/pck.adb
index 3fddae8..ba9ebac 100644
--- a/gdb/testsuite/gdb.ada/frame_args/pck.adb
+++ b/gdb/testsuite/gdb.ada/frame_args/pck.adb
@@ -33,4 +33,3 @@ package body Pck is
end Call_Me;
end Pck;
-
diff --git a/gdb/testsuite/gdb.ada/frame_args/pck.ads b/gdb/testsuite/gdb.ada/frame_args/pck.ads
index abb380c..9914553 100644
--- a/gdb/testsuite/gdb.ada/frame_args/pck.ads
+++ b/gdb/testsuite/gdb.ada/frame_args/pck.ads
@@ -34,4 +34,3 @@ package Pck is
Rec : Struct); -- Non scalar
end Pck;
-
diff --git a/gdb/testsuite/gdb.ada/fullname_bp.exp b/gdb/testsuite/gdb.ada/fullname_bp.exp
index 4ca1308..ae0f7d2 100644
--- a/gdb/testsuite/gdb.ada/fullname_bp.exp
+++ b/gdb/testsuite/gdb.ada/fullname_bp.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
# Note: We restart the debugger before setting each breakpoint, because
@@ -31,7 +31,7 @@ clean_restart ${testfile}
# Break on "pck.hello" rather than just "hello" to make sure we trigger
# the non-wild symbol lookup.
gdb_test "break pck.hello" \
- "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file .*pck.adb, line \[0-9\]+."
+ "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file .*pck.adb, line \[0-9\]+."
# Do the same, but this time using a linespec where the user also
# provided a filename.
@@ -39,7 +39,7 @@ gdb_test "break pck.hello" \
clean_restart ${testfile}
gdb_test "break pck.adb:pck.hello" \
- "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file .*pck.adb, line \[0-9\]+."
+ "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file .*pck.adb, line \[0-9\]+."
# Same scenarios as above, but with a function name that is spelled
# with upper-case letters.
@@ -47,9 +47,9 @@ gdb_test "break pck.adb:pck.hello" \
clean_restart ${testfile}
gdb_test "break Pck.Hello" \
- "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file .*pck.adb, line \[0-9\]+."
+ "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file .*pck.adb, line \[0-9\]+."
clean_restart ${testfile}
gdb_test "break pck.adb:Pck.Hello" \
- "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file .*pck.adb, line \[0-9\]+."
+ "Breakpoint \[0-9\]+ at 0x\[0-9a-f\]+: file .*pck.adb, line \[0-9\]+."
diff --git a/gdb/testsuite/gdb.ada/fullname_bp/pck.adb b/gdb/testsuite/gdb.ada/fullname_bp/pck.adb
index cf218e2..d2b823c 100644
--- a/gdb/testsuite/gdb.ada/fullname_bp/pck.adb
+++ b/gdb/testsuite/gdb.ada/fullname_bp/pck.adb
@@ -31,5 +31,3 @@ package body Pck is
null;
end There;
end Pck;
-
-
diff --git a/gdb/testsuite/gdb.ada/fullname_bp/pck.ads b/gdb/testsuite/gdb.ada/fullname_bp/pck.ads
index f2c7f6d..1cfc167 100644
--- a/gdb/testsuite/gdb.ada/fullname_bp/pck.ads
+++ b/gdb/testsuite/gdb.ada/fullname_bp/pck.ads
@@ -19,4 +19,3 @@ package Pck is
-- The name of that procedure needs to be greater (in terms
-- of alphabetical order) than the name of the procedure above.
end Pck;
-
diff --git a/gdb/testsuite/gdb.ada/fun_addr.exp b/gdb/testsuite/gdb.ada/fun_addr.exp
index 45fee79..ed22a9d 100644
--- a/gdb/testsuite/gdb.ada/fun_addr.exp
+++ b/gdb/testsuite/gdb.ada/fun_addr.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -29,4 +29,4 @@ clean_restart ${testfile}
# the inferior is *not* running (no frame).
gdb_test "print foo'address" \
- "= .* 0x\[0-9a-zA-Z\]+ <foo>"
+ "= .* 0x\[0-9a-zA-Z\]+ <foo>"
diff --git a/gdb/testsuite/gdb.ada/fun_in_declare.exp b/gdb/testsuite/gdb.ada/fun_in_declare.exp
index 9ababcf..60f7610 100644
--- a/gdb/testsuite/gdb.ada/fun_in_declare.exp
+++ b/gdb/testsuite/gdb.ada/fun_in_declare.exp
@@ -20,14 +20,14 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
if {![runto_main]} {
return
-}
+}
# Some variables used to simplify the maintenance of some of
# the regular expressions below.
@@ -36,10 +36,9 @@ set any_addr "0x\[0-9a-zA-Z\]+"
set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb]
gdb_test "break foo.adb:$bp_location" \
- "Breakpoint $any_nb at $any_addr: file .*foo.adb, line $any_nb." \
- "insert breakpoint inside foo.call_me"
+ "Breakpoint $any_nb at $any_addr: file .*foo.adb, line $any_nb." \
+ "insert breakpoint inside foo.call_me"
gdb_test "continue" \
- ".*Breakpoint $any_nb, foo\\.call_me \\(\\) at .*foo.adb:$any_nb.*" \
- "decoding of function name"
-
+ ".*Breakpoint $any_nb, foo\\.call_me \\(\\) at .*foo.adb:$any_nb.*" \
+ "decoding of function name"
diff --git a/gdb/testsuite/gdb.ada/fun_overload_menu.exp b/gdb/testsuite/gdb.ada/fun_overload_menu.exp
index b4d969a..117f1ff 100644
--- a/gdb/testsuite/gdb.ada/fun_overload_menu.exp
+++ b/gdb/testsuite/gdb.ada/fun_overload_menu.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "$srcfile" "$binfile" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -44,17 +44,17 @@ proc test_menu {expr function first second selection output} {
"> $"]
set test_name "multiple matches for $function {$expr}"
gdb_test_multiple "print $expr" "$test_name" {
- -re "$menu1" {
- pass "$test_name"
- }
- -re "$menu2" {
- pass "$test_name"
+ -re "$menu1" {
+ pass "$test_name"
+ }
+ -re "$menu2" {
+ pass "$test_name"
# Make sure we pick the correct one.
set selection [expr {3 - $selection}]
- }
- default {
- fail "$test_name"
- }
+ }
+ default {
+ fail "$test_name"
+ }
}
gdb_test "$selection" "$output"
}
diff --git a/gdb/testsuite/gdb.ada/fun_renaming.exp b/gdb/testsuite/gdb.ada/fun_renaming.exp
index 19fcb2f..05e0c29 100644
--- a/gdb/testsuite/gdb.ada/fun_renaming.exp
+++ b/gdb/testsuite/gdb.ada/fun_renaming.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile fun_renaming
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -38,48 +38,48 @@ gdb_test "print fun_rename_test_next(1)" " = 2"
set test "print fun_rename_test_n(1)"
gdb_test_multiple $test $test {
-wrap -re " = 2" {
- pass $test
+ pass $test
}
-wrap -re "No definition of \"fun_rename_test_n\" in current context\\." {
if {[gnat_version_compare >= 6]} {
- fail $test
- } else {
- xfail $test
- }
+ fail $test
+ } else {
+ xfail $test
+ }
}
}
set test "print renamed_fun_rename_test_next(1)"
gdb_test_multiple $test $test {
-wrap -re " = 2" {
- pass $test
+ pass $test
}
-wrap -re "No definition of \"renamed_fun_rename_test_next\" in current context\\." {
if {[gnat_version_compare >= 6]} {
- fail $test
- } else {
- xfail $test
- }
+ fail $test
+ } else {
+ xfail $test
+ }
}
}
set test "print pack.renamed_fun_rename_test_next(1)"
gdb_test_multiple $test $test {
-wrap -re " = 2" {
- pass $test
+ pass $test
}
-wrap -re "No definition of \"pack\\.renamed_fun_rename_test_next\" in current context\\." {
if {[gnat_version_compare >= 6]} {
- fail $test
- } else {
- xfail $test
- }
+ fail $test
+ } else {
+ xfail $test
+ }
}
-wrap -re "Type <data variable, no debug info> is not a structure or union type\\." {
if {[gnat_version_compare >= 6]} {
- fail $test
- } else {
- xfail $test
- }
+ fail $test
+ } else {
+ xfail $test
+ }
}
}
diff --git a/gdb/testsuite/gdb.ada/funcall_char.exp b/gdb/testsuite/gdb.ada/funcall_char.exp
index 1589741..108fcde 100644
--- a/gdb/testsuite/gdb.ada/funcall_char.exp
+++ b/gdb/testsuite/gdb.ada/funcall_char.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/funcall_param.exp b/gdb/testsuite/gdb.ada/funcall_param.exp
index a38ffeb..e3e7fe5 100644
--- a/gdb/testsuite/gdb.ada/funcall_param.exp
+++ b/gdb/testsuite/gdb.ada/funcall_param.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -32,4 +32,4 @@ runto "foo.adb:$bp_location"
# class-wide.
gdb_test "p ident (ident (my_parameter))" \
- "= \\(one => 1, two => 2, three => 3\\)" "value of ident"
+ "= \\(one => 1, two => 2, three => 3\\)" "value of ident"
diff --git a/gdb/testsuite/gdb.ada/funcall_ptr.exp b/gdb/testsuite/gdb.ada/funcall_ptr.exp
index b4c77f0..f20e990 100644
--- a/gdb/testsuite/gdb.ada/funcall_ptr.exp
+++ b/gdb/testsuite/gdb.ada/funcall_ptr.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "$srcfile" "$binfile" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -29,7 +29,7 @@ set bp_location [gdb_get_line_number "BREAK" ${testdir}/foo.adb]
runto "foo.adb:$bp_location"
gdb_test "print pck.ga" " = \\(access integer\\) 0x0" \
- "Check that initial value of GA is null"
+ "Check that initial value of GA is null"
gdb_test_no_output "call pck.p(0x1234)"
@@ -39,4 +39,4 @@ gdb_test_no_output "call pck.p(0x1234)"
# procedure hence should be 0x1234 after the call above.
gdb_test "print pck.ga" " = \\(access integer\\) 0x1234" \
- "Check that value of GA is 0x1234"
+ "Check that value of GA is 0x1234"
diff --git a/gdb/testsuite/gdb.ada/funcall_ref.exp b/gdb/testsuite/gdb.ada/funcall_ref.exp
index d72110c..8e6bbc6 100644
--- a/gdb/testsuite/gdb.ada/funcall_ref.exp
+++ b/gdb/testsuite/gdb.ada/funcall_ref.exp
@@ -26,7 +26,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
lappend flags debug
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
- return -1
+ return
}
clean_restart ${testfile}-${scenario}
@@ -81,7 +81,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
}
if { $supported == 0 } {
- return 0
+ return
}
gdb_test "p get(\"Hello world!\")" \
diff --git a/gdb/testsuite/gdb.ada/ghost.exp b/gdb/testsuite/gdb.ada/ghost.exp
index 78e6f39..1758ea8 100644
--- a/gdb/testsuite/gdb.ada/ghost.exp
+++ b/gdb/testsuite/gdb.ada/ghost.exp
@@ -21,7 +21,7 @@ standard_ada_testfile main
set flags [list debug additional_flags=-gnata]
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/homonym.exp b/gdb/testsuite/gdb.ada/homonym.exp
index 97a2ee2..778507c 100644
--- a/gdb/testsuite/gdb.ada/homonym.exp
+++ b/gdb/testsuite/gdb.ada/homonym.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile homonym_main
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -51,24 +51,24 @@ runto "homonym.adb:$bp_location"
# sure that the debugger doesn't get mixed up.
gdb_test "ptype local_type" \
- "type = range -100 \\.\\. 100" \
- "ptype local_type at BREAK_1"
+ "type = range -100 \\.\\. 100" \
+ "ptype local_type at BREAK_1"
gdb_test "ptype local_type_subtype" \
- "type = range -100 \\.\\. 100" \
- "ptype local_type_subtype at BREAK_1"
+ "type = range -100 \\.\\. 100" \
+ "ptype local_type_subtype at BREAK_1"
gdb_test "ptype int_type" \
- "type = range -100 \\.\\. 100" \
- "ptype int_type at BREAK_1"
+ "type = range -100 \\.\\. 100" \
+ "ptype int_type at BREAK_1"
gdb_test "ptype lcl" \
- "type = range -100 \\.\\. 100" \
- "ptype lcl at BREAK_1"
+ "type = range -100 \\.\\. 100" \
+ "ptype lcl at BREAK_1"
gdb_test "print lcl" \
- "= 29" \
- "print lcl at BREAK_1"
+ "= 29" \
+ "print lcl at BREAK_1"
# Now, continue until reaching BREAK_2, and do the same commands
# as above. The result should be different since the definitions
@@ -76,25 +76,25 @@ gdb_test "print lcl" \
set bp_location [gdb_get_line_number "BREAK_2" ${testdir}/homonym.adb]
gdb_test "break homonym.adb:$bp_location" \
- "Breakpoint \[0-9\]+ at 0x\[0-9a-fA-F\]+: file .*homonym\\.adb, line \[0-9\]+\\." \
- "break at BREAK_2"
+ "Breakpoint \[0-9\]+ at 0x\[0-9a-fA-F\]+: file .*homonym\\.adb, line \[0-9\]+\\." \
+ "break at BREAK_2"
gdb_test "continue" \
- ".*Breakpoint \[0-9\]+, homonym\\.get_value \\(\\) at .*homonym\\.adb:.*" \
- "continue until BREAK_2"
+ ".*Breakpoint \[0-9\]+, homonym\\.get_value \\(\\) at .*homonym\\.adb:.*" \
+ "continue until BREAK_2"
gdb_test "ptype local_type" \
- "type = range 1 \\.\\. 19740804" \
- "ptype local_type at BREAK_2"
+ "type = range 1 \\.\\. 19740804" \
+ "ptype local_type at BREAK_2"
gdb_test "ptype local_type_subtype" \
- "type = range 1 \\.\\. 19740804" \
- "ptype local_type_subtype at BREAK_2"
+ "type = range 1 \\.\\. 19740804" \
+ "ptype local_type_subtype at BREAK_2"
gdb_test "ptype lcl" \
- "type = range 1 \\.\\. 19740804" \
- "ptype lcl at BREAK_2"
+ "type = range 1 \\.\\. 19740804" \
+ "ptype lcl at BREAK_2"
gdb_test "print lcl" \
- "= 17" \
- "print lcl at BREAK_2"
+ "= 17" \
+ "print lcl at BREAK_2"
diff --git a/gdb/testsuite/gdb.ada/huge.exp b/gdb/testsuite/gdb.ada/huge.exp
index 9a86804..7bf7003 100644
--- a/gdb/testsuite/gdb.ada/huge.exp
+++ b/gdb/testsuite/gdb.ada/huge.exp
@@ -34,7 +34,7 @@ set opts {}
lappend opts debug
set compilation_succeeded 0
-for { set size $max } { $size >= $min } { set size [expr $size / 2] } {
+for { set size $max } { $size >= $min } { set size [expr {$size / 2}] } {
set try_opts [concat $opts [list additional_flags=-gnateDCRASHGDB=$size]]
# Use gdb_compile_ada_1 to prevent failed compilations from producing a
# FAIL.
@@ -46,7 +46,7 @@ for { set size $max } { $size >= $min } { set size [expr $size / 2] } {
set compilation_succeeded 1
break
}
-require {expr $compilation_succeeded}
+require {expr {$compilation_succeeded}}
foreach_with_prefix varname {Arr Packed_Arr} {
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/import.exp b/gdb/testsuite/gdb.ada/import.exp
index ab3a1c9..28b030d 100644
--- a/gdb/testsuite/gdb.ada/import.exp
+++ b/gdb/testsuite/gdb.ada/import.exp
@@ -21,7 +21,7 @@ require allow_ada_tests
# declarations only") is required. The commit makes sure that file-scope
# function and variable declarations are emitted in dwarf. This allows the
# description of imported entries, making them available to the debugger.
-require {expr [gcc_major_version] >= 8}
+require {gnat_version_compare >= 8}
standard_ada_testfile prog
@@ -36,7 +36,7 @@ if {[gdb_compile "${csrcfile}" "${cobject}" object debug] != ""} {
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable \
[list debug additional_flags=-largs \
additional_flags=${cobject} additional_flags=-margs]] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
@@ -54,6 +54,9 @@ gdb_test "print pkg.imported_var_ada" " = 42"
gdb_test "print pkg.exported_var_ada" " = 99"
gdb_test "print exported_var_ada" " = 99"
+gdb_breakpoint "local_imported_func" message
+gdb_test "print copy" " = 42"
+
# This passes with gcc 10 but fails with gcc 9. With gcc 9, we have:
# <1><1659>: Abbrev Number: 4 (DW_TAG_subprogram)
# <165a> DW_AT_external : 1
@@ -76,19 +79,16 @@ gdb_test "print exported_var_ada" " = 99"
# The fact that things start to work when adding the DW_AT_declaration is
# consistent with what is described in commit ff9baa5f1c5, so xfail this
# (without pinpointing it to a specific gcc PR or commit).
-if { [gcc_major_version] < 10 } {
- setup_xfail *-*-*
-}
-gdb_breakpoint "pkg.imported_func_ada" message
-gdb_breakpoint "imported_func" message
-if { [gcc_major_version] < 10 } {
- setup_xfail *-*-*
+foreach func {"pkg.imported_func_ada" "imported_func"} {
+ clean_restart $testfile
+ if { [gnat_version_compare < 10] } {
+ setup_xfail *-*-*
+ }
+ gdb_breakpoint $func message
}
-gdb_breakpoint "imported_func_ada" message
-gdb_breakpoint "local_imported_func" message
-gdb_breakpoint "pkg.exported_func_ada" message
-gdb_breakpoint "exported_func_ada" message
-gdb_breakpoint "exported_func" message
-
-gdb_test "print copy" " = 42"
+foreach func {"imported_func_ada" "pkg.exported_func_ada" \
+ "exported_func_ada" "exported_func"} {
+ clean_restart $testfile
+ gdb_breakpoint $func message
+}
diff --git a/gdb/testsuite/gdb.ada/info_addr_mixed_case.exp b/gdb/testsuite/gdb.ada/info_addr_mixed_case.exp
index 2ae4cf6..998a4a9 100644
--- a/gdb/testsuite/gdb.ada/info_addr_mixed_case.exp
+++ b/gdb/testsuite/gdb.ada/info_addr_mixed_case.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/info_addr_mixed_case/pck.adb b/gdb/testsuite/gdb.ada/info_addr_mixed_case/pck.adb
index 656c81e..b73846c 100644
--- a/gdb/testsuite/gdb.ada/info_addr_mixed_case/pck.adb
+++ b/gdb/testsuite/gdb.ada/info_addr_mixed_case/pck.adb
@@ -21,4 +21,3 @@ package body Pck is
end Do_Nothing;
end Pck;
-
diff --git a/gdb/testsuite/gdb.ada/info_addr_mixed_case/pck.ads b/gdb/testsuite/gdb.ada/info_addr_mixed_case/pck.ads
index af0c2aa..650b0d5 100644
--- a/gdb/testsuite/gdb.ada/info_addr_mixed_case/pck.ads
+++ b/gdb/testsuite/gdb.ada/info_addr_mixed_case/pck.ads
@@ -32,4 +32,3 @@ package Pck is
procedure Do_Nothing (A : System.Address);
end Pck;
-
diff --git a/gdb/testsuite/gdb.ada/info_auto_lang.exp b/gdb/testsuite/gdb.ada/info_auto_lang.exp
index 805257e..3520ab4 100644
--- a/gdb/testsuite/gdb.ada/info_auto_lang.exp
+++ b/gdb/testsuite/gdb.ada/info_auto_lang.exp
@@ -35,11 +35,11 @@ set cobject [standard_output_file ${cfile}.o]
if { [gdb_compile "${csrcfile}" "${cobject}" object [list debug]] != "" } {
untested "failed to compile"
- return -1
+ return
}
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
untested "failed to compile"
- return -1
+ return
}
clean_restart ${testfile}
@@ -160,4 +160,3 @@ foreach_with_prefix language_choice { "auto" "ada" "c" } {
}
}
}
-
diff --git a/gdb/testsuite/gdb.ada/info_exc.exp b/gdb/testsuite/gdb.ada/info_exc.exp
index c2ab2f9..8d1f06d 100644
--- a/gdb/testsuite/gdb.ada/info_exc.exp
+++ b/gdb/testsuite/gdb.ada/info_exc.exp
@@ -20,35 +20,35 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
if {![runto_main]} {
- return 0
+ return
}
gdb_test "info exceptions" \
[multi_line "All defined Ada exceptions:" \
- "constraint_error: $hex" \
- "program_error: $hex" \
- "storage_error: $hex" \
- "tasking_error: $hex" \
- ".*\[\r\n\]*const.aint_global_gdb_e: $hex\[\r\n\]*.*" ]
+ "constraint_error: $hex" \
+ "program_error: $hex" \
+ "storage_error: $hex" \
+ "tasking_error: $hex" \
+ ".*\[\r\n\]*const.aint_global_gdb_e: $hex\[\r\n\]*.*" ]
gdb_test "info exceptions task" \
[multi_line "All Ada exceptions matching regular expression \"task\":" \
- "tasking_error: $hex"]
+ "tasking_error: $hex"]
gdb_test "info exceptions global_gdb" \
[multi_line "All Ada exceptions matching regular expression \"global_gdb\":" \
- "const.aint_global_gdb_e: $hex"]
+ "const.aint_global_gdb_e: $hex"]
gdb_test "info exceptions const.aint" \
[multi_line "All Ada exceptions matching regular expression \"const\\.aint\":" \
- "constraint_error: $hex" \
- "const.aint_global_gdb_e: $hex"]
+ "constraint_error: $hex" \
+ "const.aint_global_gdb_e: $hex"]
foreach cmd {exception handlers} {
gdb_test "complete catch $cmd const.a" \
diff --git a/gdb/testsuite/gdb.ada/info_locals_renaming.exp b/gdb/testsuite/gdb.ada/info_locals_renaming.exp
index 794474c..eb79704 100644
--- a/gdb/testsuite/gdb.ada/info_locals_renaming.exp
+++ b/gdb/testsuite/gdb.ada/info_locals_renaming.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
@@ -29,4 +29,3 @@ set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb]
runto "foo.adb:$bp_location"
gdb_test "info locals" "gv = 1"
-
diff --git a/gdb/testsuite/gdb.ada/info_types.c b/gdb/testsuite/gdb.ada/info_types.c
index 34c7447..6de9100 100644
--- a/gdb/testsuite/gdb.ada/info_types.c
+++ b/gdb/testsuite/gdb.ada/info_types.c
@@ -31,4 +31,3 @@ main (void)
do_something(&toto);
return 0;
}
-
diff --git a/gdb/testsuite/gdb.ada/info_types.exp b/gdb/testsuite/gdb.ada/info_types.exp
index 370f810..476c693 100644
--- a/gdb/testsuite/gdb.ada/info_types.exp
+++ b/gdb/testsuite/gdb.ada/info_types.exp
@@ -18,7 +18,7 @@ require allow_ada_tests
standard_testfile .c
if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
- return -1
+ return
}
# Force the language to Ada. We used a C program because it was trivial
@@ -29,5 +29,4 @@ gdb_test "set lang ada" ""
set eol "\r\n"
gdb_test "info types new_integer_type" \
- "All types matching regular expression \"new_integer_type\":${eol}${eol}File .*info_types.c:${eol}.*\tint"
-
+ "All types matching regular expression \"new_integer_type\":${eol}${eol}File .*info_types.c:${eol}.*\tint"
diff --git a/gdb/testsuite/gdb.ada/inline-section-gc.exp b/gdb/testsuite/gdb.ada/inline-section-gc.exp
index 7965b02..5e9105e 100644
--- a/gdb/testsuite/gdb.ada/inline-section-gc.exp
+++ b/gdb/testsuite/gdb.ada/inline-section-gc.exp
@@ -35,7 +35,7 @@ set options {
additional_flags=-margs
}
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $options] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/int_deref.exp b/gdb/testsuite/gdb.ada/int_deref.exp
index 4d989db..7308e78 100644
--- a/gdb/testsuite/gdb.ada/int_deref.exp
+++ b/gdb/testsuite/gdb.ada/int_deref.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -31,11 +31,10 @@ runto "foo.adb:$bp_location"
# Hijack a bit this testcase, to verify that name decoding works
# when doing symbolic address printing.
gdb_test "print watch'address" \
- " = \\(system\\.address\\) $hex <pck\\.watch>"
+ " = \\(system\\.address\\) $hex <pck\\.watch>"
gdb_test "print *long_integer(watch'address)" \
- " = 4874"
+ " = 4874"
gdb_test "print long_integer(watch'address).all" \
- " = 4874"
-
+ " = 4874"
diff --git a/gdb/testsuite/gdb.ada/interface.exp b/gdb/testsuite/gdb.ada/interface.exp
index 5b42944..b46cf57 100644
--- a/gdb/testsuite/gdb.ada/interface.exp
+++ b/gdb/testsuite/gdb.ada/interface.exp
@@ -22,7 +22,7 @@ require gnat_runtime_has_debug_info
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnat05 ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -31,10 +31,10 @@ set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb]
runto "foo.adb:$bp_location"
gdb_test "print r" \
- "= \\(x => 1, y => 2, w => 3, h => 4\\)"
+ "= \\(x => 1, y => 2, w => 3, h => 4\\)"
gdb_test "print s" \
- "= \\(x => 1, y => 2, w => 3, h => 4\\)"
+ "= \\(x => 1, y => 2, w => 3, h => 4\\)"
set r_re "r = \[^\r\n\]*"
set s_re "s = \[^\r\n\]*"
diff --git a/gdb/testsuite/gdb.ada/interface/foo.adb b/gdb/testsuite/gdb.ada/interface/foo.adb
index 0c0da6d..f28d89e 100644
--- a/gdb/testsuite/gdb.ada/interface/foo.adb
+++ b/gdb/testsuite/gdb.ada/interface/foo.adb
@@ -22,4 +22,3 @@ begin
Do_Nothing (R); -- STOP
Do_Nothing (S);
end Foo;
-
diff --git a/gdb/testsuite/gdb.ada/interface/types.adb b/gdb/testsuite/gdb.ada/interface/types.adb
index 43d54e1..f967d84 100644
--- a/gdb/testsuite/gdb.ada/interface/types.adb
+++ b/gdb/testsuite/gdb.ada/interface/types.adb
@@ -26,4 +26,3 @@ package body Types is
end Do_Nothing;
end Types;
-
diff --git a/gdb/testsuite/gdb.ada/interface/types.ads b/gdb/testsuite/gdb.ada/interface/types.ads
index e0fdaba..e7a46b2 100644
--- a/gdb/testsuite/gdb.ada/interface/types.ads
+++ b/gdb/testsuite/gdb.ada/interface/types.ads
@@ -39,4 +39,3 @@ package Types is
end record;
end Types;
-
diff --git a/gdb/testsuite/gdb.ada/iterated-assign.exp b/gdb/testsuite/gdb.ada/iterated-assign.exp
index 8afaa16..fcee906 100644
--- a/gdb/testsuite/gdb.ada/iterated-assign.exp
+++ b/gdb/testsuite/gdb.ada/iterated-assign.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile main
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/iwide.exp b/gdb/testsuite/gdb.ada/iwide.exp
index b6cc8fe..3029f89 100644
--- a/gdb/testsuite/gdb.ada/iwide.exp
+++ b/gdb/testsuite/gdb.ada/iwide.exp
@@ -22,7 +22,7 @@ require gnat_runtime_has_debug_info
standard_ada_testfile p
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnat05 ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -52,16 +52,16 @@ gdb_test_multiple "" "Runto to $bp_location" {
}
gdb_test "print My_Drawable" \
- "= \\(center => \\(x => 1, y => 2\\), radius => 3\\)"
+ "= \\(center => \\(x => 1, y => 2\\), radius => 3\\)"
gdb_test "print s_access.all" \
- "\\(center => \\(x => 1, y => 2\\), radius => 3\\)"
+ "\\(center => \\(x => 1, y => 2\\), radius => 3\\)"
gdb_test "print sp_access.all" \
- "\\(center => \\(x => 1, y => 2\\), radius => 3\\)"
+ "\\(center => \\(x => 1, y => 2\\), radius => 3\\)"
gdb_test "print d_access.all" \
- "\\(center => \\(x => 1, y => 2\\), radius => 3\\)"
+ "\\(center => \\(x => 1, y => 2\\), radius => 3\\)"
gdb_test "print dp_access.all" \
- "\\(center => \\(x => 1, y => 2\\), radius => 3\\)"
+ "\\(center => \\(x => 1, y => 2\\), radius => 3\\)"
diff --git a/gdb/testsuite/gdb.ada/lang_switch.exp b/gdb/testsuite/gdb.ada/lang_switch.exp
index 4ab8fa3..7f40c29 100644
--- a/gdb/testsuite/gdb.ada/lang_switch.exp
+++ b/gdb/testsuite/gdb.ada/lang_switch.exp
@@ -24,7 +24,7 @@ set cobject [standard_output_file ${cfile}.o]
gdb_compile "${csrcfile}" "${cobject}" object [list debug]
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -37,8 +37,8 @@ gdb_test_no_output "set print frame-arguments all"
# Make sure that the language is switched to Ada for the second frame
# by checking the string parameter.
gdb_test "bt" \
- ".*#1.*lang_switch\\.ada_procedure\\s*\\(msg=\"msg\"\\).*" \
- "backtrace"
+ ".*#1.*lang_switch\\.ada_procedure\\s*\\(msg=\"msg\"\\).*" \
+ "backtrace"
# Now, make sure that the language doesn't get automatically switched
# if the current language is not "auto".
@@ -47,5 +47,5 @@ gdb_test "set lang c"
# -fgnat-encodings=all, but since we don't care so much about the
# precise details here, we just accept anything.
gdb_test "bt" \
- ".*#1.*lang_switch\\.ada_procedure\\s*\\(msg=(@$hex: +)?.*\\).*" \
- "backtrace with lang set to C"
+ ".*#1.*lang_switch\\.ada_procedure\\s*\\(msg=(@$hex: +)?.*\\).*" \
+ "backtrace with lang set to C"
diff --git a/gdb/testsuite/gdb.ada/lazy-string.exp b/gdb/testsuite/gdb.ada/lazy-string.exp
index 11c5c04..2ec5065 100644
--- a/gdb/testsuite/gdb.ada/lazy-string.exp
+++ b/gdb/testsuite/gdb.ada/lazy-string.exp
@@ -26,7 +26,7 @@ standard_ada_testfile main
setenv LC_ALL C.UTF-8
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/length_cond.exp b/gdb/testsuite/gdb.ada/length_cond.exp
index 070179b..12ccc00 100644
--- a/gdb/testsuite/gdb.ada/length_cond.exp
+++ b/gdb/testsuite/gdb.ada/length_cond.exp
@@ -23,7 +23,7 @@ require allow_ada_tests
standard_ada_testfile length_cond
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable debug] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/limited-length.exp b/gdb/testsuite/gdb.ada/limited-length.exp
index 7172c37..3e8b663 100644
--- a/gdb/testsuite/gdb.ada/limited-length.exp
+++ b/gdb/testsuite/gdb.ada/limited-length.exp
@@ -21,7 +21,7 @@ standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable \
[list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -70,7 +70,7 @@ with_test_prefix "with standard max-value size" {
# Set the max-value-size so we can only print 33 elements.
set elements 33
set elem_size [get_valueof "/d" "(Large_1d_Array(1)'Size + 7) / 8" "*unknown*"]
-gdb_test_no_output "set max-value-size [expr $elem_size * $elements]"
+gdb_test_no_output "set max-value-size [expr {$elem_size * $elements}]"
with_test_prefix "with reduced max-value size" {
# GNAT historically named this type, but as the array type is
diff --git a/gdb/testsuite/gdb.ada/limited-length/foo.adb b/gdb/testsuite/gdb.ada/limited-length/foo.adb
index b269ce2..c7e78e5 100644
--- a/gdb/testsuite/gdb.ada/limited-length/foo.adb
+++ b/gdb/testsuite/gdb.ada/limited-length/foo.adb
@@ -34,4 +34,3 @@ begin
Do_Nothing (Large_1d_Array'Address);
Do_Nothing (Large_3d_Array'Address); -- STOP
end Foo;
-
diff --git a/gdb/testsuite/gdb.ada/local-enum.exp b/gdb/testsuite/gdb.ada/local-enum.exp
index 2a480da..cb071ea 100644
--- a/gdb/testsuite/gdb.ada/local-enum.exp
+++ b/gdb/testsuite/gdb.ada/local-enum.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile local
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable debug] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/maint_with_ada.exp b/gdb/testsuite/gdb.ada/maint_with_ada.exp
index d793d60..a03371f 100644
--- a/gdb/testsuite/gdb.ada/maint_with_ada.exp
+++ b/gdb/testsuite/gdb.ada/maint_with_ada.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile var_arr_typedef
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/mi_catch_assert.exp b/gdb/testsuite/gdb.ada/mi_catch_assert.exp
index 1b4609a..eb5ffec 100644
--- a/gdb/testsuite/gdb.ada/mi_catch_assert.exp
+++ b/gdb/testsuite/gdb.ada/mi_catch_assert.exp
@@ -20,13 +20,13 @@ require allow_ada_tests gnat_runtime_has_debug_info
standard_ada_testfile bla
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnata ]] != "" } {
- return -1
+ return
}
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
###################################################
# 2. Try catching conditionnal failed assertion. #
@@ -39,19 +39,19 @@ mi_clean_restart $binfile
# - continue, the program exits.
if {[mi_runto_main] < 0} {
- return 0
+ return
}
mi_gdb_test "-catch-assert -c \"Global_Var = 2\"" \
- "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"failed Ada assertions\",.*,cond=\"Global_Var = 2\",.*}" \
- "catch assert failures with condition"
+ "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"failed Ada assertions\",.*,cond=\"Global_Var = 2\",.*}" \
+ "catch assert failures with condition"
set bp_location [gdb_get_line_number "STOP" ${testdir}/bla.adb]
mi_execute_to "exec-continue" \
- "\"breakpoint-hit\",disp=\"keep\",bkptno=\"$decimal\"" \
- "bla" "" ".*" "$bp_location" \
- ".*" \
- "continue to assert failure catchpoint hit"
+ "\"breakpoint-hit\",disp=\"keep\",bkptno=\"$decimal\"" \
+ "bla" "" ".*" "$bp_location" \
+ ".*" \
+ "continue to assert failure catchpoint hit"
# Exit the inferior.
mi_send_resuming_command "exec-continue" "continuing to inferior exit"
diff --git a/gdb/testsuite/gdb.ada/mi_catch_assert/pck.ads b/gdb/testsuite/gdb.ada/mi_catch_assert/pck.ads
index 62409d5..3f48421 100644
--- a/gdb/testsuite/gdb.ada/mi_catch_assert/pck.ads
+++ b/gdb/testsuite/gdb.ada/mi_catch_assert/pck.ads
@@ -16,4 +16,3 @@
package Pck is
Global_Var : Integer := 0;
end Pck;
-
diff --git a/gdb/testsuite/gdb.ada/mi_catch_ex.exp b/gdb/testsuite/gdb.ada/mi_catch_ex.exp
index da3d340..d1bd9ed 100644
--- a/gdb/testsuite/gdb.ada/mi_catch_ex.exp
+++ b/gdb/testsuite/gdb.ada/mi_catch_ex.exp
@@ -20,7 +20,7 @@ require allow_ada_tests gnat_runtime_has_debug_info
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnata ]] != "" } {
- return -1
+ return
}
# A global variable used to simplify the maintenance of some of
@@ -30,7 +30,7 @@ set any_nb "\[0-9\]+"
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
####################################
# 1. Try catching all exceptions. #
@@ -38,13 +38,13 @@ mi_clean_restart $binfile
with_test_prefix "scenario 1" {
if {[mi_runto_main] < 0} {
- return 0
+ return
}
}
mi_gdb_test "-catch-exception" \
- "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"all Ada exceptions\",.*}" \
- "catch all exceptions"
+ "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"all Ada exceptions\",.*}" \
+ "catch all exceptions"
# Continue to caught exception.
@@ -59,7 +59,7 @@ proc continue_to_exception { exception_name exception_message test } {
}
timeout {
fail "$test (timeout)"
- return -1
+ return
}
}
@@ -96,37 +96,36 @@ continue_to_exception \
with_test_prefix "scenario 2" {
mi_delete_breakpoints
if {[mi_runto_main] < 0} {
- return 0
+ return
}
}
mi_gdb_test "-catch-exception -e Program_Error" \
- "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"`Program_Error' Ada exception\",.*}" \
- "catch Program_Error"
+ "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"`Program_Error' Ada exception\",.*}" \
+ "catch Program_Error"
mi_gdb_test "-catch-assert" \
- "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"failed Ada assertions\",.*}" \
- "catch assert failures"
+ "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"failed Ada assertions\",.*}" \
+ "catch assert failures"
mi_gdb_test "-catch-exception -u" \
- "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"unhandled Ada exceptions\",.*}" \
- "catch unhandled exceptions"
+ "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"unhandled Ada exceptions\",.*}" \
+ "catch unhandled exceptions"
mi_execute_to "exec-continue" \
- "\"breakpoint-hit\",disp=\"keep\",bkptno=\"$any_nb\",exception-name=\"PROGRAM_ERROR(\",exception-message=\"foo\\.adb:$decimal explicit raise)?\"" \
- "foo" "" ".*" ".*" \
- ".*" \
- "continue to exception catchpoint hit"
+ "\"breakpoint-hit\",disp=\"keep\",bkptno=\"$any_nb\",exception-name=\"PROGRAM_ERROR(\",exception-message=\"foo\\.adb:$decimal explicit raise)?\"" \
+ "foo" "" ".*" ".*" \
+ ".*" \
+ "continue to exception catchpoint hit"
mi_execute_to "exec-continue" \
- "\"breakpoint-hit\",disp=\"keep\",bkptno=\"$any_nb\"" \
- "foo" "" ".*" ".*" \
- ".*" \
- "continue to assert failure catchpoint hit"
+ "\"breakpoint-hit\",disp=\"keep\",bkptno=\"$any_nb\"" \
+ "foo" "" ".*" ".*" \
+ ".*" \
+ "continue to assert failure catchpoint hit"
mi_execute_to "exec-continue" \
- "\"breakpoint-hit\",disp=\"keep\",bkptno=\"$any_nb\",exception-name=\"CONSTRAINT_ERROR\"" \
- "foo" "" ".*" ".*" \
- ".*" \
- "continue to unhandled exception catchpoint hit"
-
+ "\"breakpoint-hit\",disp=\"keep\",bkptno=\"$any_nb\",exception-name=\"CONSTRAINT_ERROR\"" \
+ "foo" "" ".*" ".*" \
+ ".*" \
+ "continue to unhandled exception catchpoint hit"
diff --git a/gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp b/gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp
index 00e8f6e..3300795 100644
--- a/gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp
+++ b/gdb/testsuite/gdb.ada/mi_catch_ex_hand.exp
@@ -20,13 +20,13 @@ require allow_ada_tests gnat_runtime_has_debug_info
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnata ]] != "" } {
- return -1
+ return
}
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
#############################################
# 1. Try catching all exceptions handlers. #
@@ -34,13 +34,13 @@ mi_clean_restart $binfile
with_test_prefix "scenario 1" {
if {[mi_runto_main] < 0} {
- return 0
+ return
}
}
mi_gdb_test "-catch-handlers" \
- "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"all Ada exceptions handlers\",.*}" \
- "catch all exceptions handlers"
+ "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"all Ada exceptions handlers\",.*}" \
+ "catch all exceptions handlers"
# Continue to exception handler.
@@ -55,7 +55,7 @@ proc continue_to_exception_handler { test line } {
"\"breakpoint-hit\",disp=\"keep\",bkptno=\"$decimal\",exception-name=\"exception\"" \
"foo" "" ".*" "$line" \
".*" \
- $test
+ $test
}
# We don't have the exception name info when stopping at the exception handlers
@@ -86,19 +86,19 @@ continue_to_exception_handler \
with_test_prefix "scenario 2" {
mi_delete_breakpoints
if {[mi_runto_main] < 0} {
- return 0
+ return
}
}
mi_gdb_test "-catch-handlers -e Constraint_Error" \
- "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"`Constraint_Error' Ada exception handlers\",.*}" \
- "catch Constraint_Error"
+ "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"`Constraint_Error' Ada exception handlers\",.*}" \
+ "catch Constraint_Error"
mi_execute_to "exec-continue" \
- "\"breakpoint-hit\",disp=\"keep\",bkptno=\"$decimal\",exception-name=\"exception\"" \
- "foo" "" ".*" "$bp_ce_location" \
- ".*" \
- "continue to exception catchpoint hit"
+ "\"breakpoint-hit\",disp=\"keep\",bkptno=\"$decimal\",exception-name=\"exception\"" \
+ "foo" "" ".*" "$bp_ce_location" \
+ ".*" \
+ "continue to exception catchpoint hit"
# Exit the inferior.
mi_send_resuming_command "exec-continue" "continuing to inferior exit"
diff --git a/gdb/testsuite/gdb.ada/mi_dyn_arr.exp b/gdb/testsuite/gdb.ada/mi_dyn_arr.exp
index c0e9f7f..6dded25 100644
--- a/gdb/testsuite/gdb.ada/mi_dyn_arr.exp
+++ b/gdb/testsuite/gdb.ada/mi_dyn_arr.exp
@@ -20,16 +20,16 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
if {[mi_runto_main] < 0} {
- return 0
+ return
}
set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb]
diff --git a/gdb/testsuite/gdb.ada/mi_dyn_arr/foo.adb b/gdb/testsuite/gdb.ada/mi_dyn_arr/foo.adb
index f56a0d3..c141fe5 100644
--- a/gdb/testsuite/gdb.ada/mi_dyn_arr/foo.adb
+++ b/gdb/testsuite/gdb.ada/mi_dyn_arr/foo.adb
@@ -21,4 +21,3 @@ procedure Foo is
begin
Do_Nothing (BT'Address); -- STOP
end Foo;
-
diff --git a/gdb/testsuite/gdb.ada/mi_ex_cond.exp b/gdb/testsuite/gdb.ada/mi_ex_cond.exp
index 53ace22..c8ab260 100644
--- a/gdb/testsuite/gdb.ada/mi_ex_cond.exp
+++ b/gdb/testsuite/gdb.ada/mi_ex_cond.exp
@@ -20,7 +20,7 @@ require allow_ada_tests gnat_runtime_has_debug_info
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-bargs additional_flags=-static additional_flags=-margs ]] != "" } {
- return -1
+ return
}
# A global variable used to simplify the maintenance of some of
@@ -30,7 +30,7 @@ set any_nb "\[0-9\]+"
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
@@ -38,8 +38,8 @@ if {[mi_clean_restart $binfile]} {
# catchpoint that uses both conditions and exception name.
mi_gdb_test "-catch-exception -c \"i = 2\" -e constraint_error" \
- "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"`constraint_error' Ada exception\",.*,cond=\"i = 2\",.*}" \
- "catch C_E if i = 2"
+ "\\^done,bkptno=\"$decimal\",bkpt={.*disp=\"keep\",enabled=\"y\",what=\"`constraint_error' Ada exception\",.*,cond=\"i = 2\",.*}" \
+ "catch C_E if i = 2"
# It is important that we start the program's execution after having
# inserted the exception catchpoint above. We want to verify that
diff --git a/gdb/testsuite/gdb.ada/mi_exc_info.exp b/gdb/testsuite/gdb.ada/mi_exc_info.exp
index b9d0072..4950751 100644
--- a/gdb/testsuite/gdb.ada/mi_exc_info.exp
+++ b/gdb/testsuite/gdb.ada/mi_exc_info.exp
@@ -20,16 +20,16 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
if {[mi_runto_main] < 0} {
- return 0
+ return
}
mi_delete_breakpoints
@@ -51,4 +51,3 @@ mi_gdb_test "-info-ada-exceptions global_gdb" \
mi_gdb_test "-info-ada-exceptions const.aint" \
"\\^done,ada-exceptions={nr_rows=\"2\",nr_cols=\"2\",hdr=\\\[{width=\"1\",alignment=\"-1\",col_name=\"name\",colhdr=\"Name\"},{width=\"1\",alignment=\"-1\",col_name=\"address\",colhdr=\"Address\"}\\\],body=\\\[{name=\"constraint_error\",address=\"$hex\"},{name=\"const.aint_global_gdb_e\",address=\"$hex\"}\\\]}" \
"-info-ada-exceptions const.aint"
-
diff --git a/gdb/testsuite/gdb.ada/mi_interface.exp b/gdb/testsuite/gdb.ada/mi_interface.exp
index 630353d..e638f97 100644
--- a/gdb/testsuite/gdb.ada/mi_interface.exp
+++ b/gdb/testsuite/gdb.ada/mi_interface.exp
@@ -22,16 +22,16 @@ require gnat_runtime_has_debug_info
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnat12 ]] != "" } {
- return -1
+ return
}
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
if {[mi_runto_main] < 0} {
- return 0
+ return
}
set bp_location [gdb_get_line_number "BREAK" ${testdir}/foo.adb]
diff --git a/gdb/testsuite/gdb.ada/mi_prot.exp b/gdb/testsuite/gdb.ada/mi_prot.exp
index 7f68ca8..5e3f160 100644
--- a/gdb/testsuite/gdb.ada/mi_prot.exp
+++ b/gdb/testsuite/gdb.ada/mi_prot.exp
@@ -22,16 +22,16 @@ standard_ada_testfile prot
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable \
{debug additional_flags=-gnata}] != ""} {
- return -1
+ return
}
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
if {[mi_runto_main] < 0} {
- return 0
+ return
}
mi_delete_breakpoints
diff --git a/gdb/testsuite/gdb.ada/mi_ref_changeable.exp b/gdb/testsuite/gdb.ada/mi_ref_changeable.exp
index 315e2b3..a2813d4 100644
--- a/gdb/testsuite/gdb.ada/mi_ref_changeable.exp
+++ b/gdb/testsuite/gdb.ada/mi_ref_changeable.exp
@@ -20,16 +20,16 @@ require allow_ada_tests
standard_ada_testfile foo_rb20_056
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
if {[mi_runto_main] < 0} {
- return 0
+ return
}
# Continue until STOP_1, and create a varobj for variables "A" and "B".
diff --git a/gdb/testsuite/gdb.ada/mi_string_access.exp b/gdb/testsuite/gdb.ada/mi_string_access.exp
index 25c0490..3a54e94 100644
--- a/gdb/testsuite/gdb.ada/mi_string_access.exp
+++ b/gdb/testsuite/gdb.ada/mi_string_access.exp
@@ -26,13 +26,13 @@ foreach_gnat_encoding scenario flags {all minimal} {
lappend flags debug
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
- return -1
+ return
}
- mi_clean_restart $binfile-$scenario
+ mi_clean_restart $::testfile-$scenario
if {[mi_runto_main] < 0} {
- return 0
+ return
}
set bp_location [gdb_get_line_number "STOP" ${testdir}/bar.adb]
diff --git a/gdb/testsuite/gdb.ada/mi_task_arg.exp b/gdb/testsuite/gdb.ada/mi_task_arg.exp
index 018e3bc..31ef7d0 100644
--- a/gdb/testsuite/gdb.ada/mi_task_arg.exp
+++ b/gdb/testsuite/gdb.ada/mi_task_arg.exp
@@ -20,13 +20,13 @@ require allow_ada_tests
standard_ada_testfile task_switch
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnata ]] != "" } {
- return -1
+ return
}
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
@@ -34,7 +34,7 @@ if {[mi_clean_restart $binfile]} {
mi_gdb_test "-gdb-set debug-file-directory \"\"" ".*"
if {![mi_runto "task_switch.break_me"]} {
- return 0
+ return
}
# Verify that "-stack-list-arguments" does not cause the debugger to
diff --git a/gdb/testsuite/gdb.ada/mi_task_info.exp b/gdb/testsuite/gdb.ada/mi_task_info.exp
index aa05a02..efa437a 100644
--- a/gdb/testsuite/gdb.ada/mi_task_info.exp
+++ b/gdb/testsuite/gdb.ada/mi_task_info.exp
@@ -20,13 +20,13 @@ require allow_ada_tests
standard_ada_testfile task_switch
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnata ]] != "" } {
- return -1
+ return
}
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-if {[mi_clean_restart $binfile]} {
+if {[mi_clean_restart $::testfile]} {
return
}
@@ -35,7 +35,7 @@ if {[mi_clean_restart $binfile]} {
####################################
if {![mi_runto "task_switch.break_me"]} {
- return 0
+ return
}
set ada_task_info_hdr \
@@ -56,4 +56,3 @@ mi_gdb_test "-ada-task-info" \
mi_gdb_test "-ada-task-info 3" \
"\\^done,tasks={nr_rows=\"1\",nr_cols=\"8\",$ada_task_info_hdr,body=\\\[$task_3\\\]}" \
"-ada-task-info 3"
-
diff --git a/gdb/testsuite/gdb.ada/mi_var_access.exp b/gdb/testsuite/gdb.ada/mi_var_access.exp
index 9bfaeff..72a7f36 100644
--- a/gdb/testsuite/gdb.ada/mi_var_access.exp
+++ b/gdb/testsuite/gdb.ada/mi_var_access.exp
@@ -23,13 +23,13 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable debug] != "" } {
- return -1
+ return
}
-mi_clean_restart $binfile
+mi_clean_restart $::testfile
if {[mi_runto_main] < 0} {
- return 0
+ return
}
set bp_location [gdb_get_line_number "STOP" ${testdir}/mi_access.adb]
diff --git a/gdb/testsuite/gdb.ada/mi_var_array.exp b/gdb/testsuite/gdb.ada/mi_var_array.exp
index a04673c..15a01a5 100644
--- a/gdb/testsuite/gdb.ada/mi_var_array.exp
+++ b/gdb/testsuite/gdb.ada/mi_var_array.exp
@@ -26,13 +26,13 @@ foreach_gnat_encoding scenario flags {none all minimal} {
lappend flags debug
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != "" } {
- return -1
+ return
}
- mi_clean_restart $binfile-$scenario
+ mi_clean_restart $::testfile-$scenario
if {[mi_runto_main] < 0} {
- return 0
+ return
}
set bp_location [gdb_get_line_number "STOP" ${testdir}/bar.adb]
diff --git a/gdb/testsuite/gdb.ada/mi_var_union.exp b/gdb/testsuite/gdb.ada/mi_var_union.exp
index 99882cf..9ae020f 100644
--- a/gdb/testsuite/gdb.ada/mi_var_union.exp
+++ b/gdb/testsuite/gdb.ada/mi_var_union.exp
@@ -28,13 +28,13 @@ foreach_gnat_encoding scenario flags {none all minimal} {
lappend flags debug
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != "" } {
- return -1
+ return
}
- mi_clean_restart $binfile-$scenario
+ mi_clean_restart $::testfile-$scenario
if {[mi_runto_main] < 0} {
- return 0
+ return
}
set bp_location [gdb_get_line_number "STOP" ${testdir}/bar.adb]
diff --git a/gdb/testsuite/gdb.ada/mi_variant.exp b/gdb/testsuite/gdb.ada/mi_variant.exp
index 4c71f16..6622cb1 100644
--- a/gdb/testsuite/gdb.ada/mi_variant.exp
+++ b/gdb/testsuite/gdb.ada/mi_variant.exp
@@ -27,13 +27,13 @@ foreach_gnat_encoding scenario flags {none all minimal} {
lappend flags debug
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
- return -1
+ return
}
- mi_clean_restart $binfile-$scenario
+ mi_clean_restart $::testfile-$scenario
if {[mi_runto_main] < 0} {
- return 0
+ return
}
set bp_location [gdb_get_line_number "STOP" ${testdir}/pkg.adb]
diff --git a/gdb/testsuite/gdb.ada/minsyms.exp b/gdb/testsuite/gdb.ada/minsyms.exp
index 355204b..a66b271 100644
--- a/gdb/testsuite/gdb.ada/minsyms.exp
+++ b/gdb/testsuite/gdb.ada/minsyms.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo_qb07_057
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable ""] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -32,13 +32,13 @@ if {![runto "_ada_foo_qb07_057"]} {
gdb_test_no_output "set language ada"
gdb_test "print some_minsym" \
- "'some_minsym' has unknown type; cast it to its declared type"
+ "'some_minsym' has unknown type; cast it to its declared type"
gdb_test "print integer(some_minsym)" \
- " = 1234"
+ " = 1234"
gdb_test "print &some_minsym" \
- " = \\(access <data variable, no debug info>\\) $hex <some_minsym>"
+ " = \\(access <data variable, no debug info>\\) $hex <some_minsym>"
gdb_test "print /x integer(&some_minsym)" \
- " = $hex"
+ " = $hex"
diff --git a/gdb/testsuite/gdb.ada/mod_from_name.exp b/gdb/testsuite/gdb.ada/mod_from_name.exp
index 6384f39..7303003 100644
--- a/gdb/testsuite/gdb.ada/mod_from_name.exp
+++ b/gdb/testsuite/gdb.ada/mod_from_name.exp
@@ -23,7 +23,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
lappend flags debug
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
- return -1
+ return
}
clean_restart ${testfile}-${scenario}
@@ -31,7 +31,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
set bp_location [gdb_get_line_number "START" ${testdir}/foo.adb]
if {![runto "foo.adb:$bp_location"]} {
return
- }
+ }
# GNAT 9 and 10 are known to fail.
if {$scenario == "minimal"
diff --git a/gdb/testsuite/gdb.ada/mod_from_name/foo.adb b/gdb/testsuite/gdb.ada/mod_from_name/foo.adb
index a8d70d3..8cb3c38 100644
--- a/gdb/testsuite/gdb.ada/mod_from_name/foo.adb
+++ b/gdb/testsuite/gdb.ada/mod_from_name/foo.adb
@@ -33,4 +33,3 @@ procedure Foo is
begin
Slice (4) := 4; -- START
end Foo;
-
diff --git a/gdb/testsuite/gdb.ada/modular.exp b/gdb/testsuite/gdb.ada/modular.exp
new file mode 100644
index 0000000..9d2a000
--- /dev/null
+++ b/gdb/testsuite/gdb.ada/modular.exp
@@ -0,0 +1,36 @@
+# Copyright 2025 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
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test for a bug when printing a large modular type.
+
+load_lib "ada.exp"
+
+require allow_ada_tests
+
+standard_ada_testfile prog
+
+if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
+ return
+}
+
+clean_restart ${testfile}
+
+set bp_location [gdb_get_line_number "STOP" ${testdir}/prog.adb]
+runto "prog.adb:$bp_location"
+
+# The bug was that a modular type with a size equal to gdb's ULONGEST
+# was displayed, gdb would say "mod 0".
+gdb_test "ptype mod1_type" "type = mod 4294967296"
+gdb_test "ptype mod2_type" "type = mod 18446744073709551616"
diff --git a/gdb/testsuite/gdb.ada/modular/prog.adb b/gdb/testsuite/gdb.ada/modular/prog.adb
new file mode 100644
index 0000000..aa91148
--- /dev/null
+++ b/gdb/testsuite/gdb.ada/modular/prog.adb
@@ -0,0 +1,32 @@
+-- Copyright 2025 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
+-- the Free Software Foundation; either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+procedure Prog is
+ type Mod1_Type_Base is mod 2 ** 32;
+ type Mod2_Type_Base is mod 2 ** 64;
+
+ -- We use subtypes here because GCC emits the above modular types
+ -- as base types with the expected size, which gdb then displays
+ -- as <4-byte integer> (e.g.). However we want to see the real
+ -- modular type display.
+ subtype Mod1_Type is Mod1_Type_Base;
+ subtype Mod2_Type is Mod2_Type_Base;
+
+ X : Mod1_Type := 23;
+ Y : Mod2_Type := 91;
+
+begin
+ null; -- STOP
+end Prog;
diff --git a/gdb/testsuite/gdb.ada/multiarray.exp b/gdb/testsuite/gdb.ada/multiarray.exp
index 9e8eedb..b56b389 100644
--- a/gdb/testsuite/gdb.ada/multiarray.exp
+++ b/gdb/testsuite/gdb.ada/multiarray.exp
@@ -24,7 +24,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" \
executable $flags] != ""} {
- return -1
+ return
}
clean_restart ${testfile}-${scenario}
diff --git a/gdb/testsuite/gdb.ada/n_arr_bound.exp b/gdb/testsuite/gdb.ada/n_arr_bound.exp
index 4629279..d476223 100644
--- a/gdb/testsuite/gdb.ada/n_arr_bound.exp
+++ b/gdb/testsuite/gdb.ada/n_arr_bound.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
@@ -29,4 +29,4 @@ set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb]
runto "foo.adb:$bp_location"
gdb_test "ptype var" \
- "= array \\(0 .. -1\\) of integer"
+ "= array \\(0 .. -1\\) of integer"
diff --git a/gdb/testsuite/gdb.ada/negative-bit-offset.exp b/gdb/testsuite/gdb.ada/negative-bit-offset.exp
new file mode 100644
index 0000000..c5fcae1
--- /dev/null
+++ b/gdb/testsuite/gdb.ada/negative-bit-offset.exp
@@ -0,0 +1,36 @@
+# Copyright 2025 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
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test negative DW_AT_bit_offset.
+
+load_lib "ada.exp"
+
+require allow_ada_tests
+
+standard_ada_testfile prog
+
+# This particular output is only generated with -gdwarf-4.
+if {[gdb_compile_ada "${srcfile}" "${binfile}" executable \
+ {debug additional_flags=-gdwarf-4}] != ""} {
+ return
+}
+
+clean_restart ${testfile}
+
+set bp_location [gdb_get_line_number "STOP" ${testdir}/prog.adb]
+runto "prog.adb:$bp_location"
+
+gdb_test "print xp" \
+ [string_to_regexp "(x => 21, y => (-1, -2, -3, -4, -5, -6, -7, -8, -9, -10))"]
diff --git a/gdb/testsuite/gdb.ada/negative-bit-offset/prog.adb b/gdb/testsuite/gdb.ada/negative-bit-offset/prog.adb
new file mode 100644
index 0000000..e3c1775
--- /dev/null
+++ b/gdb/testsuite/gdb.ada/negative-bit-offset/prog.adb
@@ -0,0 +1,36 @@
+-- Copyright 2025 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
+-- the Free Software Foundation; either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+procedure Prog is
+
+ type Small is range -32 .. 31;
+ for Small'Size use 6;
+
+ type SomeArray is array (POSITIVE range <>) of Small;
+
+ type SomePackedArray is array (POSITIVE range <>) of Small;
+ pragma Pack (SomePackedArray);
+
+ type SomePackedRecord is record
+ X: Small;
+ Y: SomePackedArray (1 .. 10);
+ end record;
+ pragma Pack (SomePackedRecord);
+
+ XP: SomePackedRecord := (21, (-1, -2, -3, -4, -5, -6, -7, -8, -9, -10));
+
+begin
+ null; -- STOP
+end;
diff --git a/gdb/testsuite/gdb.ada/nested.exp b/gdb/testsuite/gdb.ada/nested.exp
index 48aebe7..336f69e 100644
--- a/gdb/testsuite/gdb.ada/nested.exp
+++ b/gdb/testsuite/gdb.ada/nested.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile hello
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -31,8 +31,8 @@ set any_addr "0x\[0-9a-zA-Z\]+"
# Try breaking on a nested function.
gdb_test "break first" \
- "Breakpoint $any_nb at $any_addr: file .*hello.adb, line $any_nb." \
- "break on nested function First"
+ "Breakpoint $any_nb at $any_addr: file .*hello.adb, line $any_nb." \
+ "break on nested function First"
gdb_test "break fourth" \
"Breakpoint $any_nb at $any_addr: file .*hello.adb, line $any_nb." \
diff --git a/gdb/testsuite/gdb.ada/non-ascii-latin-1.exp b/gdb/testsuite/gdb.ada/non-ascii-latin-1.exp
index caf22a5..e5c56b7 100644
--- a/gdb/testsuite/gdb.ada/non-ascii-latin-1.exp
+++ b/gdb/testsuite/gdb.ada/non-ascii-latin-1.exp
@@ -29,7 +29,7 @@ standard_ada_testfile prog
set flags [list debug additional_flags=-gnati1]
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
- return -1
+ return
}
# Restart without an executable so that we can set the encoding early.
diff --git a/gdb/testsuite/gdb.ada/non-ascii-latin-3.exp b/gdb/testsuite/gdb.ada/non-ascii-latin-3.exp
index 873cd68..37be874 100644
--- a/gdb/testsuite/gdb.ada/non-ascii-latin-3.exp
+++ b/gdb/testsuite/gdb.ada/non-ascii-latin-3.exp
@@ -29,7 +29,7 @@ standard_ada_testfile prog
set flags [list debug additional_flags=-gnati3]
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
- return -1
+ return
}
# Restart without an executable so that we can set the encoding early.
diff --git a/gdb/testsuite/gdb.ada/non-ascii-utf-8.exp b/gdb/testsuite/gdb.ada/non-ascii-utf-8.exp
index 6e42f53..25aa2ba 100644
--- a/gdb/testsuite/gdb.ada/non-ascii-utf-8.exp
+++ b/gdb/testsuite/gdb.ada/non-ascii-utf-8.exp
@@ -27,7 +27,7 @@ standard_ada_testfile prog
set flags [list debug additional_flags=-gnatW8]
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
- return -1
+ return
}
# Restart without an executable so that we can set the encoding early.
diff --git a/gdb/testsuite/gdb.ada/notcplusplus.exp b/gdb/testsuite/gdb.ada/notcplusplus.exp
index 1774e49..bfd7b01 100644
--- a/gdb/testsuite/gdb.ada/notcplusplus.exp
+++ b/gdb/testsuite/gdb.ada/notcplusplus.exp
@@ -20,26 +20,26 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
gdb_test "print /x <symada__cS>" \
- "= \\(a => 0x60287af\\)" \
- "print <symada__cS> before loading symbols from ver.ads"
+ "= \\(a => 0x60287af\\)" \
+ "print <symada__cS> before loading symbols from ver.ads"
# Force the partial symbosl from ver.ads to be expanded into full symbols.
gdb_test \
"list ver.ads:16" \
[multi_line ".*" \
- "16\\s+package Ver is" \
- "17\\s+type Wrapper is record" \
- "18\\s+A : Integer;" \
- "19\\s+end record;" \
- "20\\s+u00045 : constant Wrapper := \\(A => 16#060287af#\\);"]
+ "16\\s+package Ver is" \
+ "17\\s+type Wrapper is record" \
+ "18\\s+A : Integer;" \
+ "19\\s+end record;" \
+ "20\\s+u00045 : constant Wrapper := \\(A => 16#060287af#\\);"]
gdb_test "print /x <symada__cS>" \
- "= \\(a => 0x60287af\\)" \
- "print <symada__cS> after loading symbols from ver.ads"
+ "= \\(a => 0x60287af\\)" \
+ "print <symada__cS> after loading symbols from ver.ads"
diff --git a/gdb/testsuite/gdb.ada/null_array.exp b/gdb/testsuite/gdb.ada/null_array.exp
index 82c1923..dd2c6fd 100644
--- a/gdb/testsuite/gdb.ada/null_array.exp
+++ b/gdb/testsuite/gdb.ada/null_array.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -30,13 +30,13 @@ runto "foo.adb:$bp_location"
if {[gnat_version_compare <= {4 4}]} {
# Ada array bounds are missing in older GCCs.
- setup_xfail *-*-*
+ setup_xfail *-*-*
}
gdb_test "print my_table" \
- "= \\(\\)"
+ "= \\(\\)"
gdb_test "ptype my_table" \
- "type = array \\(10 \\.\\. 1\\) of integer"
+ "type = array \\(10 \\.\\. 1\\) of integer"
gdb_test "print my_matrix" \
- "= \\(m => \\((\"\", ){9}\"\"\\)\\)"
+ "= \\(m => \\((\"\", ){9}\"\"\\)\\)"
diff --git a/gdb/testsuite/gdb.ada/null_overload.exp b/gdb/testsuite/gdb.ada/null_overload.exp
index 46d4530..1b4aebe 100644
--- a/gdb/testsuite/gdb.ada/null_overload.exp
+++ b/gdb/testsuite/gdb.ada/null_overload.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/null_record.exp b/gdb/testsuite/gdb.ada/null_record.exp
index 092d972..e742ad1 100644
--- a/gdb/testsuite/gdb.ada/null_record.exp
+++ b/gdb/testsuite/gdb.ada/null_record.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile null_record
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
@@ -29,5 +29,5 @@ set bp_location [gdb_get_line_number "START" ${testdir}/null_record.adb]
runto "null_record.adb:$bp_location"
gdb_test "ptype empty" \
- "type = record null; end record" \
- "ptype on null record"
+ "type = record null; end record" \
+ "ptype on null record"
diff --git a/gdb/testsuite/gdb.ada/null_record/null_record.adb b/gdb/testsuite/gdb.ada/null_record/null_record.adb
index 07bf4d9..919b075 100644
--- a/gdb/testsuite/gdb.ada/null_record/null_record.adb
+++ b/gdb/testsuite/gdb.ada/null_record/null_record.adb
@@ -20,4 +20,3 @@ procedure Null_Record is
begin
Do_Nothing (E); -- START
end Null_Record;
-
diff --git a/gdb/testsuite/gdb.ada/operator_bp.exp b/gdb/testsuite/gdb.ada/operator_bp.exp
index 630d901..45d1310 100644
--- a/gdb/testsuite/gdb.ada/operator_bp.exp
+++ b/gdb/testsuite/gdb.ada/operator_bp.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile ops_test
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
@@ -56,8 +56,8 @@ foreach op { "*" "/" "mod" "rem" "**" "<" "<=" ">" ">=" "=" "and" "or" "xor" "&"
foreach op { "+" "-" "*" "/" "mod" "rem" "**" "<" "<=" ">" ">=" "=" "and" "or" "xor" "&" "abs" "not"} {
set op_re [string_to_regexp $op]
gdb_test "continue" \
- "Breakpoint $bkptno_numopt_re, ops\\.\"$op_re\" .*"\
- "continue to \"$op\""
+ "Breakpoint $bkptno_numopt_re, ops\\.\"$op_re\" .*"\
+ "continue to \"$op\""
}
# Perform the same test, but using the qualified name of the operator,
@@ -72,13 +72,13 @@ runto "ops_test.adb:$bp_location"
foreach op { "+" "-" } {
set op_re [string_to_regexp $op]
gdb_test "break ops.\"$op\"" \
- "Breakpoint $decimal at $hex: ops\\.\"$op_re\"\\. \\(2 locations\\)"
+ "Breakpoint $decimal at $hex: ops\\.\"$op_re\"\\. \\(2 locations\\)"
}
foreach op { "*" "/" "mod" "rem" "**" "<" "<=" ">" ">=" "=" "and" "or" "xor" "&" "abs" "not"} {
set op_re [string_to_regexp $op]
gdb_test "break ops.\"$op\"" \
- "Breakpoint $decimal at $hex: file .*ops.adb, line $decimal."
+ "Breakpoint $decimal at $hex: file .*ops.adb, line $decimal."
}
# Make sure we stop correctly in each operator function.
@@ -86,8 +86,6 @@ foreach op { "*" "/" "mod" "rem" "**" "<" "<=" ">" ">=" "=" "and" "or" "xor" "&"
foreach op { "+" "-" "*" "/" "mod" "rem" "**" "<" "<=" ">" ">=" "=" "and" "or" "xor" "&" "abs" "not"} {
set op_re [string_to_regexp $op]
gdb_test "continue" \
- "Breakpoint $bkptno_numopt_re, ops\\.\"$op_re\" .*"\
- "continue to ops.\"$op\""
+ "Breakpoint $bkptno_numopt_re, ops\\.\"$op_re\" .*"\
+ "continue to ops.\"$op\""
}
-
-
diff --git a/gdb/testsuite/gdb.ada/operator_bp/ops.adb b/gdb/testsuite/gdb.ada/operator_bp/ops.adb
index 412824f..7de82eb 100644
--- a/gdb/testsuite/gdb.ada/operator_bp/ops.adb
+++ b/gdb/testsuite/gdb.ada/operator_bp/ops.adb
@@ -135,6 +135,3 @@ package body Ops is
end Dummy;
end Ops;
-
-
-
diff --git a/gdb/testsuite/gdb.ada/operator_bp/ops.ads b/gdb/testsuite/gdb.ada/operator_bp/ops.ads
index a5ca7eb..d9f2b8c 100644
--- a/gdb/testsuite/gdb.ada/operator_bp/ops.ads
+++ b/gdb/testsuite/gdb.ada/operator_bp/ops.ads
@@ -48,5 +48,3 @@ private
type Int is new IntRep;
end Ops;
-
-
diff --git a/gdb/testsuite/gdb.ada/operator_call.exp b/gdb/testsuite/gdb.ada/operator_call.exp
index e96107b..8f2a268 100644
--- a/gdb/testsuite/gdb.ada/operator_call.exp
+++ b/gdb/testsuite/gdb.ada/operator_call.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile opcall
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
@@ -71,6 +71,12 @@ proc test_with_menu {command result} {
fail $command
}
}
+ "Argument to arithmetic operation not a number or boolean." {
+ fail $command
+ }
+ -re "No definition of \".*\" in current context." {
+ fail $command
+ }
timeout {
fail "$command (timeout)"
}
diff --git a/gdb/testsuite/gdb.ada/optim_drec.exp b/gdb/testsuite/gdb.ada/optim_drec.exp
index 3f50879..b4492d8 100644
--- a/gdb/testsuite/gdb.ada/optim_drec.exp
+++ b/gdb/testsuite/gdb.ada/optim_drec.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -30,6 +30,4 @@ if {![runto "foo"]} {
}
gdb_test "print z" \
- "= (\\(a => .*, b => .*, c => .*\\)|<optimized out>)"
-
-
+ "= (\\(a => .*, b => .*, c => .*\\)|<optimized out>)"
diff --git a/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp b/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp
index c15b127..233f786 100644
--- a/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp
+++ b/gdb/testsuite/gdb.ada/out_of_line_in_inlined.exp
@@ -23,7 +23,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
lappend flags debug optimize=-O2
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
- return -1
+ return
}
clean_restart ${testfile}-${scenario}
diff --git a/gdb/testsuite/gdb.ada/overload_menu_crash.exp b/gdb/testsuite/gdb.ada/overload_menu_crash.exp
index 6e8e74e..267ba46 100644
--- a/gdb/testsuite/gdb.ada/overload_menu_crash.exp
+++ b/gdb/testsuite/gdb.ada/overload_menu_crash.exp
@@ -22,7 +22,7 @@ require allow_ada_tests
standard_ada_testfile main
if {[gdb_compile_ada "$srcfile" "$binfile" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/overloads.exp b/gdb/testsuite/gdb.ada/overloads.exp
index b11020f..32d1b7d 100644
--- a/gdb/testsuite/gdb.ada/overloads.exp
+++ b/gdb/testsuite/gdb.ada/overloads.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile overloads
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/p-bounds.exp b/gdb/testsuite/gdb.ada/p-bounds.exp
index d075491..ff38612 100644
--- a/gdb/testsuite/gdb.ada/p-bounds.exp
+++ b/gdb/testsuite/gdb.ada/p-bounds.exp
@@ -23,7 +23,7 @@ require allow_ada_tests
standard_ada_testfile main
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable debug] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/packed_array.exp b/gdb/testsuite/gdb.ada/packed_array.exp
index 7a561bf..6475621 100644
--- a/gdb/testsuite/gdb.ada/packed_array.exp
+++ b/gdb/testsuite/gdb.ada/packed_array.exp
@@ -23,7 +23,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
lappend flags debug
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
- return -1
+ return
}
clean_restart ${testfile}-${scenario}
diff --git a/gdb/testsuite/gdb.ada/packed_array_assign.exp b/gdb/testsuite/gdb.ada/packed_array_assign.exp
index 3093d0b..f0d21fd 100644
--- a/gdb/testsuite/gdb.ada/packed_array_assign.exp
+++ b/gdb/testsuite/gdb.ada/packed_array_assign.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile tester
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/packed_record.exp b/gdb/testsuite/gdb.ada/packed_record.exp
index ad371f9..ed156ad 100644
--- a/gdb/testsuite/gdb.ada/packed_record.exp
+++ b/gdb/testsuite/gdb.ada/packed_record.exp
@@ -23,7 +23,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
lappend flags debug
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
- return -1
+ return
}
clean_restart ${testfile}-${scenario}
diff --git a/gdb/testsuite/gdb.ada/packed_record_2.exp b/gdb/testsuite/gdb.ada/packed_record_2.exp
new file mode 100644
index 0000000..af2509b
--- /dev/null
+++ b/gdb/testsuite/gdb.ada/packed_record_2.exp
@@ -0,0 +1,61 @@
+# Copyright 2025 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
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+load_lib "ada.exp"
+
+require allow_ada_tests
+
+standard_ada_testfile exam
+
+set flags {debug}
+if {[ada_minimal_encodings]} {
+ lappend flags additional_flags=-fgnat-encodings=minimal
+}
+
+if {[gdb_compile_ada "${srcfile}" "${binfile}" executable $flags] != ""} {
+ return
+}
+
+clean_restart ${testfile}
+
+set bp_location [gdb_get_line_number "STOP" ${testdir}/exam.adb]
+runto "exam.adb:$bp_location"
+
+set spr_contents "discr => 3, field => -4, array_field => \\(-5, -6, -7\\)"
+
+gdb_test "print spr" " = \\($spr_contents\\)"
+
+gdb_test "print spr.discr" " = 3"
+
+# See PR ada/32880 -- gdb should probably print array (1 .. 3) here,
+# but instead shows array (<>). However as this isn't totally
+# relevant to this test, we just accept it.
+gdb_test "ptype spr" \
+ [multi_line \
+ "type = tagged record" \
+ " discr: range 1 .. 8;" \
+ " field: range -7 .. -4;" \
+ " array_field: array \\(<>\\) of exam.small <packed: 2-bit elements>;" \
+ "end record"]
+
+gdb_test_multiple "print sc" "" {
+ -re " \\($spr_contents, outer => 2, another_array => \\(-7, -6\\)\\)" {
+ pass $gdb_test_name
+ }
+ -re " \\($spr_contents, outer => $decimal, another_array => \\(.*\\)\\)" {
+ # Other output is a known GCC bug.
+ xfail $gdb_test_name
+ }
+}
diff --git a/gdb/testsuite/gdb.ada/packed_record_2/exam.adb b/gdb/testsuite/gdb.ada/packed_record_2/exam.adb
new file mode 100644
index 0000000..e528ecf
--- /dev/null
+++ b/gdb/testsuite/gdb.ada/packed_record_2/exam.adb
@@ -0,0 +1,51 @@
+-- Copyright 2025 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
+-- the Free Software Foundation; either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+procedure Exam is
+ type Small is range -7 .. -4;
+ for Small'Size use 2;
+
+ type Range_Int is range 1 .. 8;
+ for Range_Int'Size use 3;
+
+ type Packed_Array is array (Range_Int range <>) of Small;
+ pragma pack (Packed_Array);
+
+ type Some_Packed_Record (Discr : Range_Int) is tagged record
+ Field: Small;
+ Array_Field : Packed_Array (1 .. Discr);
+ end record;
+ pragma Pack (Some_Packed_Record);
+
+ type Sub_Class (Inner, Outer : Range_Int)
+ is new Some_Packed_Record (Inner) with
+ record
+ Another_Array : Packed_Array (1 .. Outer);
+ end record;
+ pragma Pack (Sub_Class);
+
+ SPR : Some_Packed_Record := (Discr => 3,
+ Field => -4,
+ Array_Field => (-5, -6, -7));
+
+ SC : Sub_Class := (Inner => 3,
+ Outer => 2,
+ Field => -4,
+ Array_Field => (-5, -6, -7),
+ Another_Array => (-7, -6));
+
+begin
+ null; -- STOP
+end Exam;
diff --git a/gdb/testsuite/gdb.ada/packed_tagged.exp b/gdb/testsuite/gdb.ada/packed_tagged.exp
index 2a48037..de3f089 100644
--- a/gdb/testsuite/gdb.ada/packed_tagged.exp
+++ b/gdb/testsuite/gdb.ada/packed_tagged.exp
@@ -26,7 +26,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
lappend flags debug
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
- return -1
+ return
}
clean_restart ${testfile}-${scenario}
diff --git a/gdb/testsuite/gdb.ada/pckd_arr_ren.exp b/gdb/testsuite/gdb.ada/pckd_arr_ren.exp
index 8a58cc3..cbcaa7c 100644
--- a/gdb/testsuite/gdb.ada/pckd_arr_ren.exp
+++ b/gdb/testsuite/gdb.ada/pckd_arr_ren.exp
@@ -23,7 +23,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
lappend flags debug
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
- return -1
+ return
}
clean_restart ${testfile}-${scenario}
diff --git a/gdb/testsuite/gdb.ada/pckd_arr_ren/foo.adb b/gdb/testsuite/gdb.ada/pckd_arr_ren/foo.adb
index 3d5aaa2..2f36424 100644
--- a/gdb/testsuite/gdb.ada/pckd_arr_ren/foo.adb
+++ b/gdb/testsuite/gdb.ada/pckd_arr_ren/foo.adb
@@ -21,4 +21,3 @@ procedure Foo is
begin
Do_Nothing (A2'Address); -- STOP
end Foo;
-
diff --git a/gdb/testsuite/gdb.ada/pckd_neg.exp b/gdb/testsuite/gdb.ada/pckd_neg.exp
index 38b75ab..5e5af3d 100644
--- a/gdb/testsuite/gdb.ada/pckd_neg.exp
+++ b/gdb/testsuite/gdb.ada/pckd_neg.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo_o508_021
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
@@ -29,16 +29,16 @@ set bp_location [gdb_get_line_number "STOP" ${testdir}/foo_o508_021.adb]
runto "foo_o508_021.adb:$bp_location"
gdb_test "print SSA" \
- "= \\(-1, 2, -3, 4\\)"
+ "= \\(-1, 2, -3, 4\\)"
gdb_test "print SSA(1)" \
- "= -1"
+ "= -1"
gdb_test "print SSA(2)" \
- "= 2"
+ "= 2"
gdb_test "print SSA(3)" \
- "= -3"
+ "= -3"
gdb_test "print SSA(4)" \
- "= 4"
+ "= 4"
diff --git a/gdb/testsuite/gdb.ada/pkd_arr_elem.exp b/gdb/testsuite/gdb.ada/pkd_arr_elem.exp
index 8454d55..ed80f43 100644
--- a/gdb/testsuite/gdb.ada/pkd_arr_elem.exp
+++ b/gdb/testsuite/gdb.ada/pkd_arr_elem.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile failure
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
@@ -64,7 +64,7 @@ gdb_test_multiple "$test" $test {
}
gdb_test "print test.str" \
- "= \\(33 'A', nul <repeats 99 times>\\)"
+ "= \\(33 'A', nul <repeats 99 times>\\)"
gdb_test "print test.str(1)" \
- "= 33 'A'"
+ "= 33 'A'"
diff --git a/gdb/testsuite/gdb.ada/pkd_arr_elem/failure.adb b/gdb/testsuite/gdb.ada/pkd_arr_elem/failure.adb
index 8ccb94d..2973526 100644
--- a/gdb/testsuite/gdb.ada/pkd_arr_elem/failure.adb
+++ b/gdb/testsuite/gdb.ada/pkd_arr_elem/failure.adb
@@ -42,4 +42,3 @@ begin
Test.Length := 1;
Do_Nothing (Test'Address); -- START
end;
-
diff --git a/gdb/testsuite/gdb.ada/pp-rec-component.exp b/gdb/testsuite/gdb.ada/pp-rec-component.exp
index 81848ad..255d353 100644
--- a/gdb/testsuite/gdb.ada/pp-rec-component.exp
+++ b/gdb/testsuite/gdb.ada/pp-rec-component.exp
@@ -20,7 +20,7 @@ require allow_ada_tests allow_python_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -34,7 +34,7 @@ set bp_location [gdb_get_line_number "BREAK" ${testdir}/foo.adb]
runto "foo.adb:$bp_location"
gdb_test "print before" \
- " = Thu Nov 14 02:22:23 2013 \\(1384395743\\)"
+ " = Thu Nov 14 02:22:23 2013 \\(1384395743\\)"
gdb_test "print /r before" \
- " = \\(secs => 1384395743\\)"
+ " = \\(secs => 1384395743\\)"
diff --git a/gdb/testsuite/gdb.ada/print_chars.exp b/gdb/testsuite/gdb.ada/print_chars.exp
index 8bb4094..f3af894 100644
--- a/gdb/testsuite/gdb.ada/print_chars.exp
+++ b/gdb/testsuite/gdb.ada/print_chars.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnat05 ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -30,12 +30,12 @@ runto "foo.adb:$bp_location"
gdb_test "print C" \
- "= 97 'a'"
+ "= 97 'a'"
gdb_test "print WC" \
- "= 98 'b'"
+ "= 98 'b'"
gdb_test "print WWC" \
- "= 99 'c'"
+ "= 99 'c'"
gdb_test "print MC" " = 77 'M'"
diff --git a/gdb/testsuite/gdb.ada/print_pc.exp b/gdb/testsuite/gdb.ada/print_pc.exp
index 2bf07e4..6a98097 100644
--- a/gdb/testsuite/gdb.ada/print_pc.exp
+++ b/gdb/testsuite/gdb.ada/print_pc.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile dummy start
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -29,4 +29,4 @@ set bp_location [gdb_get_line_number "START" ${testdir}/dummy.adb]
runto "dummy.adb:$bp_location"
gdb_test "p /x \$pc" \
- "= 0x\[0-9a-zA-Z\]+"
+ "= 0x\[0-9a-zA-Z\]+"
diff --git a/gdb/testsuite/gdb.ada/ptr_typedef.exp b/gdb/testsuite/gdb.ada/ptr_typedef.exp
index 90f6f1f..854e1b9 100644
--- a/gdb/testsuite/gdb.ada/ptr_typedef.exp
+++ b/gdb/testsuite/gdb.ada/ptr_typedef.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -29,5 +29,3 @@ set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb]
runto "foo.adb:$bp_location"
gdb_test "print my_blob.bees(1)" "= \\(access boolean\\) 0x0"
-
-
diff --git a/gdb/testsuite/gdb.ada/ptype-o.exp b/gdb/testsuite/gdb.ada/ptype-o.exp
index a65a800..1558dff 100644
--- a/gdb/testsuite/gdb.ada/ptype-o.exp
+++ b/gdb/testsuite/gdb.ada/ptype-o.exp
@@ -25,7 +25,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
lappend flags debug
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
- return -1
+ return
}
clean_restart ${testfile}-${scenario}
diff --git a/gdb/testsuite/gdb.ada/ptype_arith_binop.exp b/gdb/testsuite/gdb.ada/ptype_arith_binop.exp
index b4f6ee5..b3414a4 100644
--- a/gdb/testsuite/gdb.ada/ptype_arith_binop.exp
+++ b/gdb/testsuite/gdb.ada/ptype_arith_binop.exp
@@ -18,10 +18,10 @@ require allow_ada_tests
clean_restart
gdb_test_no_output "set lang ada" \
- "set lang ada"
+ "set lang ada"
gdb_test "ptype 3 * 2.0" \
- "= <\[0-9\]+-byte float>"
+ "= <\[0-9\]+-byte float>"
gdb_test "ptype 3 / 2.0" \
- "= <\[0-9\]+-byte float>"
+ "= <\[0-9\]+-byte float>"
diff --git a/gdb/testsuite/gdb.ada/ptype_array.exp b/gdb/testsuite/gdb.ada/ptype_array.exp
index 34c9c7e..b407d76 100644
--- a/gdb/testsuite/gdb.ada/ptype_array.exp
+++ b/gdb/testsuite/gdb.ada/ptype_array.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnat05 ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/ptype_array/pck.adb b/gdb/testsuite/gdb.ada/ptype_array/pck.adb
index d44600a..34162db 100644
--- a/gdb/testsuite/gdb.ada/ptype_array/pck.adb
+++ b/gdb/testsuite/gdb.ada/ptype_array/pck.adb
@@ -19,5 +19,3 @@ package body Pck is
null;
end Do_Nothing;
end Pck;
-
-
diff --git a/gdb/testsuite/gdb.ada/ptype_field.exp b/gdb/testsuite/gdb.ada/ptype_field.exp
index 832298e..03cae87 100644
--- a/gdb/testsuite/gdb.ada/ptype_field.exp
+++ b/gdb/testsuite/gdb.ada/ptype_field.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-gnat05 ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -29,19 +29,19 @@ set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb]
runto "foo.adb:$bp_location"
gdb_test "ptype circle" \
- [multi_line "type = record" \
- " pos: pck\\.position;" \
- " radius: integer;" \
- "end record" ]
+ [multi_line "type = record" \
+ " pos: pck\\.position;" \
+ " radius: integer;" \
+ "end record" ]
gdb_test "ptype circle.pos" \
- [multi_line "type = record" \
- " x: integer;" \
- " y: integer;" \
- "end record" ]
+ [multi_line "type = record" \
+ " x: integer;" \
+ " y: integer;" \
+ "end record" ]
gdb_test "ptype circle.pos.x" \
- "type = <\[0-9\]+-byte integer>"
+ "type = <\[0-9\]+-byte integer>"
gdb_test "complete print my_circ" "print my_circle"
gdb_test "complete print my_circle.r" "print my_circle\\.radius"
diff --git a/gdb/testsuite/gdb.ada/ptype_tagged_param.exp b/gdb/testsuite/gdb.ada/ptype_tagged_param.exp
index 493a89c..389f172 100644
--- a/gdb/testsuite/gdb.ada/ptype_tagged_param.exp
+++ b/gdb/testsuite/gdb.ada/ptype_tagged_param.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
set has_runtime_debug_info [gnat_runtime_has_debug_info]
@@ -28,7 +28,7 @@ set has_runtime_debug_info [gnat_runtime_has_debug_info]
clean_restart ${testfile}
if {![runto "pck.adb:20"]} {
- return -1
+ return
}
# With some versions of the compiler, identifying the runtime type of
diff --git a/gdb/testsuite/gdb.ada/ptype_tagged_param/pck.adb b/gdb/testsuite/gdb.ada/ptype_tagged_param/pck.adb
index a760e04..95f041a 100644
--- a/gdb/testsuite/gdb.ada/ptype_tagged_param/pck.adb
+++ b/gdb/testsuite/gdb.ada/ptype_tagged_param/pck.adb
@@ -27,4 +27,3 @@ package body Pck is
end Area;
end Pck;
-
diff --git a/gdb/testsuite/gdb.ada/ptype_tagged_param/pck.ads b/gdb/testsuite/gdb.ada/ptype_tagged_param/pck.ads
index 2dd627e..a4c3ea0 100644
--- a/gdb/testsuite/gdb.ada/ptype_tagged_param/pck.ads
+++ b/gdb/testsuite/gdb.ada/ptype_tagged_param/pck.ads
@@ -26,4 +26,3 @@ package Pck is
function Area (C : in Circle) return Integer;
end Pck;
-
diff --git a/gdb/testsuite/gdb.ada/ptype_union.exp b/gdb/testsuite/gdb.ada/ptype_union.exp
index f67793c..de211cb 100644
--- a/gdb/testsuite/gdb.ada/ptype_union.exp
+++ b/gdb/testsuite/gdb.ada/ptype_union.exp
@@ -18,7 +18,7 @@ require allow_ada_tests
standard_testfile .c
if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
- return -1
+ return
}
# The test case is written in C, because it was easy to make the
diff --git a/gdb/testsuite/gdb.ada/py_range.exp b/gdb/testsuite/gdb.ada/py_range.exp
index 7adab65..5e48c74 100644
--- a/gdb/testsuite/gdb.ada/py_range.exp
+++ b/gdb/testsuite/gdb.ada/py_range.exp
@@ -21,7 +21,7 @@ require allow_ada_tests allow_python_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -30,13 +30,13 @@ set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb]
runto "foo.adb:$bp_location"
gdb_test "python print(int(gdb.parse_and_eval('sr')))" \
- "48"
+ "48"
gdb_test "python print(int(gdb.parse_and_eval('si')))" \
- "740804"
+ "740804"
gdb_test "python print(int(gdb.parse_and_eval('ir')))" \
- "974"
+ "974"
# Accept "foo." prefix for older versions of GNAT.
gdb_test "python print(gdb.parse_and_eval('si').type)" \
diff --git a/gdb/testsuite/gdb.ada/py_taft.exp b/gdb/testsuite/gdb.ada/py_taft.exp
index bd30d20..a2d8686 100644
--- a/gdb/testsuite/gdb.ada/py_taft.exp
+++ b/gdb/testsuite/gdb.ada/py_taft.exp
@@ -21,7 +21,7 @@ require allow_ada_tests allow_python_tests
standard_ada_testfile main
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable debug] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/rdv_wait.exp b/gdb/testsuite/gdb.ada/rdv_wait.exp
index bf58c58..479f610 100644
--- a/gdb/testsuite/gdb.ada/rdv_wait.exp
+++ b/gdb/testsuite/gdb.ada/rdv_wait.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -33,8 +33,8 @@ runto "break_me"
# Switch to task 2, and verify that GDB is able to unwind all the way
# to foo.T.
gdb_test "task 2" \
- [join {"\\\[Switching to task 2 \"mit\"\\\].*" \
- ".*foo\\.t \\(.*\\).*foo\\.adb:.*"} ""]
+ [join {"\\\[Switching to task 2 \"mit\"\\\].*" \
+ ".*foo\\.t \\(.*\\).*foo\\.adb:.*"} ""]
gdb_test "task apply 1 -q frame" ".*pck\\.break_me.*"
diff --git a/gdb/testsuite/gdb.ada/rec_comp.exp b/gdb/testsuite/gdb.ada/rec_comp.exp
index 140e1b5..af49495 100644
--- a/gdb/testsuite/gdb.ada/rec_comp.exp
+++ b/gdb/testsuite/gdb.ada/rec_comp.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile bar_o203_012
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/rec_comp/bar_o203_012.adb b/gdb/testsuite/gdb.ada/rec_comp/bar_o203_012.adb
index faffcf1..d5ddfe5 100644
--- a/gdb/testsuite/gdb.ada/rec_comp/bar_o203_012.adb
+++ b/gdb/testsuite/gdb.ada/rec_comp/bar_o203_012.adb
@@ -29,4 +29,3 @@ begin
Do_Nothing (R'Address);
Do_Nothing (IA'Address);
end Bar_O203_012;
-
diff --git a/gdb/testsuite/gdb.ada/rec_ptype.exp b/gdb/testsuite/gdb.ada/rec_ptype.exp
index 96380ab..d6b7aa1 100644
--- a/gdb/testsuite/gdb.ada/rec_ptype.exp
+++ b/gdb/testsuite/gdb.ada/rec_ptype.exp
@@ -26,7 +26,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
lappend flags debug
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
- return -1
+ return
}
clean_restart ${testfile}-${scenario}
diff --git a/gdb/testsuite/gdb.ada/rec_return.exp b/gdb/testsuite/gdb.ada/rec_return.exp
index 321ba67..3bba420 100644
--- a/gdb/testsuite/gdb.ada/rec_return.exp
+++ b/gdb/testsuite/gdb.ada/rec_return.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -31,4 +31,4 @@ if {![runto "foo.adb:$bp_location"]} {
}
gdb_test "print bar" \
- "= \\(x => 42, s => \"ABCDEFGH\"\\)"
+ "= \\(x => 42, s => \"ABCDEFGH\"\\)"
diff --git a/gdb/testsuite/gdb.ada/rec_return/foo.adb b/gdb/testsuite/gdb.ada/rec_return/foo.adb
index df93dd5..c404115 100644
--- a/gdb/testsuite/gdb.ada/rec_return/foo.adb
+++ b/gdb/testsuite/gdb.ada/rec_return/foo.adb
@@ -21,4 +21,3 @@ begin
Q := Bar; -- STOP HERE
Do_Nothing (Q'Address);
end Foo;
-
diff --git a/gdb/testsuite/gdb.ada/rec_return/pck.adb b/gdb/testsuite/gdb.ada/rec_return/pck.adb
index 1bfdb6c..675f46e 100644
--- a/gdb/testsuite/gdb.ada/rec_return/pck.adb
+++ b/gdb/testsuite/gdb.ada/rec_return/pck.adb
@@ -24,4 +24,3 @@ package body Pck is
null;
end Do_Nothing;
end Pck;
-
diff --git a/gdb/testsuite/gdb.ada/rec_return/pck.ads b/gdb/testsuite/gdb.ada/rec_return/pck.ads
index e95fe2c..880a172 100644
--- a/gdb/testsuite/gdb.ada/rec_return/pck.ads
+++ b/gdb/testsuite/gdb.ada/rec_return/pck.ads
@@ -25,4 +25,3 @@ package Pck is
procedure Do_Nothing (A : System.Address);
end Pck;
-
diff --git a/gdb/testsuite/gdb.ada/recursive-access.exp b/gdb/testsuite/gdb.ada/recursive-access.exp
new file mode 100644
index 0000000..ff29d27
--- /dev/null
+++ b/gdb/testsuite/gdb.ada/recursive-access.exp
@@ -0,0 +1,36 @@
+# Copyright 2025 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
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test that recursive access types do not cause a crash.
+
+load_lib "ada.exp"
+
+require allow_ada_tests
+
+# This test causes at least the 7.5 compiler to crash. We're not sure
+# when the bug was fixed so we're choosing a version newer than the
+# known crash.
+require {gnat_version_compare >= 8}
+
+standard_ada_testfile prog
+
+if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
+ return
+}
+
+clean_restart ${testfile}
+
+# The bug was that even reading these types caused a crash.
+gdb_test_no_output "maint expand-symtabs"
diff --git a/gdb/testsuite/gdb.ada/recursive-access/pack.ads b/gdb/testsuite/gdb.ada/recursive-access/pack.ads
new file mode 100644
index 0000000..fe06edc
--- /dev/null
+++ b/gdb/testsuite/gdb.ada/recursive-access/pack.ads
@@ -0,0 +1,26 @@
+-- Copyright 2025 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
+-- the Free Software Foundation; either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+package Pack is
+ -- With GCC, this makes a directly self-referential pointer type.
+ type Direct;
+ subtype Sub is Direct;
+ type Direct is access Sub;
+
+ -- With GCC, this makes two mutually recursive pointer types.
+ type Second;
+ type First is access Second;
+ type Second is access First;
+end Pack;
diff --git a/gdb/testsuite/gdb.ada/recursive-access/prog.adb b/gdb/testsuite/gdb.ada/recursive-access/prog.adb
new file mode 100644
index 0000000..f740343
--- /dev/null
+++ b/gdb/testsuite/gdb.ada/recursive-access/prog.adb
@@ -0,0 +1,23 @@
+-- Copyright 2025 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
+-- the Free Software Foundation; either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+with Pack; use Pack;
+
+procedure Prog is
+ X : Direct := null;
+ Y : Second := new First;
+begin
+ null;
+end Prog;
diff --git a/gdb/testsuite/gdb.ada/recursive-variant.exp b/gdb/testsuite/gdb.ada/recursive-variant.exp
index c2b15e4..6883857 100644
--- a/gdb/testsuite/gdb.ada/recursive-variant.exp
+++ b/gdb/testsuite/gdb.ada/recursive-variant.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile main
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable debug] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/ref_param.exp b/gdb/testsuite/gdb.ada/ref_param.exp
index d1d8960..e326298 100644
--- a/gdb/testsuite/gdb.ada/ref_param.exp
+++ b/gdb/testsuite/gdb.ada/ref_param.exp
@@ -20,19 +20,18 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
if {![runto pck.adb:20]} {
return
-}
+}
gdb_test_no_output "set print frame-arguments all"
set expected_d "\\(one => 1, two => 2, three => 3, four => 4, five => 5, six => 6\\)"
gdb_test "frame" \
- "#0\[ \t\]*pck\\.call_me \\(d=${expected_d}\\).*" \
- "frame argument value printed"
-
+ "#0\[ \t\]*pck\\.call_me \\(d=${expected_d}\\).*" \
+ "frame argument value printed"
diff --git a/gdb/testsuite/gdb.ada/ref_tick_size.exp b/gdb/testsuite/gdb.ada/ref_tick_size.exp
index 6ceb73b..c39c216 100644
--- a/gdb/testsuite/gdb.ada/ref_tick_size.exp
+++ b/gdb/testsuite/gdb.ada/ref_tick_size.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile p
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -34,4 +34,4 @@ runto "p.adb:$bp_location"
# the size of d1.
gdb_test "print d1'size = d2'size" \
- "= true"
+ "= true"
diff --git a/gdb/testsuite/gdb.ada/ref_tick_size/p.adb b/gdb/testsuite/gdb.ada/ref_tick_size/p.adb
index 88b1192..6cd4a07 100644
--- a/gdb/testsuite/gdb.ada/ref_tick_size/p.adb
+++ b/gdb/testsuite/gdb.ada/ref_tick_size/p.adb
@@ -26,4 +26,3 @@ begin
Do_Nothing (D1'Address); -- START
Do_Nothing (D2'Address);
end P;
-
diff --git a/gdb/testsuite/gdb.ada/rename_subscript_param.exp b/gdb/testsuite/gdb.ada/rename_subscript_param.exp
index 75e5098..5e762f5 100644
--- a/gdb/testsuite/gdb.ada/rename_subscript_param.exp
+++ b/gdb/testsuite/gdb.ada/rename_subscript_param.exp
@@ -22,7 +22,7 @@ require {gnat_version_compare >= 8}
standard_ada_testfile pb30_012
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -31,18 +31,18 @@ set bp_location [gdb_get_line_number "BREAK" ${testdir}/pkg.adb]
runto "pkg.adb:$bp_location"
gdb_test "print rename_subscript_param_b" \
- " = false" \
- "print rename_subscript_param_b before changing its value"
+ " = false" \
+ "print rename_subscript_param_b before changing its value"
set bp_location [gdb_get_line_number "Do_Nothing" ${testdir}/pkg.adb]
gdb_test "break pkg.adb:$bp_location" \
- "Breakpoint \[0-9\]+ at.*: file .*pkg.adb, line \[0-9\]+." \
- "insert second breakpoint in pkg.adb"
+ "Breakpoint \[0-9\]+ at.*: file .*pkg.adb, line \[0-9\]+." \
+ "insert second breakpoint in pkg.adb"
gdb_test "cont" \
- "Breakpoint \[0-9\]+, pkg.flip \\(.*" \
- "Continuing to breakpoint on call to Do_Nothing"
+ "Breakpoint \[0-9\]+, pkg.flip \\(.*" \
+ "Continuing to breakpoint on call to Do_Nothing"
gdb_test "print rename_subscript_param_b" \
- " = true" \
- "print rename_subscript_param_b after changing its value"
+ " = true" \
+ "print rename_subscript_param_b after changing its value"
diff --git a/gdb/testsuite/gdb.ada/repeat_dyn.exp b/gdb/testsuite/gdb.ada/repeat_dyn.exp
index 7e5c7a7..a866e17 100644
--- a/gdb/testsuite/gdb.ada/repeat_dyn.exp
+++ b/gdb/testsuite/gdb.ada/repeat_dyn.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo_oc22_002
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -29,4 +29,4 @@ set bp_location [gdb_get_line_number "STOP" ${testdir}/foo_oc22_002.adb]
runto "foo_oc22_002.adb:$bp_location"
gdb_test "print a1(1)@3" \
- " = \\(3, 5, 8\\)"
+ " = \\(3, 5, 8\\)"
diff --git a/gdb/testsuite/gdb.ada/return-small-char-array.exp b/gdb/testsuite/gdb.ada/return-small-char-array.exp
new file mode 100644
index 0000000..63009be
--- /dev/null
+++ b/gdb/testsuite/gdb.ada/return-small-char-array.exp
@@ -0,0 +1,50 @@
+# Copyright 2025 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
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+load_lib "ada.exp"
+
+require allow_ada_tests
+
+standard_ada_testfile proc
+
+set opts {}
+lappend opts debug
+if { [ada_fvar_tracking] } {
+ lappend opts "additional_flags=-fvar-tracking"
+}
+
+if { [gdb_compile_ada $srcfile $binfile executable $opts] != "" } {
+ return
+}
+
+clean_restart $testfile
+
+set bp_location [gdb_get_line_number "STOP" $testdir/proc.adb]
+runto "proc.adb:$bp_location"
+
+gdb_test "print Value.Name(My_Value)" \
+ { = "abcd"}
+
+# Step into the function. Don't do this by stepping, but by setting a
+# breakpoint and continuing to it, to avoid the problem that varying line info
+# may require us to step a different amount of times to land at the same
+# location.
+set bp_location_2 [gdb_get_line_number "STOP" $testdir/value.adb]
+gdb_breakpoint value.adb:$bp_location_2
+gdb_continue_to_breakpoint "STOP"
+
+# and finish.
+gdb_test "finish" \
+ { = "abcd"}
diff --git a/gdb/testsuite/gdb.ada/return-small-char-array/proc.adb b/gdb/testsuite/gdb.ada/return-small-char-array/proc.adb
new file mode 100644
index 0000000..b18d9fe
--- /dev/null
+++ b/gdb/testsuite/gdb.ada/return-small-char-array/proc.adb
@@ -0,0 +1,22 @@
+-- Copyright 2025 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
+-- the Free Software Foundation; either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+with Value;
+procedure Proc is
+ My_Value : Value.T := "abcd";
+begin
+ null; -- STOP
+ My_Value := Value.Name(My_Value);
+end;
diff --git a/gdb/testsuite/gdb.ada/return-small-char-array/value.adb b/gdb/testsuite/gdb.ada/return-small-char-array/value.adb
new file mode 100644
index 0000000..351e67a
--- /dev/null
+++ b/gdb/testsuite/gdb.ada/return-small-char-array/value.adb
@@ -0,0 +1,21 @@
+-- Copyright 2025 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
+-- the Free Software Foundation; either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+package body Value is
+ function Name (Of_Value : T) return T is
+ begin
+ return Of_Value; -- STOP
+ end Name;
+end Value;
diff --git a/gdb/testsuite/gdb.ada/return-small-char-array/value.ads b/gdb/testsuite/gdb.ada/return-small-char-array/value.ads
new file mode 100644
index 0000000..16b171e
--- /dev/null
+++ b/gdb/testsuite/gdb.ada/return-small-char-array/value.ads
@@ -0,0 +1,20 @@
+-- Copyright 2025 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
+-- the Free Software Foundation; either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+package Value is
+ type T is new String (1 .. 4);
+
+ function Name (Of_Value : T) return T;
+end;
diff --git a/gdb/testsuite/gdb.ada/same_component_name.exp b/gdb/testsuite/gdb.ada/same_component_name.exp
index 6c7c7d5..b245bf9 100644
--- a/gdb/testsuite/gdb.ada/same_component_name.exp
+++ b/gdb/testsuite/gdb.ada/same_component_name.exp
@@ -23,7 +23,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
lappend flags debug
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != "" } {
- return -1
+ return
}
clean_restart ${testfile}-${scenario}
diff --git a/gdb/testsuite/gdb.ada/same_enum.exp b/gdb/testsuite/gdb.ada/same_enum.exp
index 5c830f6..7e233cd 100644
--- a/gdb/testsuite/gdb.ada/same_enum.exp
+++ b/gdb/testsuite/gdb.ada/same_enum.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile a
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/same_enum/pck.adb b/gdb/testsuite/gdb.ada/same_enum/pck.adb
index fc67d2f..2bfbe8c 100644
--- a/gdb/testsuite/gdb.ada/same_enum/pck.adb
+++ b/gdb/testsuite/gdb.ada/same_enum/pck.adb
@@ -19,4 +19,3 @@ package body Pck is
null;
end Do_Nothing;
end Pck;
-
diff --git a/gdb/testsuite/gdb.ada/same_enum/pck.ads b/gdb/testsuite/gdb.ada/same_enum/pck.ads
index efb475b..eb0d51a 100644
--- a/gdb/testsuite/gdb.ada/same_enum/pck.ads
+++ b/gdb/testsuite/gdb.ada/same_enum/pck.ads
@@ -21,4 +21,3 @@ package Pck is
procedure Do_Nothing (A : System.Address);
end Pck;
-
diff --git a/gdb/testsuite/gdb.ada/scalar_storage.exp b/gdb/testsuite/gdb.ada/scalar_storage.exp
index 52a85cd..a380541 100644
--- a/gdb/testsuite/gdb.ada/scalar_storage.exp
+++ b/gdb/testsuite/gdb.ada/scalar_storage.exp
@@ -48,7 +48,7 @@ if {![runto "storage.adb:$bp_location"]} {
set re "value => 126, another_value => 12, color => green"
# This requires a compiler fix that is in GCC 14.
-set have_xfail [expr ![gnat_version_compare >= 14]]
+set have_xfail [expr {![gnat_version_compare >= 14]}]
set re_color "(red|green|blue|$decimal)"
set re_xfail \
"value => $decimal, another_value => $decimal, color => $re_color"
diff --git a/gdb/testsuite/gdb.ada/scalar_storage/storage.adb b/gdb/testsuite/gdb.ada/scalar_storage/storage.adb
index 46501b1..7aae979 100644
--- a/gdb/testsuite/gdb.ada/scalar_storage/storage.adb
+++ b/gdb/testsuite/gdb.ada/scalar_storage/storage.adb
@@ -28,7 +28,7 @@ procedure Storage is
Another_Value : Another_Range;
Color : Colors;
end record;
-
+
for Rec use record
Value at 0 range 0..6;
Another_Value at 0 range 7..10;
diff --git a/gdb/testsuite/gdb.ada/scoped_watch.exp b/gdb/testsuite/gdb.ada/scoped_watch.exp
index 6e545a5..03526a2 100644
--- a/gdb/testsuite/gdb.ada/scoped_watch.exp
+++ b/gdb/testsuite/gdb.ada/scoped_watch.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo_p708_025
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
@@ -31,27 +31,27 @@ runto "pck.adb:$bp_location"
# Insert a watchpoint on local variable "result"
gdb_test "watch result" \
- ".*atchpoint \[0-9\]+: result"
+ ".*atchpoint \[0-9\]+: result"
# Insert a breakpoint we'll reach after returning from the current
# function.
set bp_location [gdb_get_line_number "Do_Nothing" ${testdir}/foo_p708_025.adb]
gdb_test "break foo_p708_025.adb:$bp_location" \
- "Breakpoint \[0-9\]+ at.*: file .*foo_p708_025.adb, line \[0-9\]+."
+ "Breakpoint \[0-9\]+ at.*: file .*foo_p708_025.adb, line \[0-9\]+."
# This breakpoint will be there to stop us after we test what happens
# during a continue (see below...)
gdb_test "break pck.increment" \
- "Breakpoint \[0-9\]+ at.*: file .*pck.adb, line \[0-9\]+."
+ "Breakpoint \[0-9\]+ at.*: file .*pck.adb, line \[0-9\]+."
# Continue until we reach our watchpoint. It isn't strictly necessary
# for our purpose that the watchpoint actually triggers, but this shows
# that the watchpoint exists and is active.
gdb_test "cont" \
- ".*atchpoint \[0-9\]+: result.*Old value = 8.*New value = 64.*" \
- "continuing to watchpoint hit"
+ ".*atchpoint \[0-9\]+: result.*Old value = 8.*New value = 64.*" \
+ "continuing to watchpoint hit"
# Continue again. We should be stopped at the (internal) breakpoint
# that we setup to delete the watchpoint as soon as the program leaves
@@ -66,18 +66,18 @@ gdb_test \
# (on the call to Do_Nothing) we set earlier.
gdb_test "cont" \
- "Breakpoint \[0-9\]+.*Do_Nothing.*" \
- "continuing to breakpoint on call to Do_Nothing"
+ "Breakpoint \[0-9\]+.*Do_Nothing.*" \
+ "continuing to breakpoint on call to Do_Nothing"
# Do a next, to verify that it works...
gdb_test "next" \
- ".* Call_Me;" \
- "next to call to Call_Me"
+ ".* Call_Me;" \
+ "next to call to Call_Me"
# And finally, one more continue.
gdb_test "cont" \
- "Breakpoint \[0-9\]+.*pck\\.increment.*" \
- "continuing to breakpoint in pck.increment"
+ "Breakpoint \[0-9\]+.*pck\\.increment.*" \
+ "continuing to breakpoint in pck.increment"
diff --git a/gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp b/gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp
index 73b9242..fcba9d7 100644
--- a/gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp
+++ b/gdb/testsuite/gdb.ada/set_pckd_arr_elt.exp
@@ -23,7 +23,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
lappend flags debug
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
- return -1
+ return
}
clean_restart ${testfile}-${scenario}
@@ -42,11 +42,11 @@ foreach_gnat_encoding scenario flags {all minimal} {
gdb_breakpoint "update_small"
gdb_test "continue" \
- "Breakpoint .*, pck\\.update_small \\(s=9\\) at .*pck.adb:.*" \
- "continue to update_small"
+ "Breakpoint .*, pck\\.update_small \\(s=9\\) at .*pck.adb:.*" \
+ "continue to update_small"
# And again for the second call.
gdb_test "continue" \
- "Breakpoint .*, pck\\.update_small \\(s=15\\) at .*pck.adb:.*" \
- "continue to update_small for va.t"
+ "Breakpoint .*, pck\\.update_small \\(s=15\\) at .*pck.adb:.*" \
+ "continue to update_small for va.t"
}
diff --git a/gdb/testsuite/gdb.ada/set_wstr.exp b/gdb/testsuite/gdb.ada/set_wstr.exp
index 8b9a125..07c81ab 100644
--- a/gdb/testsuite/gdb.ada/set_wstr.exp
+++ b/gdb/testsuite/gdb.ada/set_wstr.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile a
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -33,38 +33,38 @@ if {![runto "a.adb:$bp_location"]} {
# Verify that assigning to Nnn (a basic string) works...
gdb_test "print nnn" \
- "= \"12345\"" \
- "print nnn before assignment"
+ "= \"12345\"" \
+ "print nnn before assignment"
gdb_test_no_output "set variable nnn := \"qcyom\""
gdb_test "print nnn" \
- "= \"qcyom\"" \
- "print nnn after assignment"
+ "= \"qcyom\"" \
+ "print nnn after assignment"
# Same with Www (a wide string)...
gdb_test "print www" \
- "= \"12345\"" \
- "print www before assignment"
+ "= \"12345\"" \
+ "print www before assignment"
gdb_test_no_output "set variable www := \"zenrk\""
gdb_test "print www" \
- "= \"zenrk\"" \
- "print www after assignment"
+ "= \"zenrk\"" \
+ "print www after assignment"
# Same with Rws (a wide wide string)...
gdb_test "print rws" \
- "= \"12345\"" \
- "print rws before assignment"
+ "= \"12345\"" \
+ "print rws before assignment"
gdb_test_no_output "set variable rws := \"ndhci\""
gdb_test "print rws" \
- "= \"ndhci\"" \
- "print rws after assignment"
+ "= \"ndhci\"" \
+ "print rws after assignment"
# Also, check that GDB doesn't get tricked if we assign to Www a
# string twice the length of Www. The debugger should reject the
@@ -72,7 +72,7 @@ gdb_test "print rws" \
# used to get tricked because the array size was the same).
gdb_test "set variable www := \"1#2#3#4#5#\"" \
- "cannot assign arrays of different length"
+ "cannot assign arrays of different length"
# However, reassigning an array of a different length should work when
# the LHS is a convenience variable.
diff --git a/gdb/testsuite/gdb.ada/small_reg_param.exp b/gdb/testsuite/gdb.ada/small_reg_param.exp
index e8f9e5e..119e561 100644
--- a/gdb/testsuite/gdb.ada/small_reg_param.exp
+++ b/gdb/testsuite/gdb.ada/small_reg_param.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug optimize=-O1]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -40,4 +40,3 @@ gdb_test "continue" \
# And just to make sure, we also verify that the parameter value
# is correct when we print it manually.
gdb_test "print w" " = 50"
-
diff --git a/gdb/testsuite/gdb.ada/start.exp b/gdb/testsuite/gdb.ada/start.exp
index 8bfc202..9138030 100644
--- a/gdb/testsuite/gdb.ada/start.exp
+++ b/gdb/testsuite/gdb.ada/start.exp
@@ -24,7 +24,7 @@ require !use_gdb_stub
standard_ada_testfile dummy
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
@@ -32,9 +32,9 @@ clean_restart ${testfile}
# Verify that "start" lands inside the right procedure.
if { [gdb_start_cmd] < 0 } {
fail "start failed to land inside the right procedure"
- return -1
+ return
}
gdb_test "" \
- "dummy \\(\\) at .*dummy.adb.*" \
- "start"
+ "dummy \\(\\) at .*dummy.adb.*" \
+ "start"
diff --git a/gdb/testsuite/gdb.ada/static-link.exp b/gdb/testsuite/gdb.ada/static-link.exp
index 7af14c5..1b05bcd 100644
--- a/gdb/testsuite/gdb.ada/static-link.exp
+++ b/gdb/testsuite/gdb.ada/static-link.exp
@@ -20,14 +20,14 @@ require allow_ada_tests
standard_ada_testfile prog
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
set bp_location [gdb_get_line_number "STOP" ${testdir}/prog.adb]
if {![runto "prog.adb:$bp_location"]} {
- return -1
+ return
}
gdb_test "ptype value" [string_to_regexp "type = array (1 .. 3) of integer"]
diff --git a/gdb/testsuite/gdb.ada/str_binop_equal.exp b/gdb/testsuite/gdb.ada/str_binop_equal.exp
index e897db0..85cf9cb 100644
--- a/gdb/testsuite/gdb.ada/str_binop_equal.exp
+++ b/gdb/testsuite/gdb.ada/str_binop_equal.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo_p211_061
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -29,13 +29,13 @@ set bp_location [gdb_get_line_number "STOP" ${testdir}/foo_p211_061.adb]
runto "foo_p211_061.adb:$bp_location"
gdb_test "print my_str = my_str" \
- " = true"
+ " = true"
gdb_test "print my_str = \"ABCD\"" \
" = true"
gdb_test "print my_str = \"EFGH\"" \
- " = false"
+ " = false"
gdb_test "print my_str = \"AB\"" \
- " = false"
+ " = false"
diff --git a/gdb/testsuite/gdb.ada/str_binop_equal/pck.adb b/gdb/testsuite/gdb.ada/str_binop_equal/pck.adb
index 32b2b6e..e275efe 100644
--- a/gdb/testsuite/gdb.ada/str_binop_equal/pck.adb
+++ b/gdb/testsuite/gdb.ada/str_binop_equal/pck.adb
@@ -19,4 +19,3 @@ package body Pck is
null;
end Do_Nothing;
end pck;
-
diff --git a/gdb/testsuite/gdb.ada/str_chars.exp b/gdb/testsuite/gdb.ada/str_chars.exp
index 6158509..edd82e6 100644
--- a/gdb/testsuite/gdb.ada/str_chars.exp
+++ b/gdb/testsuite/gdb.ada/str_chars.exp
@@ -22,7 +22,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/str_ref_cmp.exp b/gdb/testsuite/gdb.ada/str_ref_cmp.exp
index 95fc8ee..b2bb976 100644
--- a/gdb/testsuite/gdb.ada/str_ref_cmp.exp
+++ b/gdb/testsuite/gdb.ada/str_ref_cmp.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -34,7 +34,7 @@ gdb_test_multiple {print "a" = "a"} $test {
-re " = false\r\n$gdb_prompt $" {
kfail ada/12607 $test
untested ${testdir}.exp
- return 0
+ return
}
-re " = true\r\n$gdb_prompt $" {
pass $test
@@ -44,7 +44,7 @@ gdb_test_multiple {print "a" = "a"} $test {
# Verify that we can compare a string slice with another string.
gdb_test "print String_Var (1 .. 3) = \"Hel\"" \
- "= true"
+ "= true"
gdb_test "print String_Var (1 .. 3) = \"hel\"" \
- "= false"
+ "= false"
diff --git a/gdb/testsuite/gdb.ada/str_uninit.exp b/gdb/testsuite/gdb.ada/str_uninit.exp
index ed1fabc..1157ef8 100644
--- a/gdb/testsuite/gdb.ada/str_uninit.exp
+++ b/gdb/testsuite/gdb.ada/str_uninit.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile parse
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/sub_variant.exp b/gdb/testsuite/gdb.ada/sub_variant.exp
index 3d723ad..b3c800f 100644
--- a/gdb/testsuite/gdb.ada/sub_variant.exp
+++ b/gdb/testsuite/gdb.ada/sub_variant.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile subv
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/sym_print_name.exp b/gdb/testsuite/gdb.ada/sym_print_name.exp
index 933f51a..9e4a38b 100644
--- a/gdb/testsuite/gdb.ada/sym_print_name.exp
+++ b/gdb/testsuite/gdb.ada/sym_print_name.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -38,16 +38,15 @@ set test_name "multiple matches for symbol integervar"
gdb_test_multiple "print integervar" "$test_name" \
{
-re "$menu" {
- pass "$test_name"
+ pass "$test_name"
}
default {
- fail "$test_name"
+ fail "$test_name"
}
}
# Select the first choice from the multiple-choice menu above.
gdb_test "1" \
- "= 48" \
- "select first choice from multiple-choice menu"
-
+ "= 48" \
+ "select first choice from multiple-choice menu"
diff --git a/gdb/testsuite/gdb.ada/taft_type.exp b/gdb/testsuite/gdb.ada/taft_type.exp
index ac7b258..c07f5b1 100644
--- a/gdb/testsuite/gdb.ada/taft_type.exp
+++ b/gdb/testsuite/gdb.ada/taft_type.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile p
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -28,7 +28,7 @@ clean_restart ${testfile}
set bp_location [gdb_get_line_number "START" ${testdir}/p.adb]
if {![runto "p.adb:$bp_location"]} {
return
-}
+}
gdb_test "print w.e.all" \
- "= \\(month => 8, year => 1974\\)"
+ "= \\(month => 8, year => 1974\\)"
diff --git a/gdb/testsuite/gdb.ada/taft_type/p.adb b/gdb/testsuite/gdb.ada/taft_type/p.adb
index be35493..fc41347 100644
--- a/gdb/testsuite/gdb.ada/taft_type/p.adb
+++ b/gdb/testsuite/gdb.ada/taft_type/p.adb
@@ -20,4 +20,3 @@ procedure P is
begin
W := Create;
end P; -- START
-
diff --git a/gdb/testsuite/gdb.ada/tagged-lookup.exp b/gdb/testsuite/gdb.ada/tagged-lookup.exp
index 9c225c2..726ead2 100644
--- a/gdb/testsuite/gdb.ada/tagged-lookup.exp
+++ b/gdb/testsuite/gdb.ada/tagged-lookup.exp
@@ -23,7 +23,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/tagged.exp b/gdb/testsuite/gdb.ada/tagged.exp
index 8c0aa3a..20f1e33 100644
--- a/gdb/testsuite/gdb.ada/tagged.exp
+++ b/gdb/testsuite/gdb.ada/tagged.exp
@@ -22,7 +22,7 @@ require gnat_runtime_has_debug_info
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -34,19 +34,19 @@ runto "foo.adb:$bp_location"
# class-wide.
gdb_test "ptype segm" \
- [multi_line "type = new pck\\.object with record" \
- " width: integer;" \
- "end record" ]
+ [multi_line "type = new pck\\.object with record" \
+ " width: integer;" \
+ "end record" ]
gdb_test "print segm" \
- "= \\(position => 74, width => 8\\)"
+ "= \\(position => 74, width => 8\\)"
# Now, test printing of an class-wide object.
gdb_test "ptype obj" \
- [multi_line "type = new pck\\.object with record" \
- " width: integer;" \
- "end record" ]
+ [multi_line "type = new pck\\.object with record" \
+ " width: integer;" \
+ "end record" ]
gdb_test "print obj" \
- "= \\(position => 74, width => 8\\)"
+ "= \\(position => 74, width => 8\\)"
diff --git a/gdb/testsuite/gdb.ada/tagged/pck.adb b/gdb/testsuite/gdb.ada/tagged/pck.adb
index 7b1933a..4c32dd5 100644
--- a/gdb/testsuite/gdb.ada/tagged/pck.adb
+++ b/gdb/testsuite/gdb.ada/tagged/pck.adb
@@ -21,5 +21,3 @@ package body Pck is
end Do_Nothing;
end Pck;
-
-
diff --git a/gdb/testsuite/gdb.ada/tagged/pck.ads b/gdb/testsuite/gdb.ada/tagged/pck.ads
index 88095c0..9959192 100644
--- a/gdb/testsuite/gdb.ada/tagged/pck.ads
+++ b/gdb/testsuite/gdb.ada/tagged/pck.ads
@@ -28,5 +28,3 @@ package Pck is
procedure Do_Nothing (A : System.Address);
end Pck;
-
-
diff --git a/gdb/testsuite/gdb.ada/tagged_access.exp b/gdb/testsuite/gdb.ada/tagged_access.exp
index 212b8e9..4c5319f 100644
--- a/gdb/testsuite/gdb.ada/tagged_access.exp
+++ b/gdb/testsuite/gdb.ada/tagged_access.exp
@@ -26,7 +26,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" \
executable $flags] != ""} {
- return -1
+ return
}
clean_restart ${testfile}-${scenario}
diff --git a/gdb/testsuite/gdb.ada/tagged_not_init.exp b/gdb/testsuite/gdb.ada/tagged_not_init.exp
index 04cca39..61fbfa4 100644
--- a/gdb/testsuite/gdb.ada/tagged_not_init.exp
+++ b/gdb/testsuite/gdb.ada/tagged_not_init.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
@@ -29,4 +29,3 @@ set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb]
runto "foo.adb:$bp_location"
gdb_test "print obj" " = \\(x => -?$decimal\\)"
-
diff --git a/gdb/testsuite/gdb.ada/task_bp.exp b/gdb/testsuite/gdb.ada/task_bp.exp
index 08c25ea..de96082 100644
--- a/gdb/testsuite/gdb.ada/task_bp.exp
+++ b/gdb/testsuite/gdb.ada/task_bp.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
# Insert a breakpoint at LOC, and run the program expecting us to
@@ -47,7 +47,7 @@ proc test_bp { loc msg } {
}
set all_linespecs { "pck.dummy_task" "dummy_task"
- "pck.adb:pck.dummy_task" "pck.adb:dummy_task"}
+ "pck.adb:pck.dummy_task" "pck.adb:dummy_task"}
# First, test the linespecs when the associated symtab hasn't been
# expanded yet.
diff --git a/gdb/testsuite/gdb.ada/task_switch_in_core.exp b/gdb/testsuite/gdb.ada/task_switch_in_core.exp
index 3aafc2b..cb04c74 100644
--- a/gdb/testsuite/gdb.ada/task_switch_in_core.exp
+++ b/gdb/testsuite/gdb.ada/task_switch_in_core.exp
@@ -15,12 +15,12 @@
load_lib "ada.exp"
-require allow_ada_tests
+require allow_ada_tests gcore_cmd_available
standard_ada_testfile crash
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -32,13 +32,13 @@ clean_restart ${testfile}
if {![runto request_for_crash]} {
untested "couldn't run to Request_For_Crash"
- return -1
+ return
}
set corefile [standard_output_file crash.gcore]
set core_supported [gdb_gcore_cmd "$corefile" "save a corefile"]
if {!$core_supported} {
- return -1
+ return
}
# Now that the core file has been created, we can start the real
@@ -56,14 +56,14 @@ if { $core_loaded == -1 } {
# First, switch to task 1.
gdb_test "task 1" \
- "crash\\.request_for_crash \\(\\) at .*crash\\.adb:$decimal.*"
+ "crash\\.request_for_crash \\(\\) at .*crash\\.adb:$decimal.*"
gdb_test "info tasks" \
- [multi_line "\\s+ID\\s+TID\\s+P-ID\\s+Pri\\s+State\\s+Name" \
- "\\*\\s+1\\s+.*main_task" \
- "\\s+2.*my_t"] \
- "info tasks after switching to task 1"
+ [multi_line "\\s+ID\\s+TID\\s+P-ID\\s+Pri\\s+State\\s+Name" \
+ "\\*\\s+1\\s+.*main_task" \
+ "\\s+2.*my_t"] \
+ "info tasks after switching to task 1"
# Switch to task 2. Unlike in the case where we tested the switch to
# task 1, don't check the location where the debugger says the program
@@ -73,10 +73,10 @@ gdb_test "info tasks" \
# we will verify right after with an additional test that the current
# task is now task 2.
gdb_test "task 2" \
- "\\\[Switching to task 2 \"my_t\"\\\].*"
+ "\\\[Switching to task 2 \"my_t\"\\\].*"
gdb_test "info tasks" \
- [multi_line "\\s+ID\\s+TID\\s+P-ID\\s+Pri\\s+State\\s+Name" \
- "\\s+1\\s+.*main_task" \
- "\\*\\s+2.*my_t"] \
- "info tasks after switching to task 2"
+ [multi_line "\\s+ID\\s+TID\\s+P-ID\\s+Pri\\s+State\\s+Name" \
+ "\\s+1\\s+.*main_task" \
+ "\\*\\s+2.*my_t"] \
+ "info tasks after switching to task 2"
diff --git a/gdb/testsuite/gdb.ada/task_watch.exp b/gdb/testsuite/gdb.ada/task_watch.exp
index 646ddaa..54c9f10 100644
--- a/gdb/testsuite/gdb.ada/task_watch.exp
+++ b/gdb/testsuite/gdb.ada/task_watch.exp
@@ -24,7 +24,7 @@ require allow_hw_watchpoint_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/tasks.exp b/gdb/testsuite/gdb.ada/tasks.exp
index 6e1ed84..e36edea 100644
--- a/gdb/testsuite/gdb.ada/tasks.exp
+++ b/gdb/testsuite/gdb.ada/tasks.exp
@@ -22,7 +22,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -33,13 +33,13 @@ runto "foo.adb:$bp_location"
# Make sure that all tasks appear in the "info tasks" listing, and
# that the active task is the environment task.
gdb_test "info tasks" \
- [join {" +ID +TID P-ID Pri State +Name" \
- "\\* +1 .* main_task" \
- " +2 .* task_list\\(1\\)" \
- " +3 .* task_list\\(2\\)" \
- " +4 .* task_list\\(3\\)"} \
- "\r\n"] \
- "info tasks before inserting breakpoint"
+ [join {" +ID +TID P-ID Pri State +Name" \
+ "\\* +1 .* main_task" \
+ " +2 .* task_list\\(1\\)" \
+ " +3 .* task_list\\(2\\)" \
+ " +4 .* task_list\\(3\\)"} \
+ "\r\n"] \
+ "info tasks before inserting breakpoint"
# Confirm that the "info threads" output lines up with the tasks list.
gdb_test "info threads" \
@@ -159,19 +159,19 @@ if {[allow_guile_tests]} {
# task 3 will hit our breakpoint, and GDB is expected to stop at that
# point. Also make sure that GDB reports the correct breakpoint number.
gdb_test "continue" \
- ".*Breakpoint $bp_number, foo.break_me \\(\\).*" \
- "continue to breakpoint"
+ ".*Breakpoint $bp_number, foo.break_me \\(\\).*" \
+ "continue to breakpoint"
# Check that it is indeed task 3 that hit the breakpoint by checking
# which is the active task.
gdb_test "info tasks" \
- [join {" +ID +TID P-ID Pri State +Name" \
- " +1 .* main_task" \
- " +2 .* task_list\\(1\\)" \
- "\\* +3 .* task_list\\(2\\)" \
- " +4 .* task_list\\(3\\)"} \
- "\r\n"] \
- "info tasks after hitting breakpoint"
+ [join {" +ID +TID P-ID Pri State +Name" \
+ " +1 .* main_task" \
+ " +2 .* task_list\\(1\\)" \
+ "\\* +3 .* task_list\\(2\\)" \
+ " +4 .* task_list\\(3\\)"} \
+ "\r\n"] \
+ "info tasks after hitting breakpoint"
# Now, resume the execution and make sure that GDB does not stop when
# task 4 hits the breakpoint. Continuing thus results in our program
diff --git a/gdb/testsuite/gdb.ada/tick_last_segv.exp b/gdb/testsuite/gdb.ada/tick_last_segv.exp
index cfc449c..0ad2ef8 100644
--- a/gdb/testsuite/gdb.ada/tick_last_segv.exp
+++ b/gdb/testsuite/gdb.ada/tick_last_segv.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -31,10 +31,9 @@ clean_restart ${testfile}
# The actual value printed is of no interest in this testcase.
gdb_test "print short_integer'first" \
- "= -\[0-9\]+" \
- "print short-integer'first"
+ "= -\[0-9\]+" \
+ "print short-integer'first"
gdb_test "print short_integer'last" \
- "= \[0-9\]+" \
- "print short-integer'last"
-
+ "= \[0-9\]+" \
+ "print short-integer'last"
diff --git a/gdb/testsuite/gdb.ada/tick_length_array_enum_idx.exp b/gdb/testsuite/gdb.ada/tick_length_array_enum_idx.exp
index 04dc180..0f560b2 100644
--- a/gdb/testsuite/gdb.ada/tick_length_array_enum_idx.exp
+++ b/gdb/testsuite/gdb.ada/tick_length_array_enum_idx.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo_n207_004
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/tick_length_array_enum_idx/pck.adb b/gdb/testsuite/gdb.ada/tick_length_array_enum_idx/pck.adb
index 7cc5dd9..b94f40e 100644
--- a/gdb/testsuite/gdb.ada/tick_length_array_enum_idx/pck.adb
+++ b/gdb/testsuite/gdb.ada/tick_length_array_enum_idx/pck.adb
@@ -30,5 +30,3 @@ package body Pck is
null;
end Do_Nothing;
end Pck;
-
-
diff --git a/gdb/testsuite/gdb.ada/tick_length_array_enum_idx/pck.ads b/gdb/testsuite/gdb.ada/tick_length_array_enum_idx/pck.ads
index 7f0405e..7c00cb0 100644
--- a/gdb/testsuite/gdb.ada/tick_length_array_enum_idx/pck.ads
+++ b/gdb/testsuite/gdb.ada/tick_length_array_enum_idx/pck.ads
@@ -28,4 +28,3 @@ package Pck is
procedure Do_Nothing (A : System.Address);
end Pck;
-
diff --git a/gdb/testsuite/gdb.ada/type-tick-size.exp b/gdb/testsuite/gdb.ada/type-tick-size.exp
index dcfe32e..1a5cabc 100644
--- a/gdb/testsuite/gdb.ada/type-tick-size.exp
+++ b/gdb/testsuite/gdb.ada/type-tick-size.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile prog
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/type_coercion.exp b/gdb/testsuite/gdb.ada/type_coercion.exp
index b651ee4..201e4c0 100644
--- a/gdb/testsuite/gdb.ada/type_coercion.exp
+++ b/gdb/testsuite/gdb.ada/type_coercion.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile assign
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -29,19 +29,19 @@ set bp_location [gdb_get_line_number "START" ${testdir}/assign.adb]
runto "assign.adb:$bp_location"
gdb_test "p q" \
- "= \\(2, 3, 5, 7, 11\\)" "initial value of q"
+ "= \\(2, 3, 5, 7, 11\\)" "initial value of q"
gdb_test_no_output "set \$addr := q'address" \
- "save q'address in convenience variable"
+ "save q'address in convenience variable"
gdb_test "p {Integer} \$addr" \
- "= 2" \
- "print {Integer} \$addr"
+ "= 2" \
+ "print {Integer} \$addr"
# Now change the value at $addr using the same "{TYPE}" syntax.
gdb_test_no_output "set {Integer} \$addr := 19" \
- "set {Integer} \$addr := 19"
+ "set {Integer} \$addr := 19"
gdb_test "p q" \
- "= \\(19, 3, 5, 7, 11\\)" "modified value of q"
+ "= \\(19, 3, 5, 7, 11\\)" "modified value of q"
diff --git a/gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec.exp b/gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec.exp
index 9b274fc..db67715 100644
--- a/gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec.exp
+++ b/gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec.exp
@@ -23,7 +23,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
lappend flags debug
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
- return -1
+ return
}
clean_restart ${testfile}-${scenario}
diff --git a/gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec/foo.adb b/gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec/foo.adb
index 57b771e..b0537cb 100644
--- a/gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec/foo.adb
+++ b/gdb/testsuite/gdb.ada/unc_arr_ptr_in_var_rec/foo.adb
@@ -48,4 +48,3 @@ begin
Do_Nothing (My_Object'Address); -- STOP2
Do_Nothing (My_P_Object'Address);
end Foo;
-
diff --git a/gdb/testsuite/gdb.ada/unchecked_union.exp b/gdb/testsuite/gdb.ada/unchecked_union.exp
index 89c0593..52162e7 100644
--- a/gdb/testsuite/gdb.ada/unchecked_union.exp
+++ b/gdb/testsuite/gdb.ada/unchecked_union.exp
@@ -23,39 +23,54 @@ standard_ada_testfile unchecked_union
proc multi_line_string {str} {
set result {}
- foreach line [split $str \n] {
+ foreach line $str {
lappend result [string_to_regexp $line]
}
- return [eval multi_line $result]
+ set res [multi_line {*}$result]
+ verbose -log "RES: '$res'"
+ return $res
}
-set inner_string { case ? is
- when 0 =>
- small: range 0 .. 255;
- second: range 0 .. 255;
- when ? =>
- bval: range 0 .. 255;
- when others =>
- large: range 255 .. 510;
- more: range 255 .. 510;
- end case;
-}
-set inner_full "type = record (?) is\n${inner_string}end record"
+set inner_string \
+ [list \
+ " case ? is" \
+ " when 0 =>" \
+ " small: range 0 .. 255;" \
+ " second: range 0 .. 255;" \
+ " when ? =>" \
+ " bval: range 0 .. 255;" \
+ " when others =>" \
+ " large: range 255 .. 510;" \
+ " more: range 255 .. 510;" \
+ " end case;"]
-set pair_string { case ? is
- when ? =>
- field_one: range 0 .. 255;
- when ? =>
- field_two: range 255 .. 510;
- end case;
-}
-set pair_full "type = record\n${inner_string}${pair_string}end record"
+set inner_full \
+ [concat \
+ [list "type = record (?) is"] \
+ $inner_string \
+ [list "end record"]]
+
+set pair_string \
+ [list \
+ " case ? is" \
+ " when ? =>" \
+ " field_one: range 0 .. 255;" \
+ " when ? =>" \
+ " field_two: range 255 .. 510;" \
+ " end case;"]
+
+set pair_full \
+ [concat \
+ [list "type = record"] \
+ $inner_string \
+ $pair_string \
+ [list "end record"]]
foreach_gnat_encoding scenario flags {none all minimal} {
lappend flags debug
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
- return -1
+ return
}
clean_restart ${testfile}-${scenario}
diff --git a/gdb/testsuite/gdb.ada/uninitialized-variable-record.exp b/gdb/testsuite/gdb.ada/uninitialized-variable-record.exp
index 0e198cb..4cec919 100644
--- a/gdb/testsuite/gdb.ada/uninitialized-variable-record.exp
+++ b/gdb/testsuite/gdb.ada/uninitialized-variable-record.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile parse
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -91,7 +91,7 @@ for { set i 0 } { $i < 256 } { incr i } {
continue
}
- if { [expr $size > $offset_d] } {
+ if {$size > $offset_d} {
# Field d fits in the size.
continue
}
@@ -101,7 +101,7 @@ for { set i 0 } { $i < 256 } { incr i } {
}
}
-require {expr $interesting_discriminator != -1}
+require {expr {$interesting_discriminator != -1}}
foreach lang [gdb_supported_languages] {
with_test_prefix $lang {
diff --git a/gdb/testsuite/gdb.ada/uninitialized_vars.exp b/gdb/testsuite/gdb.ada/uninitialized_vars.exp
index 8d979dc..f01c7ca 100644
--- a/gdb/testsuite/gdb.ada/uninitialized_vars.exp
+++ b/gdb/testsuite/gdb.ada/uninitialized_vars.exp
@@ -23,7 +23,7 @@ require allow_ada_tests
standard_ada_testfile parse
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -35,4 +35,4 @@ runto "parse.adb:$bp_location"
# Check that printing uninitialized variables does not crash the debugger.
gdb_test "info locals" \
- ".*"
+ ".*"
diff --git a/gdb/testsuite/gdb.ada/unsigned_last.exp b/gdb/testsuite/gdb.ada/unsigned_last.exp
index e8e082b..3e0b96f 100644
--- a/gdb/testsuite/gdb.ada/unsigned_last.exp
+++ b/gdb/testsuite/gdb.ada/unsigned_last.exp
@@ -23,7 +23,7 @@ require allow_ada_tests
standard_ada_testfile main
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/unsigned_range.exp b/gdb/testsuite/gdb.ada/unsigned_range.exp
index b18fa12..cd72757 100644
--- a/gdb/testsuite/gdb.ada/unsigned_range.exp
+++ b/gdb/testsuite/gdb.ada/unsigned_range.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/var_arr_attrs.exp b/gdb/testsuite/gdb.ada/var_arr_attrs.exp
index 6672c25..05faf93 100644
--- a/gdb/testsuite/gdb.ada/var_arr_attrs.exp
+++ b/gdb/testsuite/gdb.ada/var_arr_attrs.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo_o115_002
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/var_arr_attrs/foo_o115_002.adb b/gdb/testsuite/gdb.ada/var_arr_attrs/foo_o115_002.adb
index c07c90c..7a815b6 100644
--- a/gdb/testsuite/gdb.ada/var_arr_attrs/foo_o115_002.adb
+++ b/gdb/testsuite/gdb.ada/var_arr_attrs/foo_o115_002.adb
@@ -22,4 +22,3 @@ begin
Do_Nothing (My_Object'Address); -- STOP
Do_Nothing (My_Small_Object'Address);
end Foo_O115_002;
-
diff --git a/gdb/testsuite/gdb.ada/var_arr_typedef.exp b/gdb/testsuite/gdb.ada/var_arr_typedef.exp
index 061027e..8b52583 100644
--- a/gdb/testsuite/gdb.ada/var_arr_typedef.exp
+++ b/gdb/testsuite/gdb.ada/var_arr_typedef.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile var_arr_typedef
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -37,10 +37,10 @@ set vb "\\($rb, $rb, $ra, $ra\\)"
set a "\\($va, $va, $vb, $vb\\)"
gdb_test "print va" \
- " = $va"
+ " = $va"
gdb_test "print vb" \
- " = $vb"
+ " = $vb"
gdb_test "print a" \
- " = $a"
+ " = $a"
diff --git a/gdb/testsuite/gdb.ada/var_arr_typedef/pack.adb b/gdb/testsuite/gdb.ada/var_arr_typedef/pack.adb
index 2f9114a..80cfac1 100644
--- a/gdb/testsuite/gdb.ada/var_arr_typedef/pack.adb
+++ b/gdb/testsuite/gdb.ada/var_arr_typedef/pack.adb
@@ -20,6 +20,6 @@ package body Pack is
return I;
end Identity;
- procedure Do_Nothing (A : Array_Type) is null;
+ procedure Do_Nothing (A : System.Address) is null;
end Pack;
diff --git a/gdb/testsuite/gdb.ada/var_arr_typedef/pack.ads b/gdb/testsuite/gdb.ada/var_arr_typedef/pack.ads
index 2ceb071..353ec48 100644
--- a/gdb/testsuite/gdb.ada/var_arr_typedef/pack.ads
+++ b/gdb/testsuite/gdb.ada/var_arr_typedef/pack.ads
@@ -13,6 +13,8 @@
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
+with System; use System;
+
package Pack is
type Rec_Type is record
I : Integer;
@@ -23,7 +25,7 @@ package Pack is
type Array_Type is array (Positive range <>) of Vec_Type;
- procedure Do_Nothing (A : Array_Type);
+ procedure Do_Nothing (A : System.Address);
function Identity (I : Integer) return Integer;
end Pack;
diff --git a/gdb/testsuite/gdb.ada/var_arr_typedef/var_arr_typedef.adb b/gdb/testsuite/gdb.ada/var_arr_typedef/var_arr_typedef.adb
index 4a7f4cb..86609a8 100644
--- a/gdb/testsuite/gdb.ada/var_arr_typedef/var_arr_typedef.adb
+++ b/gdb/testsuite/gdb.ada/var_arr_typedef/var_arr_typedef.adb
@@ -24,5 +24,5 @@ procedure Var_Arr_Typedef is
A : constant Array_Type (1 .. Identity (4)) := (VA, VA, VB, VB);
begin
- Do_Nothing (A); -- BREAK
+ Do_Nothing (A'Address); -- BREAK
end Var_Arr_Typedef;
diff --git a/gdb/testsuite/gdb.ada/var_rec_arr.exp b/gdb/testsuite/gdb.ada/var_rec_arr.exp
index 49713e2..73c5f6d 100644
--- a/gdb/testsuite/gdb.ada/var_rec_arr.exp
+++ b/gdb/testsuite/gdb.ada/var_rec_arr.exp
@@ -26,7 +26,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
lappend flags debug
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
- return -1
+ return
}
clean_restart ${testfile}-${scenario}
diff --git a/gdb/testsuite/gdb.ada/variant-record.exp b/gdb/testsuite/gdb.ada/variant-record.exp
index 24f105c..338b4fb 100644
--- a/gdb/testsuite/gdb.ada/variant-record.exp
+++ b/gdb/testsuite/gdb.ada/variant-record.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile proc
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable debug] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/variant.exp b/gdb/testsuite/gdb.ada/variant.exp
index c52abbc..b1cc728 100644
--- a/gdb/testsuite/gdb.ada/variant.exp
+++ b/gdb/testsuite/gdb.ada/variant.exp
@@ -24,7 +24,7 @@ foreach_gnat_encoding scenario flags {none all minimal} {
lappend flags debug
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
- return -1
+ return
}
clean_restart ${testfile}-${scenario}
diff --git a/gdb/testsuite/gdb.ada/variant_record_field.exp b/gdb/testsuite/gdb.ada/variant_record_field.exp
index 9c7793d..1308810 100644
--- a/gdb/testsuite/gdb.ada/variant_record_field.exp
+++ b/gdb/testsuite/gdb.ada/variant_record_field.exp
@@ -32,7 +32,7 @@ standard_ada_testfile foo
# making guarantees beyond -Og though, so test that.
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug optimize=-Og]] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
@@ -46,7 +46,7 @@ gdb_test_multiple "$test" "$test" {
pass $test
}
-re "\\(kind => five, i => <error reading variable: access outside bounds of object>" {
- if { [gcc_major_version] <= 14 } {
+ if { [gnat_version_compare < 15] } {
setup_xfail *-*-*
}
fail $test
diff --git a/gdb/testsuite/gdb.ada/variant_record_packed_array.exp b/gdb/testsuite/gdb.ada/variant_record_packed_array.exp
index 688042f..cdfb4f4 100644
--- a/gdb/testsuite/gdb.ada/variant_record_packed_array.exp
+++ b/gdb/testsuite/gdb.ada/variant_record_packed_array.exp
@@ -23,7 +23,7 @@ foreach_gnat_encoding scenario flags {all minimal} {
lappend flags debug
if {[gdb_compile_ada "${srcfile}" "${binfile}-${scenario}" executable $flags] != ""} {
- return -1
+ return
}
clean_restart ${testfile}-${scenario}
diff --git a/gdb/testsuite/gdb.ada/varsize_limit.exp b/gdb/testsuite/gdb.ada/varsize_limit.exp
index 9b58ccc..171b2e4 100644
--- a/gdb/testsuite/gdb.ada/varsize_limit.exp
+++ b/gdb/testsuite/gdb.ada/varsize_limit.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile vsizelim
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/verylong.exp b/gdb/testsuite/gdb.ada/verylong.exp
index e695ddd..e504de7 100644
--- a/gdb/testsuite/gdb.ada/verylong.exp
+++ b/gdb/testsuite/gdb.ada/verylong.exp
@@ -21,7 +21,7 @@ require {gnat_version_compare >= 11}
standard_ada_testfile prog
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
@@ -41,13 +41,13 @@ gdb_test_multiple "ptype Long_Long_Long_Integer" "" {
}
}
-require {expr $lll_int_size == 8 || $lll_int_size == 16}
+require {expr {$lll_int_size == 8 || $lll_int_size == 16}}
gdb_test "print x" " = $max"
-gdb_test "print x / 2" " = [expr $max / 2]"
-gdb_test "print (x / 4) * 2" " = [expr ($max / 4) * 2]"
+gdb_test "print x / 2" " = [expr {$max / 2}]"
+gdb_test "print (x / 4) * 2" " = [expr {($max / 4) * 2}]"
gdb_test "print x - x" " = 0"
-gdb_test "print x - 99 + 1" " = [expr $max - 99 + 1]"
+gdb_test "print x - 99 + 1" " = [expr {$max - 99 + 1}]"
gdb_test "print -x" " = -$max"
gdb_test "print +x" " = $max"
diff --git a/gdb/testsuite/gdb.ada/vla.exp b/gdb/testsuite/gdb.ada/vla.exp
index 7973cc1..dc418d8 100644
--- a/gdb/testsuite/gdb.ada/vla.exp
+++ b/gdb/testsuite/gdb.ada/vla.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile vla
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
@@ -29,10 +29,10 @@ set bp_location [gdb_get_line_number "Set breakpoint here" ${testdir}/vla.adb]
runto "vla.adb:$bp_location"
gdb_test "print r00" \
- "= \\(l1 => 0, l2 => 0, i1 => 1, a1 => \\(\\), i2 => 2, a2 => \\(\\), i3 => 3\\)"
+ "= \\(l1 => 0, l2 => 0, i1 => 1, a1 => \\(\\), i2 => 2, a2 => \\(\\), i3 => 3\\)"
gdb_test "print r01" \
- "= \\(l1 => 0, l2 => 1, i1 => 1, a1 => \\(\\), i2 => 2, a2 => \\(20\\), i3 => 3\\)"
+ "= \\(l1 => 0, l2 => 1, i1 => 1, a1 => \\(\\), i2 => 2, a2 => \\(20\\), i3 => 3\\)"
gdb_test "print r10" \
- "= \\(l1 => 1, l2 => 0, i1 => 1, a1 => \\(10\\), i2 => 2, a2 => \\(\\), i3 => 3\\)"
+ "= \\(l1 => 1, l2 => 0, i1 => 1, a1 => \\(10\\), i2 => 2, a2 => \\(\\), i3 => 3\\)"
gdb_test "print r22" \
- "= \\(l1 => 2, l2 => 2, i1 => 1, a1 => \\(10, 10\\), i2 => 2, a2 => \\(20, 20\\), i3 => 3\\)"
+ "= \\(l1 => 2, l2 => 2, i1 => 1, a1 => \\(10, 10\\), i2 => 2, a2 => \\(20, 20\\), i3 => 3\\)"
diff --git a/gdb/testsuite/gdb.ada/voidctx.exp b/gdb/testsuite/gdb.ada/voidctx.exp
index 2d7c5a1..c48f51c 100644
--- a/gdb/testsuite/gdb.ada/voidctx.exp
+++ b/gdb/testsuite/gdb.ada/voidctx.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile voidctx
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/watch_arg.exp b/gdb/testsuite/gdb.ada/watch_arg.exp
index 155ae2a..7927f8a 100644
--- a/gdb/testsuite/gdb.ada/watch_arg.exp
+++ b/gdb/testsuite/gdb.ada/watch_arg.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile watch
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
@@ -31,14 +31,14 @@ runto "watch.adb:$bp_location"
# Insert a watchpoint on argument X
gdb_test "watch x" \
- ".*atchpoint \[0-9\]+: x" \
- "set watchpoint on function argument X"
+ ".*atchpoint \[0-9\]+: x" \
+ "set watchpoint on function argument X"
# Then insert a breakpoint at the location we'd like to continue to...
set bp_location [gdb_get_line_number "BREAK2" ${testdir}/watch.adb]
gdb_test "break watch.adb:$bp_location" \
- "Breakpoint \[0-9\]+ at.*: file .*watch.adb, line \[0-9\]+." \
- "insert second breakpoint in watch.adb"
+ "Breakpoint \[0-9\]+ at.*: file .*watch.adb, line \[0-9\]+." \
+ "insert second breakpoint in watch.adb"
# Continue again. We should be stopped at the (internal) breakpoint
# that we setup to delete the watchpoint as soon as the program leaves
@@ -53,7 +53,5 @@ gdb_test \
# we inserted.
gdb_test "cont" \
- "Breakpoint \[0-9\]+, watch \\(\\).*" \
- "continuing to second breakpoint"
-
-
+ "Breakpoint \[0-9\]+, watch \\(\\).*" \
+ "continuing to second breakpoint"
diff --git a/gdb/testsuite/gdb.ada/watch_arg/watch.adb b/gdb/testsuite/gdb.ada/watch_arg/watch.adb
index fa09776..f33f8c0 100644
--- a/gdb/testsuite/gdb.ada/watch_arg/watch.adb
+++ b/gdb/testsuite/gdb.ada/watch_arg/watch.adb
@@ -29,4 +29,3 @@ begin
Foo (X);
X := 2; -- BREAK2
end Watch;
-
diff --git a/gdb/testsuite/gdb.ada/watch_minus_l.exp b/gdb/testsuite/gdb.ada/watch_minus_l.exp
index fb998ce..7cda58c 100644
--- a/gdb/testsuite/gdb.ada/watch_minus_l.exp
+++ b/gdb/testsuite/gdb.ada/watch_minus_l.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo_ra10_006
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable {debug}] != ""} {
- return -1
+ return
}
clean_restart ${testfile}
@@ -31,7 +31,7 @@ runto "foo_ra10_006.adb:$bp_location"
# Insert a watchpoint on argument X
gdb_test "watch -location pck.global_var" \
- ".*atchpoint \[0-9\]+: -location pck.global_var"
+ ".*atchpoint \[0-9\]+: -location pck.global_var"
# Continue again. We should be stopped at the (internal) breakpoint
# that we setup to delete the watchpoint as soon as the program leaves
diff --git a/gdb/testsuite/gdb.ada/whatis_array_val.exp b/gdb/testsuite/gdb.ada/whatis_array_val.exp
index 2ccac34..78ca14c 100644
--- a/gdb/testsuite/gdb.ada/whatis_array_val.exp
+++ b/gdb/testsuite/gdb.ada/whatis_array_val.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
@@ -28,15 +28,14 @@ clean_restart ${testfile}
set bp_location [gdb_get_line_number "STOP" ${testdir}/foo.adb]
if {![runto "foo.adb:$bp_location"]} {
return
-}
+}
# Accept "foo." prefix for older versions of GNAT.
gdb_test "whatis full" \
- "type = (foo\\.)?full_table"
+ "type = (foo\\.)?full_table"
gdb_test "print full" \
- " = \\(144, 233, 377, 610, 987\\)"
+ " = \\(144, 233, 377, 610, 987\\)"
gdb_test "whatis $" \
- "type = (foo\\.)?full_table"
-
+ "type = (foo\\.)?full_table"
diff --git a/gdb/testsuite/gdb.ada/whatis_array_val/foo.adb b/gdb/testsuite/gdb.ada/whatis_array_val/foo.adb
index 7315359..6a110c2 100644
--- a/gdb/testsuite/gdb.ada/whatis_array_val/foo.adb
+++ b/gdb/testsuite/gdb.ada/whatis_array_val/foo.adb
@@ -22,4 +22,3 @@ procedure Foo is
begin
Do_Nothing (Full'Address); -- STOP
end Foo;
-
diff --git a/gdb/testsuite/gdb.ada/widewide.exp b/gdb/testsuite/gdb.ada/widewide.exp
index 66ce7f7..722cf41 100644
--- a/gdb/testsuite/gdb.ada/widewide.exp
+++ b/gdb/testsuite/gdb.ada/widewide.exp
@@ -20,7 +20,7 @@ require allow_ada_tests
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
diff --git a/gdb/testsuite/gdb.ada/win_fu_syms.exp b/gdb/testsuite/gdb.ada/win_fu_syms.exp
index 800e610..837ea48 100644
--- a/gdb/testsuite/gdb.ada/win_fu_syms.exp
+++ b/gdb/testsuite/gdb.ada/win_fu_syms.exp
@@ -21,18 +21,17 @@ require ada_shared_link
standard_ada_testfile foo
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug additional_flags=-bargs additional_flags=-shared additional_flags=-margs]] != "" } {
- return -1
+ return
}
clean_restart ${testfile}
set loc [gdb_get_line_number "Integer" ${testdir}/foo.adb]
gdb_test "info line foo.adb:$loc" \
- "Line $decimal of \".*foo\\.adb\" starts at address $hex <_ada_foo\\+$decimal> and ends at $hex <_ada_foo\\+$decimal>\\." \
- "info line on variable declaration"
+ "Line $decimal of \".*foo\\.adb\" starts at address $hex <_ada_foo\\+$decimal> and ends at $hex <_ada_foo\\+$decimal>\\." \
+ "info line on variable declaration"
set loc [gdb_get_line_number "Do_Nothing" ${testdir}/foo.adb]
gdb_test "info line foo.adb:$loc" \
- "Line $decimal of \".*foo\\.adb\" starts at address $hex <_ada_foo\\+$decimal> and ends at $hex <_ada_foo\\+$decimal>\\." \
- "info line on Do_Nothing call"
-
+ "Line $decimal of \".*foo\\.adb\" starts at address $hex <_ada_foo\\+$decimal> and ends at $hex <_ada_foo\\+$decimal>\\." \
+ "info line on Do_Nothing call"