mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-24 18:44:20 +08:00
3d11e68e4b
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
49 lines
1.4 KiB
Plaintext
49 lines
1.4 KiB
Plaintext
# Copyright 2008-2019 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"
|
|
|
|
standard_ada_testfile foo
|
|
|
|
if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug]] != "" } {
|
|
return -1
|
|
}
|
|
|
|
clean_restart ${testfile}
|
|
|
|
set bp_location [gdb_get_line_number "START" ${testdir}/foo.adb]
|
|
runto "foo.adb:$bp_location"
|
|
|
|
# BINOP_EQUAL incorrectly resolves with system debug info to Ada.Strings.Maps.
|
|
set test "operator = works for strings"
|
|
gdb_test_multiple {print "a" = "a"} $test {
|
|
-re " = false\r\n$gdb_prompt $" {
|
|
kfail ada/12607 $test
|
|
untested ${testdir}.exp
|
|
return 0
|
|
}
|
|
-re " = true\r\n$gdb_prompt $" {
|
|
pass $test
|
|
}
|
|
}
|
|
|
|
# Verify that we can compare a string slice with another string.
|
|
|
|
gdb_test "print String_Var (1 .. 3) = \"Hel\"" \
|
|
"= true"
|
|
|
|
gdb_test "print String_Var (1 .. 3) = \"hel\"" \
|
|
"= false"
|