+2019-10-31 Tom de Vries <tdevries@suse.de>
+
+ * gdb.arch/amd64-disp-step-avx.exp: Drop superfluous 3rd argument to
+ gdb_test.
+ * gdb.arch/amd64-disp-step.exp: Same.
+ * gdb.asm/asm-source.exp: Same.
+ * gdb.btrace/buffer-size.exp: Same.
+ * gdb.btrace/cpu.exp: Same.
+ * gdb.btrace/enable.exp: Same.
+ * gdb.dwarf2/count.exp: Same.
+ * gdb.dwarf2/dw2-ranges-func.exp: Same.
+ * gdb.dwarf2/dw2-ranges-psym.exp: Same.
+ * gdb.fortran/vla-datatypes.exp: Same.
+ * gdb.fortran/vla-history.exp: Same.
+ * gdb.fortran/vla-ptype.exp: Same.
+ * gdb.fortran/vla-value.exp: Same.
+ * gdb.fortran/whatis_type.exp: Same.
+ * gdb.guile/guile.exp: Same.
+ * gdb.multi/tids.exp: Same.
+ * gdb.python/py-finish-breakpoint.exp: Same.
+ * gdb.python/py-framefilter.exp: Same.
+ * gdb.python/py-pp-registration.exp: Same.
+ * gdb.python/py-xmethods.exp: Same.
+ * gdb.python/python.exp: Same.
+ * gdb.server/connect-with-no-symbol-file.exp: Same.
+ * gdb.server/no-thread-db.exp: Same.
+ * gdb.server/run-without-local-binary.exp: Same.
+ * gdb.stabs/weird.exp: Same.
+ * gdb.threads/attach-many-short-lived-threads.exp: Same.
+ * gdb.threads/thread-find.exp: Same.
+ * gdb.threads/tls-shared.exp: Same.
+ * gdb.threads/tls.exp: Same.
+ * gdb.threads/wp-replication.exp: Same.
+ * gdb.trace/ax.exp: Same.
+ * lib/gdb.exp (gdb_test_exact, help_test_raw): Same.
+
2019-10-31 Tom de Vries <tdevries@suse.de>
* gdb.ada/array_bounds.exp: Drop superfluous 3rd argument to gdb_test.
set test_end_label "${func}_end"
gdb_test "break ${test_start_label}" \
- "Breakpoint.*at.* file .*$srcfile, line.*" \
- "break ${test_start_label}"
+ "Breakpoint.*at.* file .*$srcfile, line.*"
gdb_test "break ${test_end_label}" \
- "Breakpoint.*at.* file .*$srcfile, line.*" \
- "break ${test_end_label}"
+ "Breakpoint.*at.* file .*$srcfile, line.*"
gdb_test "continue" \
"Continuing.*Breakpoint.*, ${test_start_label} ().*" \
# Test call/ret.
gdb_test "break test_call" \
- "Breakpoint.*at.* file .*$srcfile, line.*" \
- "break test_call"
+ "Breakpoint.*at.* file .*$srcfile, line.*"
gdb_test "break test_call_end" \
- "Breakpoint.*at.* file .*$srcfile, line.*" \
- "break test_call_end"
+ "Breakpoint.*at.* file .*$srcfile, line.*"
gdb_test "break test_ret" \
- "Breakpoint.*at.* file .*$srcfile, line.*" \
- "break test_ret"
+ "Breakpoint.*at.* file .*$srcfile, line.*"
gdb_test "break test_ret_end" \
- "Breakpoint.*at.* file .*$srcfile, line.*" \
- "break test_ret_end"
+ "Breakpoint.*at.* file .*$srcfile, line.*"
gdb_test "continue" \
"Continuing.*Breakpoint.*, test_call ().*" \
# Test abs-jmp/rep-ret.
gdb_test "break test_abs_jmp" \
- "Breakpoint.*at.* file .*$srcfile, line.*" \
- "break test_abs_jmp"
+ "Breakpoint.*at.* file .*$srcfile, line.*"
gdb_test "break test_abs_jmp_end" \
- "Breakpoint.*at.* file .*$srcfile, line.*" \
- "break test_abs_jmp_end"
+ "Breakpoint.*at.* file .*$srcfile, line.*"
gdb_test "break test_rep_ret" \
- "Breakpoint.*at.* file .*$srcfile, line.*" \
- "break test_rep_ret"
+ "Breakpoint.*at.* file .*$srcfile, line.*"
gdb_test "break test_rep_ret_end" \
- "Breakpoint.*at.* file .*$srcfile, line.*" \
- "break test_rep_ret_end"
+ "Breakpoint.*at.* file .*$srcfile, line.*"
gdb_test "continue" \
"Continuing.*Breakpoint.*, test_abs_jmp ().*" \
# Test syscall.
gdb_test "break test_syscall" \
- "Breakpoint.*at.* file .*$srcfile, line.*" \
- "break test_syscall"
+ "Breakpoint.*at.* file .*$srcfile, line.*"
gdb_test "break test_syscall_end" \
- "Breakpoint.*at.* file .*$srcfile, line.*" \
- "break test_syscall_end"
+ "Breakpoint.*at.* file .*$srcfile, line.*"
gdb_test "continue" \
"Continuing.*Breakpoint.*, test_syscall ().*" \
# These don't occur in normal code, but gdb should still DTRT.
gdb_test "break test_int3" \
- "Breakpoint.*at.* file .*$srcfile, line.*" \
- "break test_int3"
+ "Breakpoint.*at.* file .*$srcfile, line.*"
gdb_test "break test_int3_end" \
- "Breakpoint.*at.* file .*$srcfile, line.*" \
- "break test_int3_end"
+ "Breakpoint.*at.* file .*$srcfile, line.*"
gdb_test "continue" \
"Continuing.*Breakpoint.*, test_int3 ().*" \
set test_end_label "test_rip_${reg}_end"
gdb_test "break ${test_start_label}" \
- "Breakpoint.*at.* file .*$srcfile, line.*" \
- "break ${test_start_label}"
+ "Breakpoint.*at.* file .*$srcfile, line.*"
gdb_test "break ${test_end_label}" \
- "Breakpoint.*at.* file .*$srcfile, line.*" \
- "break ${test_end_label}"
+ "Breakpoint.*at.* file .*$srcfile, line.*"
gdb_test "continue" \
"Continuing.*Breakpoint.*, ${test_start_label} ().*" \
# Try 'info line'
gdb_test "info line" \
- "Line $line_call_foo3_again of.*asmsrc2.s.*starts at.*<\\.?foo2+.*> and ends at.*<\\.?foo2+.*>." \
- "info line"
+ "Line $line_call_foo3_again of.*asmsrc2.s.*starts at.*<\\.?foo2+.*> and ends at.*<\\.?foo2+.*>."
# Try 'nexting' over next call to foo3
gdb_test "next" "$line_foo2_leave\[ \t\]+gdbasm_leave" "next over foo3"
"Recording format: \[^\\\r\\\n\]*" \
"Buffer size: 4kB\." \
"Recorded 0 instructions in 0 functions \\\(0 gaps\\\) for \[^\\\r\\\n\]*" \
- ] "info record"
+ ]
gdb_test "show record btrace cpu" "btrace cpu is 'auto'\." "default cpu"
gdb_test "set record" \
- "\"set record\" must be followed by an appropriate subcommand.*" \
- "set record"
+ "\"set record\" must be followed by an appropriate subcommand.*"
gdb_test "set record btrace" \
- "\"set record btrace\" must be followed by an appropriate subcommand.*" \
- "set record btrace"
+ "\"set record btrace\" must be followed by an appropriate subcommand.*"
test_bad "" "auto"
test_good "intel: 0/0"
Recorded 0 instructions in 0 functions \\\(0 gaps\\\) for thread 1.*\\." "info record without trace"
# stop btrace record
-gdb_test "record stop" "Process record is stopped and all execution logs are deleted\\." "record stop"
+gdb_test "record stop" "Process record is stopped and all execution logs are deleted\\."
gdb_test "record stop" "No record target is currently active\\..*" "record stop the second time"
# enable btrace again
return -1
}
-gdb_test "ptype array" "type = char \\\[5\\\]" "ptype array"
-gdb_test "whatis array" "type = char \\\[5\\\]" "whatis array"
-gdb_test "print array" " = \"hello\"" "print array"
-gdb_test "print sizeof array" " = 5" "print sizeof array"
-
-gdb_test "ptype array2" "type = char \\\[1\\\]" "ptype array"
-gdb_test "whatis array2" "type = char \\\[1\\\]" "whatis array"
-gdb_test "print array2" " = \"A\"" "print array"
-gdb_test "print sizeof array2" " = 1" "print sizeof array"
-
-gdb_test "ptype static_array" "type = char \\\[5\\\]" "ptype static_array"
-gdb_test "whatis static_array" "type = char \\\[5\\\]" "whatis static_array"
-gdb_test "print static_array" " = \"world\"" "print static_array"
-gdb_test "print sizeof static_array" " = 5" "print sizeof static_array"
+gdb_test "ptype array" "type = char \\\[5\\\]"
+gdb_test "whatis array" "type = char \\\[5\\\]"
+gdb_test "print array" " = \"hello\""
+gdb_test "print sizeof array" " = 5"
+
+gdb_test "ptype array2" "type = char \\\[1\\\]"
+gdb_test "whatis array2" "type = char \\\[1\\\]"
+gdb_test "print array2" " = \"A\""
+gdb_test "print sizeof array2" " = 1"
+
+gdb_test "ptype static_array" "type = char \\\[5\\\]"
+gdb_test "whatis static_array" "type = char \\\[5\\\]"
+gdb_test "print static_array" " = \"world\""
+gdb_test "print sizeof static_array" " = 5"
# This is intentional since that behavior is one of the bugs that
# this test case tests for.
gdb_test "break foo" \
- "Breakpoint.*at.* file .*$srcfile, line \\d+\\." \
- "break foo"
+ "Breakpoint.*at.* file .*$srcfile, line \\d+\\."
# Continue to foo. Allow execution to stop either on the prologue
# or on the call to bar since either behavior is acceptable though
# This more permissive RE for "break foo" will allow a breakpoint on
# multiple locations to PASS. */
gdb_test "break foo" \
- "Breakpoint.*at.*" \
- "break foo"
+ "Breakpoint.*at.*"
gdb_test "break baz" \
"Breakpoint.*at.* file .*$srcfile, line \\d+\\."
# Note we use a name that is very different from the linkage name, in
# order to not set the breakpoint via minsyms.
gdb_test "break someothername" \
- "Breakpoint.*at.*" \
- "break someothername"
+ "Breakpoint.*at.*"
gdb_breakpoint [gdb_get_line_number "vlas-initialized"]
gdb_continue_to_breakpoint "vlas-initialized"
-gdb_test "ptype intvla" "type = $int, allocatable \\\(11,22,33\\\)" \
- "ptype intvla"
-gdb_test "ptype realvla" "type = $real, allocatable \\\(11,22,33\\\)" \
- "ptype realvla"
-gdb_test "ptype complexvla" "type = $complex, allocatable \\\(11,22,33\\\)" \
- "ptype complexvla"
-gdb_test "ptype logicalvla" "type = $logical, allocatable \\\(11,22,33\\\)" \
- "ptype logicalvla"
-gdb_test "ptype charactervla" "type = character\\\*1, allocatable \\\(11,22,33\\\)" \
- "ptype charactervla"
+gdb_test "ptype intvla" "type = $int, allocatable \\\(11,22,33\\\)"
+gdb_test "ptype realvla" "type = $real, allocatable \\\(11,22,33\\\)"
+gdb_test "ptype complexvla" "type = $complex, allocatable \\\(11,22,33\\\)"
+gdb_test "ptype logicalvla" "type = $logical, allocatable \\\(11,22,33\\\)"
+gdb_test "ptype charactervla" "type = character\\\*1, allocatable \\\(11,22,33\\\)"
gdb_test "print intvla(5,5,5)" " = 1" "print intvla(5,5,5) (1st)"
gdb_test "print realvla(5,5,5)" " = 3.14\\d+" \
}
# Try to access history values for full vla prints.
-gdb_test "print \$1" " = <not allocated>" "print \$1"
+gdb_test "print \$1" " = <not allocated>"
with_timeout_factor 2 {
gdb_test "print \$2" \
" = \\( *\\( *\\( *1311, *1311, *1311,\[()1311, .\]*\\)" "print \$4"
gdb_breakpoint [gdb_get_line_number "vla2-filled"]
gdb_continue_to_breakpoint "vla2-filled"
-gdb_test "print vla2(1,43,20)" " = 1311" "print vla2(1,43,20)"
-gdb_test "print vla1(1,3,8)" " = 1001" "print vla2(1,3,8)"
+gdb_test "print vla2(1,43,20)" " = 1311"
+gdb_test "print vla1(1,3,8)" " = 1001"
# Try to access history values for vla values.
-gdb_test "print \$5" " = 1311" "print \$5"
-gdb_test "print \$6" " = 1001" "print \$6"
+gdb_test "print \$5" " = 1311"
+gdb_test "print \$6" " = 1001"
gdb_continue_to_breakpoint "vla1-filled"
gdb_test "ptype vla1" "type = $real, allocatable \\\(10,10,10\\\)" \
"ptype vla1 filled"
-gdb_test "ptype vla1(3, 6, 9)" "type = $real" \
- "ptype vla1(3, 6, 9)"
+gdb_test "ptype vla1(3, 6, 9)" "type = $real"
gdb_breakpoint [gdb_get_line_number "vla2-filled"]
gdb_continue_to_breakpoint "vla2-filled"
gdb_continue_to_breakpoint "pvla-associated"
gdb_test "ptype pvla" "type = $real \\\(10,10,10\\\)" \
"ptype pvla associated"
-gdb_test "ptype pvla(3, 6, 9)" "type = $real" \
- "ptype pvla(3, 6, 9)"
+gdb_test "ptype pvla(3, 6, 9)" "type = $real"
gdb_breakpoint [gdb_get_line_number "pvla-re-associated"]
gdb_continue_to_breakpoint "pvla-re-associated"
"print \$myvar set to vla1"
gdb_test "next" "\\d+.*vla1\\(1, 3, 8\\) = 1001" "next (2)"
-gdb_test "print \$myvar(3,6,9)" " = 1311" "print \$myvar(3,6,9)"
+gdb_test "print \$myvar(3,6,9)" " = 1311"
gdb_breakpoint [gdb_get_line_number "pvla-associated"]
gdb_continue_to_breakpoint "pvla-associated, second time"
gdb_test_no_output "set \$mypvar = pvla" "set \$mypvar = pvla"
-gdb_test "print \$mypvar(1,3,8)" " = 1001" "print \$mypvar(1,3,8)"
+gdb_test "print \$mypvar(1,3,8)" " = 1001"
# deallocate pointer and make sure user defined variable still has the
# right value.
[multi_line "type = Type t1" \
" $t1_i" \
" $t1_r" \
- "End Type t1"] \
- "ptype t1"
+ "End Type t1"]
gdb_test "ptype t1v" \
[multi_line "type = Type t1" \
" $t1_i" \
" $t1_r" \
- "End Type t1"] \
- "ptype t1v"
+ "End Type t1"]
gdb_test "ptype t2v" \
[multi_line "type = Type t2" \
gdb_test "source $srcdir/$subdir/source2.scm" "yes" "source source2.scm"
-gdb_test "source -s source2.scm" "yes" "source -s source2.scm"
+gdb_test "source -s source2.scm" "yes"
gdb_test "guile (print (current-objfile))" "= #f"
gdb_test "guile (print (objfiles))" "= \\(\\)"
}
set cmd "thread apply $tid_list"
- if {$message == ""} {
- set message $cmd
+ if {$message != ""} {
+ gdb_test "$cmd p 1234" $r $message
+ return
}
- gdb_test "$cmd p 1234" $r $message
+
+ gdb_test "$cmd p 1234" $r
}
# Issue "info threads TID_LIST" and expect EXP_TID_LIST (a list of
set r [join $expected " ${any}\r\n${any} "]
set r "${any} $r ${any}"
set cmd "info threads $tid_list"
- if {$message == ""} {
- set message $cmd
+ if {$message != ""} {
+ gdb_test $cmd $r $message
+ return
}
- gdb_test $cmd $r $message
+ gdb_test $cmd $r
}
# Issue "info threads TID_LIST" and expect INFO_THR output. Then
$exp_error_info
gdb_test "thread apply $tid_list" \
- $exp_error_apply \
- "thread apply $tid_list"
+ $exp_error_apply
}
# Issue both "info threads TID_LIST" and "thread apply TID_LIST" and
}
gdb_test "python SimpleFinishBreakpoint(gdb.newest_frame())" "SimpleFinishBreakpoint init" "set FinishBP after the exec"
-gdb_test "catch exec" "Catchpoint.*\(exec\).*" "catch exec"
+gdb_test "catch exec" "Catchpoint.*\(exec\).*"
gdb_test "continue" "SimpleFinishBreakpoint out of scope.*" "catch out of scope after exec"
# Test multiple local blocks.
gdb_test "bt full no-filters" \
- ".*#0.*end_func.*h = 9.*f = 42.*g = 19.*bar = $hex \"Inside block x2\".*d = 15.*e = 14.*foo = $hex \"Inside block\".*str = $hex \"The End\".*st2 = $hex \"Is Near\".*b = 12.*c = 5.*" \
- "bt full no-filters"
+ ".*#0.*end_func.*h = 9.*f = 42.*g = 19.*bar = $hex \"Inside block x2\".*d = 15.*e = 14.*foo = $hex \"Inside block\".*str = $hex \"The End\".*st2 = $hex \"Is Near\".*b = 12.*c = 5.*"
gdb_test "bt full" \
".*#0.*cnuf_dne.*h = 9.*f = 42.*g = 19.*bar = $hex \"Inside block x2\".*d = 15.*e = 14.*foo = $hex \"Inside block\".*str = $hex \"The End\".*st2 = $hex \"Is Near\".*b = 12.*c = 5.*" \
"bt full with filters"
# Test no-filters
gdb_test "bt no-filters" \
- ".*#0.*end_func.*#22.*in func1.*#27.*in main \\(\\).*" \
- "bt no-filters"
+ ".*#0.*end_func.*#22.*in func1.*#27.*in main \\(\\).*"
# Test reverse
gdb_test "bt" \
proc test_printers { s_prefix } {
global hex
- gdb_test "print flt" " = x=<42> y=<43>" \
- "print flt"
- gdb_test "print s" " = ${s_prefix} a=<1> b=<$hex>" \
- "print s"
+ gdb_test "print flt" " = x=<42> y=<43>"
+ gdb_test "print s" " = ${s_prefix} a=<1> b=<$hex>"
}
# Test registration with verbose off.
gdb_test "info xmethod progspace E_methods;method_int" ".* \\\[disabled\\\]" \
"info xmethod xmethods E_methods;method_int"
gdb_test_no_output "disable xmethod progspace G_methods" "disable G_methods 2"
-gdb_test "info xmethod progspace" ".*G_methods \\\[disabled\\\].*" \
- "info xmethod progspace"
+gdb_test "info xmethod progspace" ".*G_methods \\\[disabled\\\].*"
# PR 18285
# First make sure both are enabled.
gdb_test "source $remote_source2_py" "yes" "source source2.py"
-gdb_test "source -s source2.py" "yes" "source -s source2.py"
+gdb_test "source -s source2.py" "yes"
set remote_source2_symlink_notpy \
[gdb_remote_download host ${srcdir}/${subdir}/source2.py \
# Make sure we're disconnected, in case we're testing with an
# extended-remote board, therefore already connected.
- gdb_test "disconnect" ".*" "disconnect"
+ gdb_test "disconnect" ".*"
# Discard any symbol files that we have opened.
gdb_test "file" ".*" "discard symbol table" \
# Printing a tls variable should fail gracefully without a libthread_db.
gdb_test "print foo" \
- "Cannot find thread-local storage for Thread \[^,\]+, executable file ${binfile}:\[\r\n\]+Remote target failed to process qGetTLSAddr request" \
- "print foo"
+ "Cannot find thread-local storage for Thread \[^,\]+, executable file ${binfile}:\[\r\n\]+Remote target failed to process qGetTLSAddr request"
# Make sure we're disconnected, in case we're testing with an
# extended-remote board, therefore already connected.
- gdb_test "disconnect" ".*" "disconnect"
+ gdb_test "disconnect" ".*"
# Let's start gdbserver in extended-remote mode now. We cannot
# use gdbserver_start_extended here because it starts gdbserver,
print_weird_var attr126
gdb_test "p const69" " = 69" "'e' constant on non-enum type"
- gdb_test "whatis const69" "type = (unsigned int|inttype)" "whatis const69"
+ gdb_test "whatis const69" "type = (unsigned int|inttype)"
gdb_test "p sizeof (const70)" " = 2" "'e' constant with embedded type"
gdb_test "p constString3" " = \"String3 with embedded quote ' in the middle\"" "string constant 3"
gdb_test "p constString4" { = "String4 with embedded quote \\" in the middle"} "string constant 4"
- gdb_test "p bad_neg0" " = \{field0 = 42, field2 =.*field3 = 45\}" "p bad_neg0"
+ gdb_test "p bad_neg0" " = \{field0 = 42, field2 =.*field3 = 45\}"
gdb_test "ptype inttype" "type = (unsigned int|inttype)" "ptype on inttype"
gdb_test "p sizeof (float72type)" " = 9" "unrecognized floating point type"
# This big number needs to be kept as one piece
gdb_test "p/x int256var" " = 0x0*2a0000002b0000002c0000002d0000002d0000002c0000002b0000002a" "print very big integer"
- gdb_test "whatis consth" "type = inttype" "whatis consth"
- gdb_test "whatis consth2" "type = inttype" "whatis consth2"
+ gdb_test "whatis consth" "type = inttype"
+ gdb_test "whatis consth2" "type = inttype"
# GDB does not yet understand S constants
setup_xfail "*-*-*"
# detaching from the program and reattaching, we check that
# the program doesn't die due to gdb leaving a pending
# breakpoint hit on a new thread unprocessed.
- gdb_test "break break_fn" "Breakpoint.*" "break break_fn"
+ gdb_test "break break_fn" "Breakpoint.*"
# Wait a bit, to give time for most threads to hit the
# breakpoint, including threads we might have failed to
# Test bad input
gdb_test "info thread foo" \
- "Invalid thread ID: foo" \
- "info thread foo"
+ "Invalid thread ID: foo"
gdb_test "info thread foo -1" \
- "Invalid thread ID: foo -1" \
- "info thread foo -1"
+ "Invalid thread ID: foo -1"
"continue to break"
# This is more of a gcc/glibc test, really.
#
-gdb_test "print result" "3" "print result"
-
-
+gdb_test "print result" "3"
runto spin
gdb_test "info address a_global" \
- ".*a_global.*static storage at address.*" "info address a_global"
+ ".*a_global.*static storage at address.*"
-gdb_test "info address me" ".*me.*is a (complex DWARF expression:|variable).*" \
- "info address me"
+gdb_test "info address me" ".*me.*is a (complex DWARF expression:|variable).*"
# Test LOC_UNRESOLVED references resolving for `extern' TLS variables.
# in the background for a specific thread.
if {$i < $hwatch_count} {
gdb_test "watch watched_data\[$i\]" \
- "Hardware watchpoint .*" \
- "watch watched_data\[$i\]"
+ "Hardware watchpoint .*"
} else {
verbose -log "Not setting watchpoint for watched_data\[$i\]\n"
}
runto_main
gdb_reinitialize_dir $srcdir/$subdir
-gdb_test "maint agent 12" ".*const8 12.*pop.*end.*" "maint agent 12"
+gdb_test "maint agent 12" ".*const8 12.*pop.*end.*"
-gdb_test "maint agent gdb_char_test" "" "maint agent gdb_char_test"
+gdb_test "maint agent gdb_char_test" ""
-gdb_test "maint agent gdb_arr_test\[12\]" "" "maint agent gdb_arr_test\[12\]"
+gdb_test "maint agent gdb_arr_test\[12\]" ""
-gdb_test "maint agent gdb_arr_test\[gdb_short_test\]" "" "maint agent gdb_arr_test\[gdb_short_test\]"
+gdb_test "maint agent gdb_arr_test\[gdb_short_test\]" ""
-gdb_test "maint agent gdb_struct1_test" "" "maint agent gdb_struct1_test"
+gdb_test "maint agent gdb_struct1_test" ""
-gdb_test "maint agent gdb_struct1_test.s" "" "maint agent gdb_struct1_test.s"
+gdb_test "maint agent gdb_struct1_test.s" ""
-gdb_test "maint agent gdb_struct1_test.arr\[gdb_struct1_test.c\]" "" "maint agent gdb_struct1_test.arr\[gdb_struct1_test.c\]"
+gdb_test "maint agent gdb_struct1_test.arr\[gdb_struct1_test.c\]" ""
-gdb_test "maint agent gdb_structp_test" "" "maint agent gdb_structp_test"
+gdb_test "maint agent gdb_structp_test" ""
-gdb_test "maint agent gdb_structp_test->l" "" "maint agent gdb_structp_test->l"
+gdb_test "maint agent gdb_structp_test->l" ""
-gdb_test "maint agent gdb_structp_test->bfield" "" "maint agent gdb_structp_test->bfield"
+gdb_test "maint agent gdb_structp_test->bfield" ""
-gdb_test "maint agent gdb_long_test + gdb_short_test" "" "maint agent gdb_long_test + gdb_short_test"
+gdb_test "maint agent gdb_long_test + gdb_short_test" ""
-gdb_test "maint agent gdb_long_test - gdb_short_test" "" "maint agent gdb_long_test - gdb_short_test"
+gdb_test "maint agent gdb_long_test - gdb_short_test" ""
-gdb_test "maint agent gdb_long_test * gdb_short_test" "" "maint agent gdb_long_test * gdb_short_test"
+gdb_test "maint agent gdb_long_test * gdb_short_test" ""
-gdb_test "maint agent gdb_long_test / gdb_short_test" "" "maint agent gdb_long_test / gdb_short_test"
+gdb_test "maint agent gdb_long_test / gdb_short_test" ""
-gdb_test "maint agent gdb_structp_test + 1" "" "maint agent gdb_structp_test + 1"
+gdb_test "maint agent gdb_structp_test + 1" ""
-gdb_test "maint agent gdb_long_test == gdb_short_test" "" "maint agent gdb_long_test == gdb_short_test"
+gdb_test "maint agent gdb_long_test == gdb_short_test" ""
-gdb_test "maint agent gdb_long_test != gdb_short_test" "" "maint agent gdb_long_test != gdb_short_test"
+gdb_test "maint agent gdb_long_test != gdb_short_test" ""
-gdb_test "maint agent gdb_long_test < gdb_short_test" "" "maint agent gdb_long_test < gdb_short_test"
+gdb_test "maint agent gdb_long_test < gdb_short_test" ""
-gdb_test "maint agent gdb_long_test <= gdb_short_test" "" "maint agent gdb_long_test <= gdb_short_test"
+gdb_test "maint agent gdb_long_test <= gdb_short_test" ""
-gdb_test "maint agent gdb_long_test > gdb_short_test" "" "maint agent gdb_long_test > gdb_short_test"
+gdb_test "maint agent gdb_long_test > gdb_short_test" ""
-gdb_test "maint agent gdb_long_test >= gdb_short_test" "" "maint agent gdb_long_test >= gdb_short_test"
+gdb_test "maint agent gdb_long_test >= gdb_short_test" ""
-gdb_test "maint agent &gdb_long_test == &gdb_short_test" "" "maint agent &gdb_long_test == &gdb_short_test"
+gdb_test "maint agent &gdb_long_test == &gdb_short_test" ""
-gdb_test "maint agent &gdb_long_test < &gdb_short_test" "" "maint agent &gdb_long_test < &gdb_short_test"
+gdb_test "maint agent &gdb_long_test < &gdb_short_test" ""
-gdb_test "maint agent (unsigned char)1L" ".*ext 8.*" "maint agent (unsigned char)1L"
+gdb_test "maint agent (unsigned char)1L" ".*ext 8.*"
# Now test eval version of agent expressions.
-gdb_test "maint agent-eval 12" ".*const8 12.*end.*" "maint agent-eval 12"
+gdb_test "maint agent-eval 12" ".*const8 12.*end.*"
-gdb_test "maint agent-eval gdb_char_test" "" "maint agent-eval gdb_char_test"
+gdb_test "maint agent-eval gdb_char_test" ""
-gdb_test "maint agent-eval gdb_arr_test\[12\]" "" "maint agent-eval gdb_arr_test\[12\]"
+gdb_test "maint agent-eval gdb_arr_test\[12\]" ""
-gdb_test "maint agent-eval gdb_arr_test\[gdb_short_test\]" "" "maint agent-eval gdb_arr_test\[gdb_short_test\]"
+gdb_test "maint agent-eval gdb_arr_test\[gdb_short_test\]" ""
-gdb_test "maint agent-eval gdb_struct1_test" "" "maint agent-eval gdb_struct1_test"
+gdb_test "maint agent-eval gdb_struct1_test" ""
-gdb_test "maint agent-eval gdb_struct1_test.s" "" "maint agent-eval gdb_struct1_test.s"
+gdb_test "maint agent-eval gdb_struct1_test.s" ""
-gdb_test "maint agent-eval gdb_struct1_test.arr\[gdb_struct1_test.c\]" "" "maint agent-eval gdb_struct1_test.arr\[gdb_struct1_test.c\]"
+gdb_test "maint agent-eval gdb_struct1_test.arr\[gdb_struct1_test.c\]" ""
-gdb_test "maint agent-eval gdb_structp_test" "" "maint agent-eval gdb_structp_test"
+gdb_test "maint agent-eval gdb_structp_test" ""
-gdb_test "maint agent-eval gdb_structp_test->l" "" "maint agent-eval gdb_structp_test->l"
+gdb_test "maint agent-eval gdb_structp_test->l" ""
-gdb_test "maint agent-eval gdb_structp_test->bfield" "" "maint agent-eval gdb_structp_test->bfield"
+gdb_test "maint agent-eval gdb_structp_test->bfield" ""
-gdb_test "maint agent-eval gdb_long_test + gdb_short_test" "" "maint agent-eval gdb_long_test + gdb_short_test"
+gdb_test "maint agent-eval gdb_long_test + gdb_short_test" ""
-gdb_test "maint agent-eval gdb_long_test - gdb_short_test" "" "maint agent-eval gdb_long_test - gdb_short_test"
+gdb_test "maint agent-eval gdb_long_test - gdb_short_test" ""
-gdb_test "maint agent-eval gdb_long_test * gdb_short_test" "" "maint agent-eval gdb_long_test * gdb_short_test"
+gdb_test "maint agent-eval gdb_long_test * gdb_short_test" ""
-gdb_test "maint agent-eval gdb_long_test / gdb_short_test" "" "maint agent-eval gdb_long_test / gdb_short_test"
+gdb_test "maint agent-eval gdb_long_test / gdb_short_test" ""
-gdb_test "maint agent-eval gdb_structp_test + 1" "" "maint agent-eval gdb_structp_test + 1"
+gdb_test "maint agent-eval gdb_structp_test + 1" ""
-gdb_test "maint agent-eval gdb_long_test == gdb_short_test" "" "maint agent-eval gdb_long_test == gdb_short_test"
+gdb_test "maint agent-eval gdb_long_test == gdb_short_test" ""
-gdb_test "maint agent-eval gdb_long_test != gdb_short_test" "" "maint agent-eval gdb_long_test != gdb_short_test"
+gdb_test "maint agent-eval gdb_long_test != gdb_short_test" ""
-gdb_test "maint agent-eval gdb_long_test < gdb_short_test" "" "maint agent-eval gdb_long_test < gdb_short_test"
+gdb_test "maint agent-eval gdb_long_test < gdb_short_test" ""
-gdb_test "maint agent-eval gdb_long_test <= gdb_short_test" "" "maint agent-eval gdb_long_test <= gdb_short_test"
+gdb_test "maint agent-eval gdb_long_test <= gdb_short_test" ""
-gdb_test "maint agent-eval gdb_long_test > gdb_short_test" "" "maint agent-eval gdb_long_test > gdb_short_test"
+gdb_test "maint agent-eval gdb_long_test > gdb_short_test" ""
-gdb_test "maint agent-eval gdb_long_test >= gdb_short_test" "" "maint agent-eval gdb_long_test >= gdb_short_test"
+gdb_test "maint agent-eval gdb_long_test >= gdb_short_test" ""
-gdb_test "maint agent-eval &gdb_long_test == &gdb_short_test" ".*equal.*end.*" "maint agent-eval &gdb_long_test == &gdb_short_test"
+gdb_test "maint agent-eval &gdb_long_test == &gdb_short_test" ".*equal.*end.*"
-gdb_test "maint agent-eval &gdb_long_test < &gdb_short_test" "" "maint agent-eval &gdb_long_test < &gdb_short_test"
+gdb_test "maint agent-eval &gdb_long_test < &gdb_short_test" ""
regsub -all "\n" $pattern "\r\n" pattern
if [llength $args]==3 then {
set message [lindex $args 2]
- } else {
- set message $command
+ return [gdb_test $command $pattern $message]
}
- return [gdb_test $command $pattern $message]
+ return [gdb_test $command $pattern]
}
# Wrapper around gdb_test_multiple that looks for a list of expected
# If third argument TESTNAME is not empty, it's used as the name of the
# test to be printed on pass/fail.
proc help_test_raw { gdb_command expected_lines {testname {}} } {
- if {$testname == {}} {
- set message $gdb_command
- } else {
- set message $testname
- }
set expected_output [join $expected_lines ""]
- gdb_test "${gdb_command}" "${expected_output}" $message
+ if {$testname != {}} {
+ gdb_test "${gdb_command}" "${expected_output}" $testname
+ return
+ }
+
+ gdb_test "${gdb_command}" "${expected_output}"
}
# A regexp that matches the end of help CLASS|PREFIX_COMMAND