View | Details | Raw Unified | Return to bug 24831
Collapse All | Expand All

(-)a/gdb/testsuite/gdb.multi/tids.exp (-7 / +14 lines)
Lines 84-97 proc thr_apply_info_thr {tid_list info_thr {thr_apply ""}} { Link Here
84
    thread_apply $tid_list $thr_apply
84
    thread_apply $tid_list $thr_apply
85
}
85
}
86
86
87
# Issue both "info threads TID_LIST" and "thread apply TID_LIST" and
87
# Issue both "thread apply TID_LIST" and "info threads TID_LIST" and
88
# expect both commands to error out with EXP_ERROR.
88
# expect commands to error out with EXP_ERROR_APPLY and EXP_ERROR_INFO.
89
proc thr_apply_info_thr_error {tid_list exp_error}  {
89
# If EXP_ERROR_INFO is missing, default to EXP_ERROR_APPLY.
90
proc thr_apply_info_thr_error {tid_list exp_error_apply {exp_error_info ""}} {
91
    if { "$exp_error_info" == "" } {
92
	set exp_error_info "$exp_error_apply"
93
    }
94
90
    gdb_test "info threads $tid_list" \
95
    gdb_test "info threads $tid_list" \
91
	$exp_error
96
	$exp_error_info
92
97
93
    gdb_test "thread apply $tid_list" \
98
    gdb_test "thread apply $tid_list" \
94
	$exp_error \
99
	$exp_error_apply \
95
	"thread apply $tid_list"
100
	"thread apply $tid_list"
96
}
101
}
97
102
Lines 351-358 with_test_prefix "two inferiors" { Link Here
351
	thr_apply_info_thr_error "${prefix}2-1" "inverted range"
356
	thr_apply_info_thr_error "${prefix}2-1" "inverted range"
352
	thr_apply_info_thr_error "${prefix}2-\$one" "inverted range"
357
	thr_apply_info_thr_error "${prefix}2-\$one" "inverted range"
353
	if {$prefix == ""} {
358
	if {$prefix == ""} {
354
	    thr_apply_info_thr_error "${prefix}-1" "Invalid thread ID: -1"
359
	    thr_apply_info_thr_error "${prefix}-1" "Invalid thread ID: -1" \
355
	    thr_apply_info_thr_error "${prefix}-\$one" "Invalid thread ID: -\\\$one"
360
		"Unrecognized option at: -1"
361
	    thr_apply_info_thr_error "${prefix}-\$one" \
362
		"Invalid thread ID: -\\\$one" "Unrecognized option at: -\\\$one"
356
	} else {
363
	} else {
357
	    thr_apply_info_thr_error "${prefix}-1" "negative value"
364
	    thr_apply_info_thr_error "${prefix}-1" "negative value"
358
	    thr_apply_info_thr_error "${prefix}-\$one" "negative value"
365
	    thr_apply_info_thr_error "${prefix}-\$one" "negative value"

Return to bug 24831