+2021-06-08 Tom de Vries <tdevries@suse.de>
+
+ * lib/gdb.exp (multi_line): Require more than one argument.
+ * gdb.base/gdbinit-history.exp: Update multi_line call.
+ * gdb.base/jit-reader.exp: Remove multi_line call.
+ * gdb.fortran/dynamic-ptype-whatis.exp: Same.
+
2021-06-08 Tom de Vries <tdevries@suse.de>
* gdb.base/info-types.exp.tcl (match_line, gdb_test_lines): Move ...
lappend hist_lines " $idx $h"
incr idx
}
- set pattern [eval multi_line $hist_lines]
+ if { [llength $hist_lines] == 1 } {
+ set pattern [lindex $hist_lines 0]
+ } else {
+ set pattern [eval multi_line $hist_lines]
+ }
# Check the history.
gdb_test "show commands" "$pattern.*"
# the built-in unwinder cannot backtrace through the mangled
# stack pointer.
gdb_test "bt" \
- [multi_line \
- "Backtrace stopped: Cannot access memory at address $sp_after_mangling" \
- ] \
+ "Backtrace stopped: Cannot access memory at address $sp_after_mangling" \
"bt shows error"
gdb_test "info frame" "Cannot access memory at address.*" \
gdb_test "whatis var5%t3_array" "type = Type type1 \\(3\\)"
gdb_test "whatis var6%t4_array" "type = Type type2, allocatable \\(3\\)"
gdb_test "whatis var7%t5_array" "type = Type type2 \\(4\\)"
-gdb_test "ptype var3%t1_i" [ multi_line "type = integer\\(kind=4\\)" ]
+gdb_test "ptype var3%t1_i" "type = integer\\(kind=4\\)"
gdb_test "ptype var4%t2_array" [ multi_line "type = Type type1" \
" integer\\(kind=4\\) :: spacer" \
" integer\\(kind=4\\) :: t1_i" \
# being.
proc multi_line { args } {
+ if { [llength $args] == 1 } {
+ set hint "forgot {*} before list argument?"
+ error "multi_line called with one argument ($hint)"
+ }
return [join $args "\r\n"]
}