binutils-gdb/gdb/testsuite/gdb.ada
Tom de Vries 3d11e68e4b [gdb/testsuite] Remove superfluous 3rd argument from gdb_test call
There's a pattern:
...
gdb_test <command> <pattern> <command>
...
that can be written shorter as:
...
gdb_test <command> <pattern>
...

Detect this pattern in proc gdb_test:
...
     global gdb_prompt
     upvar timeout timeout

     if [llength $args]>2 then {
 	set message [lindex $args 2]
+	if { $message == [lindex $args 0] } {
+	    error "HERE"
+	}
     } else {
 	set message [lindex $args 0]
     }
...
and fix all occurences in gdb.ada.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2019-10-31  Tom de Vries  <tdevries@suse.de>

	* gdb.ada/array_bounds.exp: Drop superfluous 3rd argument to gdb_test.
	* gdb.ada/array_subscript_addr.exp: Same.
	* gdb.ada/arrayidx.exp: Same.
	* gdb.ada/arrayparam.exp: Same.
	* gdb.ada/arrayptr.exp: Same.
	* gdb.ada/boolean_expr.exp: Same.
	* gdb.ada/call_pn.exp: Same.
	* gdb.ada/complete.exp: Same.
	* gdb.ada/fixed_cmp.exp: Same.
	* gdb.ada/fun_addr.exp: Same.
	* gdb.ada/funcall_param.exp: Same.
	* gdb.ada/interface.exp: Same.
	* gdb.ada/mod_from_name.exp: Same.
	* gdb.ada/null_array.exp: Same.
	* gdb.ada/packed_array.exp: Same.
	* gdb.ada/packed_tagged.exp: Same.
	* gdb.ada/print_chars.exp: Same.
	* gdb.ada/print_pc.exp: Same.
	* gdb.ada/ptype_arith_binop.exp: Same.
	* gdb.ada/ptype_field.exp: Same.
	* gdb.ada/ptype_tagged_param.exp: Same.
	* gdb.ada/rec_return.exp: Same.
	* gdb.ada/ref_tick_size.exp: Same.
	* gdb.ada/str_ref_cmp.exp: Same.
	* gdb.ada/taft_type.exp: Same.
	* gdb.ada/tagged.exp: Same.
	* gdb.ada/type_coercion.exp: Same.
	* gdb.ada/uninitialized_vars.exp: Same.

Change-Id: Ibb84a41573c7f21295f3fd42da9b96534205c5c4
2019-10-31 17:37:02 +01:00
..
access_tagged_param
access_to_packed_array
access_to_unbounded_array
addr_arith
aliased_array
arr_acc_idx_w_gap
arr_arr
arr_enum_idx_w_gap
array_bounds
array_char_idx
array_of_variable_length
array_ptr_renaming
array_return
array_subscript_addr
arraydim
arrayidx
arrayparam
arrayptr
assign_arr
atomic_enum
attr_ref_and_charlit
bad-task-bp-keyword
bias Handle biased types 2019-09-03 10:20:40 -06:00
big_packed_array
bp_c_mixed_case
bp_enum_homonym
bp_fun_addr
bp_inlined_func
bp_on_var
bp_range_type
bp_reset
byte_packed_arr
call_pn
catch_assert_if
catch_ex
catch_ex_std
char_enum Fix bug with character enumeration literal 2019-08-15 13:42:31 -06:00
char_param
complete
cond_lang
convvar_comp
dgopt Fix latent bug in .debug_names file-name handling 2019-09-10 08:30:45 -06:00
disc_arr_bound
display_nested
dot_all
dyn_arrayidx
dyn_loc
dyn_stride
enum_idx_packed
excep_handle
exec_changed
expr_delims
expr_with_funcall
exprs
fin_fun_out
fixed_cmp
fixed_points
float_param
formatted_ref
frame_arg_lang
frame_args
fullname_bp
fun_addr
fun_in_declare
fun_overload_menu
fun_renaming
funcall_char
funcall_param
funcall_ptr
funcall_ref
homonym
info_addr_mixed_case
info_auto_lang
info_exc
info_locals_renaming
int_deref
interface
iwide
lang_switch
length_cond
maint_with_ada
mi_catch_assert
mi_catch_ex
mi_catch_ex_hand
mi_dyn_arr
mi_ex_cond
mi_exc_info
mi_interface
mi_ref_changeable
mi_string_access
mi_task_arg
mi_task_info
mi_var_array
mi_var_union
minsyms
mod_from_name
n_arr_bound
nested
notcplusplus
null_array
null_record
O2_float_param
operator_bp
optim_drec
out_of_line_in_inlined
packed_array
packed_array_assign
packed_tagged
pckd_arr_ren
pckd_neg
pkd_arr_elem
pp-rec-component
print_chars Handle biased types 2019-09-03 10:20:40 -06:00
ptr_typedef
ptype_array
ptype_field
ptype_tagged_param
py_range
py_taft Do not expose stub types to Python 2019-09-26 08:26:12 -06:00
rdv_wait
rec_comp
rec_return
ref_param
ref_tick_size
rename_subscript_param
repeat_dyn
same_component_name
same_enum
scoped_watch
set_pckd_arr_elt
set_wstr
small_reg_param
start
str_binop_equal
str_ref_cmp
str_uninit
sym_print_name
taft_type
tagged
tagged_access
tagged_not_init
task_bp
task_switch_in_core
tasks
tick_last_segv
tick_length_array_enum_idx
type_coercion
unc_arr_ptr_in_var_rec
uninitialized_vars
var_arr_attrs
var_arr_typedef
var_rec_arr
variant_record_packed_array
varsize_limit
vla
watch_arg
watch_minus_l
whatis_array_val
widewide
win_fu_syms
access_tagged_param.exp
access_to_packed_array.exp
access_to_unbounded_array.exp
addr_arith.exp
aliased_array.exp
arr_acc_idx_w_gap.exp
arr_arr.exp
arr_enum_idx_w_gap.exp
array_bounds.exp [gdb/testsuite] Remove superfluous 3rd argument from gdb_test call 2019-10-31 17:37:02 +01:00
array_char_idx.exp
array_of_variable_length.exp
array_ptr_renaming.exp
array_return.exp
array_subscript_addr.exp [gdb/testsuite] Remove superfluous 3rd argument from gdb_test call 2019-10-31 17:37:02 +01:00
arraydim.exp
arrayidx.exp [gdb/testsuite] Remove superfluous 3rd argument from gdb_test call 2019-10-31 17:37:02 +01:00
arrayparam.exp [gdb/testsuite] Remove superfluous 3rd argument from gdb_test call 2019-10-31 17:37:02 +01:00
arrayptr.exp [gdb/testsuite] Remove superfluous 3rd argument from gdb_test call 2019-10-31 17:37:02 +01:00
assign_1.exp
assign_arr.exp
atomic_enum.exp
attr_ref_and_charlit.exp
bad-task-bp-keyword.exp
bias.exp Handle biased types 2019-09-03 10:20:40 -06:00
big_packed_array.exp
boolean_expr.exp [gdb/testsuite] Remove superfluous 3rd argument from gdb_test call 2019-10-31 17:37:02 +01:00
bp_c_mixed_case.exp
bp_enum_homonym.exp
bp_fun_addr.exp
bp_inlined_func.exp
bp_on_var.exp
bp_range_type.exp
bp_reset.exp
byte_packed_arr.exp
call_pn.exp [gdb/testsuite] Remove superfluous 3rd argument from gdb_test call 2019-10-31 17:37:02 +01:00
catch_assert_if.exp
catch_ex_std.exp gdb/testsuite/ada: Handle missing debug info case 2019-10-07 13:17:49 +01:00
catch_ex.exp
char_enum.exp Fix bug with character enumeration literal 2019-08-15 13:42:31 -06:00
char_param.exp
complete.exp [gdb/testsuite] Remove superfluous 3rd argument from gdb_test call 2019-10-31 17:37:02 +01:00
cond_lang.exp
convvar_comp.exp
dgopt.exp Fix latent bug in .debug_names file-name handling 2019-09-10 08:30:45 -06:00
disc_arr_bound.exp
display_nested.exp
dot_all.exp
dyn_arrayidx.exp
dyn_loc.exp
dyn_stride.exp
enum_idx_packed.exp
excep_handle.exp
exec_changed.exp
expr_delims.exp
expr_with_funcall.exp
exprs.exp
fin_fun_out.exp
fixed_cmp.exp [gdb/testsuite] Remove superfluous 3rd argument from gdb_test call 2019-10-31 17:37:02 +01:00
fixed_points.exp
float_param.exp
formatted_ref.exp
frame_arg_lang.exp
frame_args.exp
fullname_bp.exp
fun_addr.exp [gdb/testsuite] Remove superfluous 3rd argument from gdb_test call 2019-10-31 17:37:02 +01:00
fun_in_declare.exp
fun_overload_menu.exp
fun_renaming.exp
funcall_char.exp
funcall_param.exp [gdb/testsuite] Remove superfluous 3rd argument from gdb_test call 2019-10-31 17:37:02 +01:00
funcall_ptr.exp
funcall_ref.exp
homonym.exp
info_addr_mixed_case.exp
info_auto_lang.exp
info_exc.exp
info_locals_renaming.exp
info_types.c
info_types.exp
int_deref.exp
interface.exp [gdb/testsuite] Remove superfluous 3rd argument from gdb_test call 2019-10-31 17:37:02 +01:00
iwide.exp
lang_switch.exp
length_cond.exp
maint_with_ada.exp
mi_catch_assert.exp
mi_catch_ex_hand.exp
mi_catch_ex.exp
mi_dyn_arr.exp
mi_ex_cond.exp
mi_exc_info.exp
mi_interface.exp
mi_ref_changeable.exp
mi_string_access.exp
mi_task_arg.exp [gdb/testsuite] Fix gdb.ada/mi_task_arg.exp 2019-10-15 02:21:37 +02:00
mi_task_info.exp
mi_var_array.exp
mi_var_union.exp
minsyms.exp
mod_from_name.exp [gdb/testsuite] Remove superfluous 3rd argument from gdb_test call 2019-10-31 17:37:02 +01:00
n_arr_bound.exp
nested.exp
notcplusplus.exp
null_array.exp [gdb/testsuite] Remove superfluous 3rd argument from gdb_test call 2019-10-31 17:37:02 +01:00
null_record.exp
O2_float_param.exp
operator_bp.exp
optim_drec.exp
out_of_line_in_inlined.exp
packed_array_assign.exp
packed_array.exp [gdb/testsuite] Remove superfluous 3rd argument from gdb_test call 2019-10-31 17:37:02 +01:00
packed_tagged.exp [gdb/testsuite] Remove superfluous 3rd argument from gdb_test call 2019-10-31 17:37:02 +01:00
pckd_arr_ren.exp
pckd_neg.exp
pkd_arr_elem.exp
pp-rec-component.exp
pp-rec-component.py
print_chars.exp [gdb/testsuite] Remove superfluous 3rd argument from gdb_test call 2019-10-31 17:37:02 +01:00
print_pc.exp [gdb/testsuite] Remove superfluous 3rd argument from gdb_test call 2019-10-31 17:37:02 +01:00
ptr_typedef.exp
ptype_arith_binop.exp [gdb/testsuite] Remove superfluous 3rd argument from gdb_test call 2019-10-31 17:37:02 +01:00
ptype_array.exp
ptype_field.exp [gdb/testsuite] Remove superfluous 3rd argument from gdb_test call 2019-10-31 17:37:02 +01:00
ptype_tagged_param.exp [gdb/testsuite] Remove superfluous 3rd argument from gdb_test call 2019-10-31 17:37:02 +01:00
ptype_union.c
ptype_union.exp
py_range.exp
py_taft.exp Do not expose stub types to Python 2019-09-26 08:26:12 -06:00
rdv_wait.exp Output the Ada task name in more messages. 2019-09-12 21:57:10 +02:00
rec_comp.exp
rec_return.exp [gdb/testsuite] Remove superfluous 3rd argument from gdb_test call 2019-10-31 17:37:02 +01:00
ref_param.exp
ref_tick_size.exp [gdb/testsuite] Remove superfluous 3rd argument from gdb_test call 2019-10-31 17:37:02 +01:00
rename_subscript_param.exp [gdb/testsuite] Require gnatmake 8 for gdb.ada/rename_subscript_param.exp 2019-09-14 10:35:48 +02:00
repeat_dyn.exp
same_component_name.exp
same_enum.exp
scoped_watch.exp
set_pckd_arr_elt.exp
set_wstr.exp
small_reg_param.exp
start.exp
str_binop_equal.exp
str_ref_cmp.exp [gdb/testsuite] Remove superfluous 3rd argument from gdb_test call 2019-10-31 17:37:02 +01:00
str_uninit.exp
sym_print_name.exp
taft_type.exp [gdb/testsuite] Remove superfluous 3rd argument from gdb_test call 2019-10-31 17:37:02 +01:00
tagged_access.exp
tagged_not_init.exp
tagged.exp [gdb/testsuite] Remove superfluous 3rd argument from gdb_test call 2019-10-31 17:37:02 +01:00
task_bp.exp
task_switch_in_core.exp Output the Ada task name in more messages. 2019-09-12 21:57:10 +02:00
tasks.exp
tick_last_segv.exp
tick_length_array_enum_idx.exp
type_coercion.exp [gdb/testsuite] Remove superfluous 3rd argument from gdb_test call 2019-10-31 17:37:02 +01:00
unc_arr_ptr_in_var_rec.exp
uninitialized_vars.exp [gdb/testsuite] Remove superfluous 3rd argument from gdb_test call 2019-10-31 17:37:02 +01:00
var_arr_attrs.exp
var_arr_typedef.exp
var_rec_arr.exp
variant_record_packed_array.exp
varsize_limit.exp
vla.exp
watch_arg.exp
watch_minus_l.exp
whatis_array_val.exp
widewide.exp
win_fu_syms.exp