* gdb.base/arithmet.exp: Use gdb_test_no_output.
* gdb.base/arrayidx.exp: Ditto.
* gdb.base/attach.exp: Ditto.
* gdb.base/auxv.exp: Ditto.
* gdb.base/bigcre.exp: Ditto.
* gdb.base/break-always.exp: Ditto.
* gdb.base/break-interp.exp: Ditto.
* gdb.base/break.exp: Ditto.
* gdb.base/breakpoint-shadow.exp: Ditto.
* gdb.base/call-ar-st.exp: Ditto.
* gdb.base/call-sc.exp: Ditto.
* gdb.base/call-signal-resume.exp: Ditto.
* gdb.base/callfuncs.exp: Ditto.
* gdb.base/catch-syscall.exp: Ditto.
* gdb.base/charset.exp: Ditto.
* gdb.base/code-expr.exp: Ditto.
* gdb.base/commands.exp: Ditto.
* gdb.base/cond-expr.exp: Ditto.
* gdb.base/condbreak.exp: Ditto.
* gdb.base/cursal.exp: Ditto.
* gdb.base/cvexpr.exp: Ditto.
* gdb.base/default.exp: Ditto.
* gdb.base/del.exp: Ditto.
* gdb.base/detach.exp: Ditto.
* gdb.base/display.exp: Ditto.
* gdb.base/ena-dis-br.exp: Ditto.
* gdb.base/eval-skip.exp: Ditto.
* gdb.base/foll-fork.exp: Ditto.
* gdb.base/foll-vfork.exp: Ditto.
* gdb.base/frame-args.exp: Ditto.
* gdb.base/funcargs.exp: Ditto.
* gdb.base/gcore-buffer-overflow.exp: Ditto.
* gdb.base/gdbvars.exp: Ditto.
* gdb.base/help.exp: Ditto.
* gdb.base/ifelse.exp: Ditto.
* gdb.base/included.exp: Ditto.
* gdb.base/list.exp: Ditto.
* gdb.base/macscp.exp: Ditto.
* gdb.base/maint.exp: Ditto.
* gdb.base/multi-fork.exp: Ditto.
* gdb.base/overlays.exp: Ditto.
* gdb.base/page.exp: Ditto.
* gdb.base/pending.exp: Ditto.
* gdb.base/pointers.exp: Ditto.
* gdb.base/pr11022.exp: Ditto.
* gdb.base/prelink.exp: Ditto.
* gdb.base/printcmds.exp: Ditto.
* gdb.base/psymtab.exp: Ditto.
* gdb.base/randomize.exp: Ditto.
* gdb.base/relational.exp: Ditto.
* gdb.base/relocate.exp: Ditto.
* gdb.base/remote.exp: Ditto.
* gdb.base/sepdebug.exp: Ditto.
* gdb.base/set-lang-auto.exp: Ditto.
* gdb.base/setshow.exp: Ditto.
* gdb.base/setvar.exp: Ditto.
* gdb.base/signals.exp: Ditto.
* gdb.base/signull.exp: Ditto.
* gdb.base/sigstep.exp: Ditto.
* gdb.base/sizeof.exp: Ditto.
* gdb.base/solib-disc.exp: Ditto.
* gdb.base/store.exp: Ditto.
* gdb.base/structs.exp: Ditto.
* gdb.base/structs2.exp: Ditto.
* gdb.base/subst.exp: Ditto.
* gdb.base/term.exp: Ditto.
* gdb.base/trace-commands.exp: Ditto.
* gdb.base/unwindonsignal.exp: Ditto.
* gdb.base/valgrind-db-attach.exp: Ditto.
* gdb.base/varargs.exp: Ditto.
* gdb.base/watch-cond.exp: Ditto.
* gdb.base/watch_thread_num.exp: Ditto.
* gdb.base/watchpoint-cond-gone.exp: Ditto.
* gdb.base/watchpoint.exp: Ditto.
* gdb.base/whatis-exp.exp: Ditto.
+2010-06-01 Michael Snyder <msnyder@vmware.com>
+
+ * gdb.base/arithmet.exp: Use gdb_test_no_output.
+ * gdb.base/arrayidx.exp: Ditto.
+ * gdb.base/attach.exp: Ditto.
+ * gdb.base/auxv.exp: Ditto.
+ * gdb.base/bigcre.exp: Ditto.
+ * gdb.base/break-always.exp: Ditto.
+ * gdb.base/break-interp.exp: Ditto.
+ * gdb.base/break.exp: Ditto.
+ * gdb.base/breakpoint-shadow.exp: Ditto.
+ * gdb.base/call-ar-st.exp: Ditto.
+ * gdb.base/call-sc.exp: Ditto.
+ * gdb.base/call-signal-resume.exp: Ditto.
+ * gdb.base/callfuncs.exp: Ditto.
+ * gdb.base/catch-syscall.exp: Ditto.
+ * gdb.base/charset.exp: Ditto.
+ * gdb.base/code-expr.exp: Ditto.
+ * gdb.base/commands.exp: Ditto.
+ * gdb.base/cond-expr.exp: Ditto.
+ * gdb.base/condbreak.exp: Ditto.
+ * gdb.base/cursal.exp: Ditto.
+ * gdb.base/cvexpr.exp: Ditto.
+ * gdb.base/default.exp: Ditto.
+ * gdb.base/del.exp: Ditto.
+ * gdb.base/detach.exp: Ditto.
+ * gdb.base/display.exp: Ditto.
+ * gdb.base/ena-dis-br.exp: Ditto.
+ * gdb.base/eval-skip.exp: Ditto.
+ * gdb.base/foll-fork.exp: Ditto.
+ * gdb.base/foll-vfork.exp: Ditto.
+ * gdb.base/frame-args.exp: Ditto.
+ * gdb.base/funcargs.exp: Ditto.
+ * gdb.base/gcore-buffer-overflow.exp: Ditto.
+ * gdb.base/gdbvars.exp: Ditto.
+ * gdb.base/help.exp: Ditto.
+ * gdb.base/ifelse.exp: Ditto.
+ * gdb.base/included.exp: Ditto.
+ * gdb.base/list.exp: Ditto.
+ * gdb.base/macscp.exp: Ditto.
+ * gdb.base/maint.exp: Ditto.
+ * gdb.base/multi-fork.exp: Ditto.
+ * gdb.base/overlays.exp: Ditto.
+ * gdb.base/page.exp: Ditto.
+ * gdb.base/pending.exp: Ditto.
+ * gdb.base/pointers.exp: Ditto.
+ * gdb.base/pr11022.exp: Ditto.
+ * gdb.base/prelink.exp: Ditto.
+ * gdb.base/printcmds.exp: Ditto.
+ * gdb.base/psymtab.exp: Ditto.
+ * gdb.base/randomize.exp: Ditto.
+ * gdb.base/relational.exp: Ditto.
+ * gdb.base/relocate.exp: Ditto.
+ * gdb.base/remote.exp: Ditto.
+ * gdb.base/sepdebug.exp: Ditto.
+ * gdb.base/set-lang-auto.exp: Ditto.
+ * gdb.base/setshow.exp: Ditto.
+ * gdb.base/setvar.exp: Ditto.
+ * gdb.base/signals.exp: Ditto.
+ * gdb.base/signull.exp: Ditto.
+ * gdb.base/sigstep.exp: Ditto.
+ * gdb.base/sizeof.exp: Ditto.
+ * gdb.base/solib-disc.exp: Ditto.
+ * gdb.base/store.exp: Ditto.
+ * gdb.base/structs.exp: Ditto.
+ * gdb.base/structs2.exp: Ditto.
+ * gdb.base/subst.exp: Ditto.
+ * gdb.base/term.exp: Ditto.
+ * gdb.base/trace-commands.exp: Ditto.
+ * gdb.base/unwindonsignal.exp: Ditto.
+ * gdb.base/valgrind-db-attach.exp: Ditto.
+ * gdb.base/varargs.exp: Ditto.
+ * gdb.base/watch-cond.exp: Ditto.
+ * gdb.base/watch_thread_num.exp: Ditto.
+ * gdb.base/watchpoint-cond-gone.exp: Ditto.
+ * gdb.base/watchpoint.exp: Ditto.
+ * gdb.base/whatis-exp.exp: Ditto.
+
2010-06-01 Michael Snyder <msnyder@vmware.com>
* gdb.cp/annota2.exp: Replace uses of send_gdb / gdb_expect.
* gdb.base/tui-layout.exp: New.
-2010-05-28 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
+2010-05-28 Michael Snyder <msnyder@vmware.com>
* gdb.reverse/break-precsave.exp:
Replace uses of send_gdb / gdb_expect.
* gdb.base/sepdebug.exp (info silent break bp_location1): Fix racy
excessive newline.
-2010-05-27 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
+2010-05-27 Michael Snyder <msnyder@vmware.com>
* gdb.base/break.exp: Replace uses of send_gdb / gdb_expect.
* gdb.base/relational.exp: Replace uses of send_gdb / gdb_expect.
* gdb.base/watch_thread_num.exp: Replace uses of send_gdb / gdb_expect.
* gdb.base/watchpoint.exp: Replace uses of send_gdb / gdb_expect.
-2010-05-26 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
+2010-05-26 Michael Snyder <msnyder@vmware.com>
* gdb.java/jmisc.exp: Replace uses of send_gdb / gdb_expect.
* gdb.java/jprint.exp: Replace uses of send_gdb / gdb_expect.
# test expressions with "int" types
#
-gdb_test "set variable x=14" ""
-gdb_test "set variable y=2" ""
-gdb_test "set variable z=2" ""
-gdb_test "set variable w=3" ""
+gdb_test_no_output "set variable x=14"
+gdb_test_no_output "set variable y=2"
+gdb_test_no_output "set variable z=2"
+gdb_test_no_output "set variable w=3"
gdb_test "print x" "14"
gdb_test "print y" "2"
# test precedence rules on pairs of arithmetic operators
-gdb_test "set variable x=10" ""
-gdb_test "set variable y=4" ""
+gdb_test_no_output "set variable x=10"
+gdb_test_no_output "set variable y=4"
# x y z w
# 10 4 2 3
# First, print the array without the indexes
-gdb_test "set print array-indexes off" \
- "" \
+gdb_test_no_output "set print array-indexes off" \
"Set print array-indexes to off"
gdb_test "print array" \
# Second, print the same array with the indexes
-gdb_test "set print array-indexes on" \
- "" \
+gdb_test_no_output "set print array-indexes on" \
"Set print array-indexes to on"
gdb_test "print array" \
# Verify that we can modify the variable "should_exit" in the
# program.
- gdb_test "set should_exit=1" "" "after attach2, set should_exit"
+ gdb_test_no_output "set should_exit=1" "after attach2, set should_exit"
# Verify that the modification really happened.
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
-gdb_test "set print sevenbit-strings" "" \
- "set print sevenbit-strings; ${testfile}"
-gdb_test "set width 0" "" \
- "set width 0; ${testfile}"
+gdb_test_no_output "set print sevenbit-strings"
+gdb_test_no_output "set width 0"
if {$core_works} {
if {[gdb_test "cd $coredir" ".*Working directory .*" \
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
-gdb_test "set print sevenbit-strings" "" \
- "set print sevenbit-strings; ${testfile}"
-gdb_test "set width 0" "" \
- "set width 0; ${testfile}"
+gdb_test_no_output "set print sevenbit-strings"
+gdb_test_no_output "set width 0"
+
if { ![runto_main] } then {
gdb_suppress_tests;
}
# Save the total allocated size within GDB so that we can check
# the core size later.
-gdb_test "set \$bytes_allocated = bytes_allocated" "" "save heap size"
+gdb_test_no_output "set \$bytes_allocated = bytes_allocated" "save heap size"
# Now create a core dump
set bar_location [gdb_get_line_number "break in bar" break-always.c]
-gdb_test "set breakpoint always-inserted on" ""
+gdb_test_no_output "set breakpoint always-inserted on"
gdb_test "show breakpoint always-inserted" "mode is on\." \
"confirm breakpoint always-inserted"
gdb_exit
gdb_start
# Clear it to never find any separate debug infos in $debug_root.
- gdb_test "set debug-file-directory" "" "set debug-file-directory for core"
+ gdb_test_no_output "set debug-file-directory" \
+ "set debug-file-directory for core"
gdb_reinitialize_dir $srcdir/$subdir
gdb_load $file
# Print the "PIE (Position Independent Executable) displacement" message.
- gdb_test "set verbose on"
+ gdb_test_no_output "set verbose on"
set test "core loaded"
set test_displacement "seen displacement message as $displacement"
gdb_start
# Print the "PIE (Position Independent Executable) displacement" message.
- gdb_test "set verbose on"
+ gdb_test_no_output "set verbose on"
set test "attach"
gdb_test_multiple "attach $pid" $test {
gdb_exit
gdb_start
# Clear it to never find any separate debug infos in $debug_root.
- gdb_test "set debug-file-directory"
+ gdb_test_no_output "set debug-file-directory"
gdb_reinitialize_dir $srcdir/$subdir
gdb_load $file
# Print the "PIE (Position Independent Executable) displacement" message.
- gdb_test "set verbose on"
+ gdb_test_no_output "set verbose on"
reach "dl_main" "run segv" $displacement
gdb_exit
gdb_start
# Clear it to never find any separate debug infos in $debug_root.
- gdb_test "set debug-file-directory"
+ gdb_test_no_output "set debug-file-directory"
gdb_reinitialize_dir $srcdir/$subdir
# Print the "PIE (Position Independent Executable) displacement" message.
- gdb_test "set verbose on"
+ gdb_test_no_output "set verbose on"
# Test no (error) message has been printed by `exec-file'.
set escapedfile [string_to_regexp $file]
# breakpoint on a symbol causes 'break' to choke.
#
-gdb_test "set breakpoint pending on" "" "rbreak junk pending setup"
+gdb_test_no_output "set breakpoint pending on" "rbreak junk pending setup"
# We expect at least one breakpoint to be set when we "rbreak main".
gdb_test "rbreak main" \
# The default "auto" mode removes all the breakpoints when we stop (and not
# running the nonstop mode). We would not be able to test the shadow.
-gdb_test "set breakpoint always-inserted on"
+gdb_test_no_output "set breakpoint always-inserted on"
gdb_test "show breakpoint always-inserted" "Always inserted breakpoint mode is on."
set match "\nDump of assembler code for function main:\r\n(.*)End of assembler dump.\r\n$gdb_prompt $"
gdb_test "break sum_array_print" \
".*Breakpoint ${decimal}: file .*call-ar-st.c, line.*" \
"set breakpoint in sum_array_print"
-gdb_test "set print frame-arguments all" ""
+gdb_test_no_output "set print frame-arguments all"
gdb_test "continue" \
".*Breakpoint ${decimal}, sum_array_print \\(seed=10, linked_list1=.next_index = .1, 2, 3, 4, 5, 6, 7, 8, 9, 10., values = .4, 6, 8, 10, 12, 14, 16, 18, 20, 22., head = 0., linked_list2=.next_index = .1, 2, 3, 4, 5, 6, 7, 8, 9, 10., values = .8, 10, 12, 14, 16, 18, 20, 22, 24, 26., head = 0., linked_list3=.next_index = .1, 2, 3, 4, 5, 6, 7, 8, 9, 10., values = .10, 12, 14, 16, 18, 20, 22, 24, 26, 28., head = 0., linked_list4=.next_index = .1, 2, 3, 4, 5, 6, 7, 8, 9, 10., values = .20, 22, 24, 26, 28, 30, 32, 34, 36, 38., head = 0.\\) at .*call-ar-st.c:1105\[ \t\n\r\]+1105.*printf\\(.Sum of 4 arrays, by element \\(add in seed as well\\).*\\);.*" \
"check args of sum_array_print"
gdb_load ${binfile}
# Make certain that the output is consistent
- gdb_test "set print sevenbit-strings" "" \
- "set print sevenbit-strings; ${testfile}"
- gdb_test "set print address off" "" \
- "set print address off; ${testfile}"
- gdb_test "set width 0" "" \
- "set width 0; ${testfile}"
+ gdb_test_no_output "set print sevenbit-strings"
+ gdb_test_no_output "set print address off"
+ gdb_test_no_output "set width 0"
# Advance to main
if { ![runto_main] } then {
# stores its parameter in the global variable "L". GDB then
# examining that global to confirm that the value is as expected.
- gdb_test "call Fun(foo)" "" "call Fun(foo); ${tests}"
+ gdb_test_no_output "call Fun(foo)" "call Fun(foo); ${tests}"
gdb_test "p/c L" " = 49 '1'" "p/c L; ${tests}"
}
# Pop the dummy frame.
gdb_test "frame $frame_number" ""
-gdb_test "set confirm off" ""
-gdb_test "return" ""
+gdb_test_no_output "set confirm off"
+gdb_test_no_output "return"
# Resume execution, the program should continue without any signal.
# Pop the dummy frame.
gdb_test "frame $frame_number" ""
-gdb_test "set confirm off" ""
-gdb_test "return" ""
+gdb_test_no_output "set confirm off"
+gdb_test_no_output "return"
# Continue again, this time we should get to the signal handler.
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
-gdb_test "set print sevenbit-strings" ""
-gdb_test "set print address off" ""
-gdb_test "set width 0" ""
+gdb_test_no_output "set print sevenbit-strings"
+gdb_test_no_output "set print address off"
+gdb_test_no_output "set width 0"
if { $hp_aCC_compiler } {
# Do not set language explicitly to 'C'. This will cause aCC
# However, turn off overload-resolution for aCC. Having it on causes
# a lot of failures.
- gdb_test "set overload-resolution 0" ".*"
+ gdb_test_no_output "set overload-resolution 0"
} else {
if { ![set_lang_c] } {
gdb_suppress_tests;
# Make sure GDB doesn't load the syscalls xml from the system data
# directory.
- gdb_test "set data-directory /the/path/to/nowhere" ""
+ gdb_test_no_output "set data-directory /the/path/to/nowhere"
# Testing to see if we receive a warning when calling "catch syscall"
# without XML support (without datadir).
# Make sure GDB doesn't load the syscalls xml from the system data
# directory.
- gdb_test "set data-directory /the/path/to/nowhere" ""
+ gdb_test_no_output "set data-directory /the/path/to/nowhere"
# Let's test if we can catch syscalls without XML support.
# We should succeed, but GDB is not supposed to print syscall names.
set wchar_ok 1
}
-gdb_test "set host-charset ASCII" ""
+gdb_test_no_output "set host-charset ASCII"
foreach target_charset $charset_subset {
if {![valid_target_charset $target_charset]} {
continue
}
# Reset the target charset.
-gdb_test "set target-charset UTF-8" ""
+gdb_test_no_output "set target-charset UTF-8"
# \242 is not a valid UTF-8 character.
gdb_test "print \"\\242\"" " = \"\\\\242\"" \
proc string_display { var_name set_prefix x_size x_type} {
- gdb_test "set ${var_name} = ${set_prefix}\"Test String\\0with zeroes\"" "" "Assign ${var_name} with prefix ${set_prefix}"
+ gdb_test_no_output "set ${var_name} = ${set_prefix}\"Test String\\0with zeroes\"" "Assign ${var_name} with prefix ${set_prefix}"
gdb_test "x /2${x_size}s ${var_name}" ".* ${x_type}\"Test String\"\[\r\n\]+.* ${x_type}\"with zeroes\"" "Display String ${var_name} with x/${x_size}s"
}
gdb_step_for_stub;
}
-gdb_test "set print sevenbit-strings" "" ""
-gdb_test "set print address off" "" ""
-gdb_test "set width 0" "" ""
+gdb_test_no_output "set print sevenbit-strings"
+gdb_test_no_output "set print address off"
+gdb_test_no_output "set width 0"
set ws "\[ \t\]*"
proc gdbvar_simple_if_test {} {
global gdb_prompt
- gdb_test "set \$foo = 0" "" "set foo in gdbvar_simple_if_test"
+ gdb_test_no_output "set \$foo = 0" "set foo in gdbvar_simple_if_test"
# All this test should do is print 0xdeadbeef once.
gdb_test "if \$foo == 1\np/x 0xfeedface\nelse\np/x 0xdeadbeef\nend" \
"\\\$\[0-9\]* = 0xdeadbeef" "gdbvar_simple_if_test #1"
proc gdbvar_simple_while_test {} {
global gdb_prompt
- gdb_test "set \$foo = 5" "" "set foo in gdbvar_simple_while_test"
+ gdb_test_no_output "set \$foo = 5" "set foo in gdbvar_simple_while_test"
# This test should print 0xfeedface five times.
gdb_test "while \$foo > 0\np/x 0xfeedface\nset \$foo -= 1\nend" \
"\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface" \
proc gdbvar_complex_if_while_test {} {
global gdb_prompt
- gdb_test "set \$foo = 4" "" "set foo in gdbvar complex_if_while_test"
+ gdb_test_no_output "set \$foo = 4" \
+ "set foo in gdbvar complex_if_while_test"
# This test should alternate between 0xdeadbeef and 0xfeedface two times.
gdb_test "while \$foo > 0\nset \$foo -= 1\nif \(\$foo % 2\) == 1\np/x 0xdeadbeef\nelse\np/x 0xfeedface\nend\nend" \
"\\\$\[0-9\]* = 0xdeadbeef\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface\[^\n\]*\n\\\$\[0-9\]* = 0xdeadbeef\[^\n\]*\n\\\$\[0-9\]* = 0xfeedface" \
return
}
- gdb_test "set args 5" "" "set args in progvar_simple_while_test"
+ gdb_test_no_output "set args 5" "set args in progvar_simple_while_test"
if { ![runto factorial] } then { gdb_suppress_tests }
# Don't depend upon argument passing, since most simulators don't
# currently support it. Bash value variable to be what we want.
return
}
- gdb_test "set args 4" "" "set args in progvar_complex_if_while_test"
+ gdb_test_no_output "set args 4" \
+ "set args in progvar_complex_if_while_test"
if { ![runto factorial] } then { gdb_suppress_tests }
# Don't depend upon argument passing, since most simulators don't
# currently support it. Bash value variable to be what we want.
return
}
- gdb_test "set args 5" "" "set args in if_while_breakpoint_command_test"
+ gdb_test_no_output "set args 5" \
+ "set args in if_while_breakpoint_command_test"
if { ![runto factorial] } then { gdb_suppress_tests }
# Don't depend upon argument passing, since most simulators don't
# currently support it. Bash value variable to be what we want.
return
}
- gdb_test "set args 6" "" "set args in infrun_breakpoint_command_test"
+ gdb_test_no_output "set args 6" \
+ "set args in infrun_breakpoint_command_test"
if { ![runto factorial] } then { gdb_suppress_tests }
# Don't depend upon argument passing, since most simulators don't
# currently support it. Bash value variable to be what we want.
return
}
- gdb_test "set args 6" "" "set args in breakpoint_command_test"
+ gdb_test_no_output "set args 6" "set args in breakpoint_command_test"
if { ![runto factorial] } then { gdb_suppress_tests; }
# Don't depend upon argument passing, since most simulators don't
# currently support it. Bash value variable to be what we want.
proc user_defined_command_test {} {
global gdb_prompt
- gdb_test "set \$foo = 4" "" "set foo in user_defined_command_test"
+ gdb_test_no_output "set \$foo = 4" \
+ "set foo in user_defined_command_test"
gdb_test_multiple "define mycommand" \
"define mycommand in user_defined_command_test" {
gdb_test "set can-use-hw-watchpoints 0" "" ""
}
- gdb_test "set args 6" "" "set args in watchpoint_command_test"
+ gdb_test_no_output "set args 6" "set args in watchpoint_command_test"
if { ![runto factorial] } then { return }
delete_breakpoints
gdb_test "maintenance deprecate blah" "Can't find command.*" \
"tried to deprecate non-existing command"
- gdb_test "maintenance deprecate p \"new_p\"" "" "maintenance deprecate p \"new_p\" /1/"
+ gdb_test_no_output "maintenance deprecate p \"new_p\"" "maintenance deprecate p \"new_p\" /1/"
gdb_test "p 5" \
"Warning: 'p', an alias for the command 'print' is deprecated.*Use 'new_p'.*" \
"p deprecated warning, with replacement"
gdb_test "p 5" ".\[0-9\]* = 5.*" "Deprecated warning goes away /1/"
- gdb_test "maintenance deprecate p \"new_p\"" "" "maintenance deprecate p \"new_p\" /2/"
- gdb_test "maintenance deprecate print \"new_print\"" ""
+ gdb_test_no_output "maintenance deprecate p \"new_p\"" "maintenance deprecate p \"new_p\" /2/"
+ gdb_test_no_output "maintenance deprecate print \"new_print\""
gdb_test "p 5" \
"Warning: command 'print' \\(p\\) is deprecated.*Use 'new_print'.*" \
"both alias and command are deprecated"
gdb_test "p 5" ".\[0-9\]* = 5.*" "Deprecated warning goes away /2/"
- gdb_test "maintenance deprecate set remote memory-read-packet-size \"srm\" " \
- "" \
+ gdb_test_no_output "maintenance deprecate set remote memory-read-packet-size \"srm\" " \
"deprecate long command /1/"
gdb_test "set remote memory-read-packet-size" \
"Warning: command 'set remote memory-read-packet-size' is deprecated.*Use 'srm'.*" \
"long command deprecated /1/"
- gdb_test "maintenance deprecate set remote memory-read-packet-size" \
- "" \
+ gdb_test_no_output "maintenance deprecate set remote memory-read-packet-size" \
"deprecate long command /2/"
gdb_test "set remote memory-read-packet-size" \
"Warning: command 'set remote memory-read-packet-size' is deprecated.*No alternative known.*" \
return
}
- gdb_test "set args 1" "" "set args in bp_deleted_in_command_test"
+ gdb_test_no_output "set args 1" \
+ "set args in bp_deleted_in_command_test"
delete_breakpoints
# Create a breakpoint, and associate a command-list to it, with
return
}
- gdb_test "set args 1" "" "set args in temporary_breakpoint_commands"
+ gdb_test_no_output "set args 1" \
+ "set args in temporary_breakpoint_commands"
delete_breakpoints
# Create a temporary breakpoint, and associate a commands list to it.
proc if_commands_test {} {
global gdb_prompt
- gdb_test "set \$tem = 1" "" "set \$tem in if_commands_test"
+ gdb_test_no_output "set \$tem = 1" "set \$tem in if_commands_test"
set test "if_commands_test 1"
gdb_test_no_prompt "if \$tem == 2" { >} $test
gdb_test "print (0 ? 3 : 4)" "\[0-9\]* = 4" \
"print value of cond expr (const false)"
-gdb_test "set variable x=14" "" "set variable x=14"
-gdb_test "set variable y=2" "" "set variable y=2"
-gdb_test "set variable z=3" "" "set variable z=3"
+gdb_test_no_output "set variable x=14" "set variable x=14"
+gdb_test_no_output "set variable y=2" "set variable y=2"
+gdb_test_no_output "set variable z=3" "set variable z=3"
gdb_test "print (x ? y : z)" "\[0-9\]* = 2" \
"print value of cond expr (var true)"
-gdb_test "set variable x=0" "" "set variable x=0"
+gdb_test_no_output "set variable x=0" "set variable x=0"
gdb_test "print (x ? y : z)" "\[0-9\]* = 3" \
"print value of cond expr (var false)"
gdb_test "break marker1 if 1==1" \
"Breakpoint.*at.* file .*$srcfile1, line.*"
-gdb_test "delete 2" ""
+gdb_test_no_output "delete 2"
#
# test conditional break at line number
gdb_test "break $srcfile:$bp_location1 if 1==1" \
"Breakpoint.*at.* file .*$srcfile, line $bp_location1\\."
-gdb_test "delete 3" ""
+gdb_test_no_output "delete 3"
#
# test conditional break at function
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_file_cmd ${binfile}
-gdb_test "set listsize 1" \
- ".*"
+gdb_test_no_output "set listsize 1"
# initial sal should be first statement in main
gdb_test "list" \
"list after backtrace"
# check the window
-gdb_test "set listsize 3" \
- ".*"
+gdb_test_no_output "set listsize 3"
+
if {! [runto_main]} {
return -1
}
gdb_step_for_stub;
}
-gdb_test "set print sevenbit-strings" "" ""
-gdb_test "set print address off" "" ""
-gdb_test "set width 0" "" ""
+gdb_test_no_output "set print sevenbit-strings"
+gdb_test_no_output "set print address off"
+gdb_test_no_output "set width 0"
set ws "\[ \t\]*"
#test core-file
gdb_test "core-file" "No core file now.|GDB can't read core files on this machine." "core-file"
#test delete "d" abbreviation
-gdb_test "d" "" "delete \"d\" abbreviation"
+gdb_test_no_output "d" "delete \"d\" abbreviation"
#test delete
-gdb_test "delete" "" "delete"
+gdb_test_no_output "delete" "delete"
#test define
gdb_test "define" "Argument required \[(\]name of command to define\[)\]." "define"
#test delete breakpoints
-gdb_test "delete breakpoints" "" "delete breakpoints"
+gdb_test_no_output "delete breakpoints" "delete breakpoints"
#test delete display
# FIXME -- need to dump full output to detailed log
"y"
#test disable "dis" abbreviation
-gdb_test "dis" "" "disable \"dis\" abbreviation"
+gdb_test_no_output "dis" "disable \"dis\" abbreviation"
#test disable "disa" abbreviation
-gdb_test "disa" "" "disable \"disa\" abbreviation"
+gdb_test_no_output "disa" "disable \"disa\" abbreviation"
#test disable
-gdb_test "disable" "" "disable"
+gdb_test_no_output "disable" "disable"
#test disable breakpoints
-gdb_test "disable breakpoints" "" "disable breakpoints"
+gdb_test_no_output "disable breakpoints" "disable breakpoints"
#test disable display
-gdb_test "disable display" "" "disable display"
+gdb_test_no_output "disable display" "disable display"
#test disassemble
gdb_test "disassemble" "No frame selected." "disassemble"
#test display
-gdb_test "display" "" "display"
+gdb_test_no_output "display" "display"
#test do
gdb_test "do" "No stack." "do"
#test document
gdb_test "dump tekhex memory" "Missing filename\."
gdb_test "dump tekhex value" "Missing filename\."
#test echo
-gdb_test "echo" "" "echo"
+gdb_test_no_output "echo" "echo"
#test enable breakpoints delete
gdb_test "enable breakpoints delete" "Argument required .one or more breakpoint numbers.*" "enable breakpoints delete"
#test enable breakpoints once
gdb_test "enable breakpoints once" "Argument required .one or more breakpoint numbers.*" "enable breakpoints once"
#test enable breakpoints
-gdb_test "enable breakpoints" "" "enable breakpoints"
+gdb_test_no_output "enable breakpoints" "enable breakpoints"
#test enable delete
gdb_test "enable delete" "Argument required .one or more breakpoint numbers.*" "enable delete"
#test enable display
-gdb_test "enable display" "" "enable display"
+gdb_test_no_output "enable display" "enable display"
#test enable once
gdb_test "enable once" "Argument required .one or more breakpoint numbers.*" "enable once"
#test enable
-gdb_test "enable" "" "enable"
+gdb_test_no_output "enable" "enable"
#test exec-file
send_gdb "exec-file\n"
gdb_expect {
#test info frame
gdb_test "info frame" "No stack.|No selected frame." "info frame"
#test info files
-gdb_test "info files" "" "info files"
+gdb_test_no_output "info files" "info files"
#test info float
gdb_test "info float" "The program has no registers now." "info float"
#test info functions
#test info sources
gdb_test "info sources" "No symbol table is loaded. Use the \"file\" command.*" "info sources"
#test info target
-gdb_test "info target" "" "info target"
+gdb_test_no_output "info target" "info target"
#test info terminal
gdb_test "info terminal" "No saved terminal information." "info terminal"
#test info types
gdb_test "overlay" "\"overlay\" must be followed by the name of .*"
#test a non-existant overlay subcommand
gdb_test "overlay on" "Undefined overlay command.* Try \"help overlay\"."
-gdb_test "overlay manual" "" "overlay manual #1"
-gdb_test "overlay auto" ""
-gdb_test "overlay off" ""
+gdb_test_no_output "overlay manual" "overlay manual #1"
+gdb_test_no_output "overlay auto"
+gdb_test_no_output "overlay off"
gdb_test "overlay list" "No sections are mapped."
gdb_test "overlay map" "Overlay debugging not enabled.*" "overlay map #1"
gdb_test "overlay unmap" "Overlay debugging not enabled.*" "overlay unmap #1"
-gdb_test "overlay manual" "" "overlay manual #2"
+gdb_test_no_output "overlay manual" "overlay manual #2"
gdb_test "overlay map" "Argument required: name of an overlay section." "overlay map #2"
gdb_test "overlay unmap" "Argument required: name of an overlay section." "overlay unmap #2"
}
#test rbreak
-gdb_test "rbreak" "" "rbreak"
+gdb_test "rbreak" "rbreak"
# test restore
gdb_test "restore" "You can't do that without a process to debug\."
#test set annotate
gdb_test "set annotate" "Argument required .integer to set it to.*" "set annotate"
#test set args
-gdb_test "set args" "" "set args"
+gdb_test_no_output "set args" "set args"
#test set check "c" abbreviation
gdb_test "set c" "\"set check\" must be followed by the name of a check subcommand.(\[^\r\n\]*\[\r\n\])+List of set check subcommands:(\[^\r\n\]*\[\r\n\])+set check range -- Set range checking(\[^\r\n\]*\[\r\n\])+set check type -- Set type checking(\[^\r\n\]*\[\r\n\])+Type \"help set check\" followed by set check subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous." "set check \"c\" abbreviation"
#test set check "ch" abbreviation
#test set complaints
gdb_test "set complaints" "Argument required .integer to set it to.*" "set complaints"
#test set confirm
-gdb_test "set confirm" "" "set confirm"
+gdb_test_no_output "set confirm" "set confirm"
# Don't test set editing. What if we're talking to a gdb that
# won't do editing correctly while we're talking to it?
# gdb_test "set editing" "" "set editing"
#test set height
gdb_test "set height" "Argument required .integer to set it to.*" "set height"
#test set history expansion
-gdb_test "set history expansion" "" "set history expansion"
+gdb_test_no_output "set history expansion" "set history expansion"
#test set history filename
gdb_test "set history filename" "Argument required .filename to set it to.*" "set history filename"
#test set history save
-gdb_test "set history save" "" "set history save"
+gdb_test_no_output "set history save" "set history save"
#test set history size
gdb_test "set history size" "Argument required .integer to set it to.*" "set history size"
#test set history
#test set print
gdb_test "set print" "\"set print\" must be followed by the name of a print subcommand.(\[^\r\n\]*\[\r\n\])+List of set print subcommands:(\[^\r\n\]*\[\r\n\])+Type \"help set print\" followed by set print subcommand name for full documentation.(\[^\r\n\]*\[\r\n\])+Command name abbreviations are allowed if unambiguous." "set print"
#test set print address
-gdb_test "set print address" "" "set print address"
+gdb_test_no_output "set print address" "set print address"
#test set print array
-gdb_test "set print array" "" "set print array"
+gdb_test_no_output "set print array" "set print array"
#test set print asm-demangle
-gdb_test "set print asm-demangle" "" "set print asm-demangle"
+gdb_test_no_output "set print asm-demangle" "set print asm-demangle"
#test set print demangle
-gdb_test "set print demangle" "" "set print demangle"
+gdb_test_no_output "set print demangle" "set print demangle"
#test set print elements
gdb_test "set print elements" "Argument required .integer to set it to.*" "set print elements"
#test set print object
-gdb_test "set print object" "" "set print object"
+gdb_test_no_output "set print object" "set print object"
#test set print pretty
-gdb_test "set print pretty" "" "set print pretty"
+gdb_test_no_output "set print pretty" "set print pretty"
#test set print sevenbit-strings
-gdb_test "set print sevenbit-strings" "" "set print sevenbit-strings"
+gdb_test_no_output "set print sevenbit-strings" "set print sevenbit-strings"
#test set print union
-gdb_test "set print union" "" "set print union"
+gdb_test_no_output "set print union" "set print union"
#test set print vtbl
-gdb_test "set print vtbl" "" "set print vtbl"
+gdb_test_no_output "set print vtbl" "set print vtbl"
# FIXME -- need a test for "set prompt"
#test set radix
gdb_test "set radix" "Input and output radices now set to decimal 10, hex a, octal 12.*" "set radix"
#test set symbol-reloading
-gdb_test "set symbol-reloading" "" "set symbol-reloading"
+gdb_test_no_output "set symbol-reloading" "set symbol-reloading"
#test set variable
gdb_test "set variable" "Argument required .expression to compute.*" "set variable"
#test set verbose
-gdb_test "set verbose" "" "set verbose"
+gdb_test_no_output "set verbose" "set verbose"
#test set width
gdb_test "set width" "Argument required .integer to set it to.*" "set width"
#test set write
# This is only supported on targets which use exec.o.
-gdb_test "set write" "" "set write"
+gdb_test_no_output "set write" "set write"
#test set
gdb_test "set" "Argument required .expression to compute.*" "set"
#test shell echo Hi dad!
#test show symbol-reloading
gdb_test "show symbol-reloading" "Dynamic symbol table reloading multiple times in one run is on." "show symbol-reloading"
#test show user
-gdb_test "show user" "" "show user"
+gdb_test_no_output "show user" "show user"
#test show values
-gdb_test "show values" "" "show values"
+gdb_test_no_output "show values" "show values"
#test show verbose
gdb_test "show verbose" "Verbose printing of informational messages is o.*|Verbosity is off.*" "show verbose"
#test show version
# First of all, remove all previous breakpoints if there were any,
# and then verify that we do not have any breakpoint lying around.
- gdb_test "delete" \
- "" \
+ gdb_test_no_output "delete" \
"Remove all breakpoints ($alias)"
+
gdb_test "info break" \
"No breakpoints or watchpoints." \
"info break after removing break on main"
"Breakpoint.*at.* file .*$srcfile, line.*" \
"breakpoint insertion ($alias)"
- gdb_test "$alias \$bpnum" \
- "" \
+ gdb_test_no_output "$alias \$bpnum" \
"Remove last breakpoint ($alias)"
gdb_test "info break" \
global pass
runto_main
- gdb_test "set should_exit = 1" "" "set should_exit, $pass"
+ gdb_test_no_output "set should_exit = 1" "set should_exit, $pass"
gdb_test "detach" "Detaching from program: .*$escapedbinfile, .*" "detach, $pass"
}
gdb_test "cont" ".*\[Ww\]atchpoint 3: sum.*\[1-9\]*: x/s &sum.*\[1-9\]*: /f f = 4.1415\r\n\[1-9\]*: x/i &k.*\r\n\[1-9\]*: /x j = 0x0.*\[1-9\]*: i = 0.*" "second disp"
gdb_test "enab disp 6" ".*No display number 6..*" "catch err"
-gdb_test "disab disp 1" ".*" "disab disp 1"
-gdb_test "disab disp 2" ".*" "disab disp 2"
-gdb_test "enab disp 1" ".*" "re-enab"
-gdb_test "enab disp 1" ".*" "re-enab of enab"
-gdb_test "undisp 5" ".*" "undisp"
+gdb_test_no_output "disab disp 1" "disab disp 1"
+gdb_test_no_output "disab disp 2" "disab disp 2"
+gdb_test_no_output "enab disp 1" "re-enab"
+gdb_test_no_output "enab disp 1" "re-enab of enab"
+gdb_test_no_output "undisp 5" "undisp"
gdb_test "info disp" ".*Auto-display expressions now in effect.*y /f f.*y /1bi &k.*n /x j.*y i.*" "info disp"
gdb_test "cont" ".*\[Ww\]atch.*5.1415.*.*i = 0.*" "next hit"
gdb_test "printf \"%d" ".*Bad format string, non-terminated.*"
gdb_test "printf \"%d%d\",i" ".*Wrong number of arguments.*"
gdb_test "printf \"\\\\!\\a\\f\\r\\t\\v\\b\\n\"" ".*!.*"
-gdb_test "printf \"\"" ".*" "re-set term"
+gdb_test_no_output "printf \"\"" "re-set term"
gdb_test "printf \"\\w\"" ".*Unrecognized escape character.*"
gdb_test "printf \"%d\" j" ".*Invalid argument syntax.*"
gdb_test "printf \"%p\\n\", 0" "\\(nil\\)"
if [istarget "hppa2.0w-hp-hpux11*"] {
xfail "'x/0 j' terminates PA64 process - skipped test point"
} else {
- gdb_test "x/0 j" ".*"
+ gdb_test_no_output "x/0 j"
}
if [istarget "hppa*-hp-hpux*"] {
# on HP-UX you could access the first page without getting an error
set bp [break_at "marker1" " line ($bp_location15|$bp_location16)"]
-gdb_test "enable $bp" "" "enable break marker1"
+gdb_test_no_output "enable $bp" "enable break marker1"
gdb_test "info break $bp" \
"\[0-9\]*\[ \t\]+breakpoint\[ \t\]+keep\[ \t\]+y.*" \
}
}
-gdb_test "delete $bp" "" "delete break marker1"
+gdb_test_no_output "delete $bp" "delete break marker1"
# Verify that we can set a breakpoint to be self-disabling after the
# first time it triggers.
set bp [break_at "marker2" " line ($bp_location8|$bp_location9)"]
-gdb_test "enable once $bp" "" "enable once break marker2"
+gdb_test_no_output "enable once $bp" "enable once break marker2"
gdb_test "info break $bp" \
"\[0-9\]*\[ \t\]+breakpoint\[ \t\]+dis\[ \t\]+y.*" \
set bp [break_at "marker3" " line ($bp_location17|$bp_location18)"]
-gdb_test "enable del $bp" "" "enable del break marker3"
+gdb_test_no_output "enable del $bp" "enable del break marker3"
gdb_test "info break $bp" \
"\[0-9\]*\[ \t\]+breakpoint\[ \t\]+del\[ \t\]+y.*" \
set bp [break_at "marker4" " line ($bp_location14|$bp_location13).*"]
-gdb_test "disable $bp" "" "disable break marker4"
+gdb_test_no_output "disable $bp" "disable break marker4"
gdb_test "info break $bp" \
"\[0-9\]*\[ \t\]+breakpoint\[ \t\]+keep\[ \t\]+n.*" \
"Will ignore next crossing of breakpoint \[0-9\]*.*" \
"ignore break marker1"
-gdb_test "enable del $bp" "" "enable del break marker1"
+gdb_test_no_output "enable del $bp" "enable del break marker1"
gdb_test "info break $bp" \
"\[0-9\]*\[ \t\]+breakpoint\[ \t\]+del\[ \t\]+y.*ignore next 1 hits.*" \
"Will ignore next 10 crossings of breakpoint \[0-9\]*.*" \
"ignore break marker1"
-gdb_test "disable $bp" "" "disable break marker1"
+gdb_test_no_output "disable $bp" "disable break marker1"
gdb_continue_to_end "no stop at ignored & disabled break marker1"
rerun_to_main
continue
}
-gdb_test "set variable x=14" "" "set variable x=14"
-gdb_test "set variable y=2" "" "set variable y=2"
-gdb_test "set variable z=2" "" "set variable z=2"
-gdb_test "set variable w=3" "" "set variable w=3"
+gdb_test_no_output "set variable x=14" "set variable x=14"
+gdb_test_no_output "set variable y=2" "set variable y=2"
+gdb_test_no_output "set variable z=2" "set variable z=2"
+gdb_test_no_output "set variable w=3" "set variable w=3"
gdb_test "print (0 && (x+y))" ".$decimal = $false" \
"print value of (0 && (x+y))"
"Breakpoint .*file .*$srcfile, line .*" \
"unpatch child, breakpoint at exit call"
- gdb_test "set follow-fork child" "" "unpatch child, set follow-fork child"
+ gdb_test_no_output "set follow-fork child" \
+ "unpatch child, set follow-fork child"
set test "unpatch child, unpatched parent breakpoints from child"
gdb_test_multiple "continue" $test {
# The "Detaching..." and "Attaching..." messages may be hidden by
# default.
-gdb_test "set verbose" ""
+gdb_test_no_output "set verbose"
# This is a test of gdb's ability to follow the parent, child or both
# parent and child of a Unix fork() system call.
# The "Detaching..." and "Attaching..." messages may be hidden by
# default.
-gdb_test "set verbose" ""
+gdb_test_no_output "set verbose"
# This is a test of gdb's ability to follow the parent or child
# of a Unix vfork() system call. (The child will subsequently
# Test with "print frame-arguments" set to "all"
-gdb_test "set print frame-arguments all" \
- "" \
+gdb_test_no_output "set print frame-arguments all" \
"set print frame-arguments all"
gdb_test "frame 1" \
".*in call_me \\(i=3, f=5, s=({a = 3, b = 5}|<value optimized out>), ss=0x\[0-9a-f\]\+, u=({.*}|<value optimized out>), e=green\\) at .*frame-args\\.c:.*" \
# Test with "print frame-arguments" set to "scalars"
-gdb_test "set print frame-arguments scalars" \
- "" \
+gdb_test_no_output "set print frame-arguments scalars" \
"set print frame-arguments scalars"
gdb_test "frame 1" \
".*in call_me \\(i=3, f=5, s=\\.\\.\\., ss=0x\[0-9a-f\]\+, u=\\.\\.\\., e=green\\) at .*frame-args\\.c:.*" \
# Test with "print frame-arguments" set to "none"
-gdb_test "set print frame-arguments none" \
- "" \
+gdb_test_no_output "set print frame-arguments none" \
"set print frame-arguments none"
gdb_test "frame 1" \
".*in call_me \\(i=\\.\\.\\., f=\\.\\.\\., s=\\.\\.\\., ss=\\.\\.\\., u=\\.\\.\\., e=\\.\\.\\.\\) at .*frame-args\\.c:.*" \
# Perform tests
-gdb_test "set print frame-arguments all" ""
+gdb_test_no_output "set print frame-arguments all"
integral_args
funcargs_reload
}
}
-gdb_test "set args ${pattern}" \
- "" \
- "Set buffer exceeding arguments"
+gdb_test_no_output "set args ${pattern}" \
+ "Set buffer exceeding arguments"
if { ! [ runto_main ] } then {
untested gcore-buffer-overflow.exp
proc test_convenience_variables {} {
global gdb_prompt
- gdb_test "set \$foo = 101" "" \
+ gdb_test_no_output "set \$foo = 101" \
"Set a new convenience variable"
gdb_test "print \$foo" " = 101" \
"Print contents of new convenience variable"
- gdb_test "set \$foo = 301" "" \
+ gdb_test_no_output "set \$foo = 301" \
"Set convenience variable to a new value"
gdb_test "print \$foo" " = 301" \
"Print new contents of convenience variable"
- gdb_test "set \$_ = 11" "" \
+ gdb_test_no_output "set \$_ = 11" \
"Set convenience variable \$_"
gdb_test "print \$_" " = 11" \
proc test_with_program {} {
global hex
- gdb_test "set \$prog_var = p" "" \
+ gdb_test_no_output "set \$prog_var = p" \
"Set a new convenience variable to a program variable"
gdb_test "print /x \$prog_var" " = $hex" \
"Print contents of new convenience variable of program variable"
gdb_start
-# force the height of the debugger to be pretty large so no pagers getused
-gdb_test "set height 400" "" "test set height"
+# force the height of the debugger to be pretty large so no pagers get used
+gdb_test_no_output "set height 400" "test set height"
# use a larger expect input buffer for long help outputs.
# test help add-symbol-file
# create
gdb_test "define abc\nif 1\nelse\nend\nend" "" "create define with empty else"
# call (note that condition is 1 so should pass)
-gdb_test "abc" "" "call original define"
+gdb_test_no_output "abc" "call original define"
# replace
set message "replace define with if .. else with empty body"
gdb_test_multiple "define abc\necho got here\\n\nend" $message {
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
-gdb_test "set listsize 1" ""
+gdb_test_no_output "set listsize 1"
gdb_test "list main" ".*"
get_debug_format
proc test_forward_search {} {
global timeout
- gdb_test "set listsize 4" ""
+ gdb_test_no_output "set listsize 4"
# On SunOS4, this gives us lines 19-22. On AIX, it gives us
# lines 20-23. This depends on whether the line number of a function
# is considered to be the openbrace or the first statement--either one
gdb_step_for_stub;
}
-gdb_test "set width 0" "" "set width 0"
+gdb_test_no_output "set width 0"
test_listsize
get_debug_format
" = 0" \
"print expression with macro in scope."
-gdb_test "macro define MACRO_TO_EXPAND 72" \
- "" \
+gdb_test_no_output "macro define MACRO_TO_EXPAND 72" \
"user macro override"
gdb_test "print MACRO_TO_EXPAND" \
" = 72" \
"choose user macro"
-gdb_test "macro undef MACRO_TO_EXPAND" \
- "" \
+gdb_test_no_output "macro undef MACRO_TO_EXPAND" \
"remove user override"
gdb_test "print MACRO_TO_EXPAND" \
"No symbol \"MACRO_TO_EXPAND\" in current context\." \
"print expression with macro after undef."
-gdb_test "macro define MACRO_TO_EXPAND 5" \
- "" \
+gdb_test_no_output "macro define MACRO_TO_EXPAND 5" \
"basic macro define"
gdb_test "print MACRO_TO_EXPAND" \
"macro define MACRO_TO_EXPAND 5" \
"basic macro list"
-gdb_test "macro define MACRO_TO_EXPAND(x) x" \
- "" \
+gdb_test_no_output "macro define MACRO_TO_EXPAND(x) x" \
"basic redefine, macro with args"
gdb_test "print MACRO_TO_EXPAND (7)" \
" = 7" \
"expansion of macro with arguments"
-gdb_test "macro undef MACRO_TO_EXPAND" \
- "" \
+gdb_test_no_output "macro undef MACRO_TO_EXPAND" \
"basic macro undef"
gdb_test "print MACRO_TO_EXPAND" \
timeout { fail "(timeout) complete 'p FORTY_' 2" }
}
-gdb_test "macro define TWENTY_THREE 25" \
- "" \
+gdb_test_no_output "macro define TWENTY_THREE 25" \
"defining TWENTY_THREE"
# User-defined macros are always in scope.
"expands to: xy" \
"basic macro splicing"
-gdb_test "macro define robotinvasion 2010" \
- "" \
+gdb_test_no_output "macro define robotinvasion 2010" \
"define splice helper"
gdb_test "macro expand SPLICE(robot, invasion)" \
# Varargs tests.
-gdb_test "macro define va_c99(...) varfunc (fixedarg, __VA_ARGS__)" \
- "" \
+gdb_test_no_output "macro define va_c99(...) varfunc (fixedarg, __VA_ARGS__)" \
"define first varargs helper"
-gdb_test "macro define va2_c99(x, y, ...) varfunc (fixedarg, x, y, __VA_ARGS__)" \
- "" \
+gdb_test_no_output "macro define va2_c99(x, y, ...) varfunc (fixedarg, x, y, __VA_ARGS__)" \
"define second varargs helper"
-gdb_test "macro define va_gnu(args...) varfunc (fixedarg, args)" \
- "" \
+gdb_test_no_output "macro define va_gnu(args...) varfunc (fixedarg, args)" \
"define third varargs helper"
-gdb_test "macro define va2_gnu(args...) varfunc (fixedarg, ## args)" \
- "" \
+gdb_test_no_output "macro define va2_gnu(args...) varfunc (fixedarg, ## args)" \
"define fourth varargs helper"
gdb_test "macro expand va_c99(one, two, three)" \
# Stringification tests.
-gdb_test "macro define str(x) #x" \
- "" \
+gdb_test_no_output "macro define str(x) #x" \
"define stringification macro"
-gdb_test "macro define maude 5" \
- "" \
+gdb_test_no_output "macro define maude 5" \
"define first stringification helper"
-gdb_test "macro define xstr(x) str(x)" \
- "" \
+gdb_test_no_output "macro define xstr(x) str(x)" \
"define second stringification helper"
gdb_test "print str(5)" \
"stringify with substitution"
# Regression test for pp-number bug.
-gdb_test "macro define si_addr fields.fault.si_addr" \
- "" \
+gdb_test_no_output "macro define si_addr fields.fault.si_addr" \
"define si_addr macro"
+
gdb_test "macro expand siginfo.si_addr" \
"expands to: siginfo.fields.fault.si_addr" \
"macro expand siginfo.si_addr"
}
# There aren't any ...
-gdb_test "maint print dummy-frames" ""
+gdb_test_no_output "maint print dummy-frames"
send_gdb "maint print objfiles\n"
# The result should be that each of the 4 forks returns zero.
runto_main
-gdb_test "set follow-fork child"
+gdb_test_no_output "set follow-fork child"
continue_to_exit_bp_loc
gdb_test "print pids" "\\$.* = \\{0, 0, 0, 0\\}.*" "follow child, print pids"
gdb_test "show detach-on-fork" "on." "show detach default on"
-gdb_test "set detach off" "" "set detach off"
+gdb_test_no_output "set detach off" "set detach off"
#
# We will now run every fork up to the exit bp,
# Test kill inferior
#
-gdb_test "kill inferior 6" "" "Kill 6"
+gdb_test_no_output "kill inferior 6" "Kill 6"
gdb_test "info inferior 6" "<null>.*" "Did kill 6"
-gdb_test "kill inferior 7" "" "Kill 7"
+gdb_test_no_output "kill inferior 7" "Kill 7"
gdb_test "info inferior 7" "<null>.*" "Did kill 7"
-gdb_test "kill inferior 8" "" "Kill 8"
+gdb_test_no_output "kill inferior 8" "Kill 8"
gdb_test "info inferior 8" "<null>.*" "Did kill 8"
-gdb_test "kill inferior 9" "" "Kill 9"
+gdb_test_no_output "kill inferior 9" "Kill 9"
gdb_test "info inferior 9" "<null>.*" "Did kill 9"
-gdb_test "kill inferior 10" "" "Kill 10"
+gdb_test_no_output "kill inferior 10" "Kill 10"
gdb_test "info inferior 10" "<null>.*" "Did kill 10"
-gdb_test "kill inferior 11" "" "Kill 11"
+gdb_test_no_output "kill inferior 11" "Kill 11"
gdb_test "info inferior 11" "<null>.*" "Did kill 11"
-gdb_test "kill inferior 12" "" "Kill 12"
+gdb_test_no_output "kill inferior 12" "Kill 12"
gdb_test "info inferior 12" "<null>.*" "Did kill 12"
-gdb_test "kill inferior 13" "" "Kill 13"
+gdb_test_no_output "kill inferior 13" "Kill 13"
gdb_test "info inferior 13" "<null>.*" "Did kill 13"
-gdb_test "kill inferior 14" "" "Kill 14"
+gdb_test_no_output "kill inferior 14" "Kill 14"
gdb_test "info inferior 14" "<null>.*" "Did kill 14"
-gdb_test "kill inferior 15" "" "Kill 15"
+gdb_test_no_output "kill inferior 15" "Kill 15"
gdb_test "info inferior 15" "<null>.*" "Did kill 15"
-gdb_test "kill inferior 16" "" "Kill 16"
+gdb_test_no_output "kill inferior 16" "Kill 16"
gdb_test "info inferior 16" "<null>.*" "Did kill 16"
return 0
set iptrcast [string_to_regexp "(int *)"]
set hexx "0x\[0-9abcdefABCDEF\]+"
-gdb_test "overlay manual" ""
+gdb_test_no_output "overlay manual"
gdb_test "overlay list" "No sections are mapped." "List with none mapped"
# capture the LMA addresses of [foo bar baz grbx foox barx bazx grbxx]
# test automatic mode
-gdb_test "overlay auto" ""
+gdb_test_no_output "overlay auto"
gdb_test "overlay list" "No sections are mapped." "List none mapped (auto)"
gdb_test "break foo" "Breakpoint .*at .*file .*foo.c.*" "break foo"
gdb_test "break bar" "Breakpoint .*at .*file .*bar.c.*" "break bar"
gdb_exit
gdb_start
-gdb_test "set pagination off" ""
+gdb_test_no_output "set pagination off"
gdb_test "show pagination" "State of pagination is off.*" "pagination is off"
send_gdb "help\n"
gdb_expect_list "unpaged help" ".*$gdb_prompt $" {
}
-gdb_test "set pagination on" ""
+gdb_test_no_output "set pagination on"
gdb_test "show pagination" "State of pagination is on.*" "pagination is on"
-gdb_test "set height 10" ""
+gdb_test_no_output "set height 10"
send_gdb "help\n"
gdb_expect_list "paged help" \
".*---Type <return> to continue, or q <return> to quit---" {
# Add condition to pending breakpoint
#
-gdb_test "condition 1 k == 1" ""
+gdb_test_no_output "condition 1 k == 1"
gdb_test "info break" \
"Num Type\[ \]+Disp Enb Address\[ \]+What.*
# Disable pending breakpoint
#
-gdb_test "disable 1" ""
+gdb_test_no_output "disable 1"
gdb_test "info break" \
"Num Type\[ \]+Disp Enb Address\[ \]+What.*
# Add commands to pending breakpoint
#
gdb_test "commands 1\nprint k\nend" "" \
- "Set commands for pending breakpoint"
+ "Set commands for pending breakpoint"
gdb_test "info break" \
"Num Type\[ \]+Disp Enb Address\[ \]+What.*
# Re-enable the first pending breakpoint which should resolve
#
-gdb_test "enable 1" \
-"" \
+gdb_test_no_output "enable 1" \
"re-enabling pending breakpoint that can resolve instantly"
#
# timeout { fail "(timeout) illegal pointer assignment rejected" }
# }
-gdb_test "set variable v_int_pointer=&v_int_array\[0\]" "" "set pointer to beginning of array"
-gdb_test "set variable v_int_pointer2=&v_int_array\[1\]" "" "set pointer to end of array"
+gdb_test_no_output "set variable v_int_pointer=&v_int_array\[0\]" \
+ "set pointer to beginning of array"
+gdb_test_no_output "set variable v_int_pointer2=&v_int_array\[1\]" \
+ "set pointer to end of array"
gdb_test "print *v_int_pointer" " = 6" "print object pointed to"
gdb_test "print v_int_pointer > v_int_pointer2" " = $false" \
"pointer1>pointer2"
-gdb_test "set variable y = *v_int_pointer++" "" "set y = *v_int_pointer++"
+gdb_test_no_output "set variable y = *v_int_pointer++" \
+ "set y = *v_int_pointer++"
gdb_test "print y" " = 6" "pointer assignment"
gdb_test "print *v_int_pointer" " = 18" "and post-increment"
-gdb_test "set variable y = *--v_int_pointer2" "" "set y = *--v_int_pointer2"
+gdb_test_no_output "set variable y = *--v_int_pointer2" \
+ "set y = *--v_int_pointer2"
gdb_test "print y" " = 6" "pointer assignment"
gdb_test "print *v_int_pointer2" " = 6" "and pre-decrement"
-gdb_test "set variable y =v_int_pointer-v_int_pointer2" "" \
+gdb_test_no_output "set variable y =v_int_pointer-v_int_pointer2" \
"set y =v_int_pointer-v_int_pointer2"
gdb_test "print y" " = 1" "pointer1-pointer2"
-gdb_test "set variable v_int_pointer=v_int_array" "" \
+gdb_test_no_output "set variable v_int_pointer=v_int_array" \
"set v_int_pointer=v_int_array"
gdb_test "print *v_int_pointer" " = 6" \
"print array element through pointer"
gdb_test "print (*rptr)\[2\]" " = 2" \
"print array element through pointer \#5"
-gdb_test "set variable rptr = rptr+1" "" "increment rptr"
+gdb_test_no_output "set variable rptr = rptr+1" "increment rptr"
gdb_test "print (*rptr)\[0\]" " = 3" \
"print array element through pointer \#6"
gdb_test "continue" ".*Hardware watchpoint.*Old value = 0.*New value = 42.*" \
"watchpoint hit"
gdb_test "continue" ".*break here.*" "breakpoint hit 2"
-gdb_test "set var x = 1"
+gdb_test_no_output "set var x = 1"
gdb_test "continue" ".*Hardware watchpoint.*Old value = 1.*New value = 42.*" \
"watchpoint hit 2"
gdb_load ${binfile}
# Print the "adjusting expectations" message.
-gdb_test "set verbose on"
+gdb_test_no_output "set verbose on"
gdb_test "core-file $objdir/$subdir/prelink.core" {Using PIC \(Position Independent Code\) prelink displacement.*} "prelink"
proc set_lang_c {} {
global gdb_prompt
- if [gdb_test "set language c" "" "set language c"] {
+ if [gdb_test_no_output "set language c" "set language c"] {
return 0
}
global gdb_prompt
for { set x 1; } { $x <= 16 } { incr x; } {
- gdb_test "set print elements $x" ""
+ gdb_test_no_output "set print elements $x"
for { set e 1; } { $e <= 16 } {incr e; } {
set v [expr $e - 1];
set command "p &ctable2\[${v}*16\]"
# Test that setting print elements unlimited doesn't completely suppress
# printing; this was a bug in older gdb's.
- gdb_test "set print elements 0" ""
+ gdb_test_no_output "set print elements 0"
gdb_test "p teststring" \
" = (.unsigned char .. )?\"teststring contents\"" "p teststring with elements set to 0"
- gdb_test "set print elements 1" ""
+ gdb_test_no_output "set print elements 1"
gdb_test "p teststring" \
" = (.unsigned char .. )?\"t\"\\.\\.\\." "p teststring with elements set to 1"
- gdb_test "set print elements 5" ""
+ gdb_test_no_output "set print elements 5"
gdb_test "p teststring" \
" = (.unsigned char .. )?\"tests\"\\.\\.\\." "p teststring with elements set to 5"
- gdb_test "set print elements 19" ""
+ gdb_test_no_output "set print elements 19"
gdb_test "p teststring" \
" = (.unsigned char .. )?\"teststring contents\"" "p teststring with elements set to 19"
- gdb_test "set print elements 20" ""
+ gdb_test_no_output "set print elements 20"
gdb_test "p teststring" \
" = (.unsigned char .. )?\"teststring contents\"" "p teststring with elements set to 20"
- gdb_test "set print elements 8" ""
+ gdb_test_no_output "set print elements 8"
gdb_test "p &ctable1\[0\]" \
" = \\(unsigned char \\*\\) \"\""
proc test_print_int_arrays {} {
global gdb_prompt
- gdb_test "set print elements 24" ""
+ gdb_test_no_output "set print elements 24"
gdb_test_escape_braces "p int1dim" \
" = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}"
proc test_print_typedef_arrays {} {
global gdb_prompt
- gdb_test "set print elements 24" ""
+ gdb_test_no_output "set print elements 24"
gdb_test_escape_braces "p a1" \
" = {2, 4, 6, 8, 10, 12, 14, 16, 18, 20}"
gdb_test "p a2\[3\]" " = 100 'd'"
# Regression test of null-stop; PR 11049.
- gdb_test "set print null-stop on" ""
+ gdb_test_no_output "set print null-stop on"
gdb_test "p a2" " = \"abcd\"" "print a2 with null-stop on"
- gdb_test "set print null-stop off" ""
+ gdb_test_no_output "set print null-stop off"
}
proc test_artificial_arrays {} {
global gdb_prompt
global hex
- gdb_test "set print elements 24" ""
- gdb_test "set print address on" ""
+ gdb_test_no_output "set print elements 24"
+ gdb_test_no_output "set print address on"
gdb_test "p arrays" \
" = {array1 = \"abc\", array2 = \"d\", array3 = \"e\", array4 = \"fg\", array5 = \"hij\"}"
gdb_test "p parrays->array5" " = \"hij\""
gdb_test "p &parrays->array5" " = \\(unsigned char \\(\\*\\)\\\[4\\\]\\) $hex"
- gdb_test "set print address off" ""
+ gdb_test_no_output "set print address off"
}
proc test_print_string_constants {} {
global gdb_prompt
- gdb_test "set print elements 50" ""
+ gdb_test_no_output "set print elements 50"
if [target_info exists gdb,cannot_call_functions] {
setup_xfail "*-*-*" 2416
gdb_test "print \$pc" "No registers\\." "print \$pc (with file)"
-gdb_test "set print sevenbit-strings" ""
-gdb_test "set print address off" ""
-gdb_test "set width 0" ""
+gdb_test_no_output "set print sevenbit-strings"
+gdb_test_no_output "set print address off"
+gdb_test_no_output "set width 0"
if [set_lang_c] then {
if { [test_compiler_info "armcc-*"] } {
# Disable the prompt for whether to set pending breakpoints.
# We don't want a breakpoint, we just want to verify the symbol
# isn't found.
-gdb_test "set breakpoint pending off" "" "psymtab pending setup"
+gdb_test_no_output "set breakpoint pending off" "psymtab pending setup"
# This test is looking for a bug that manifested itself when GDB was
# looking for a partial symbol such that there wasn't such a partial
pass $test
}
-gdb_test "set disable-randomization on"
+gdb_test_no_output "set disable-randomization on"
gdb_test "show disable-randomization" \
"Disabling randomization .* is on." \
"show disable-randomization on"
# test expressions with "int" types
#
-gdb_test "set variable x=14" "" "set variable x=14"
-gdb_test "set variable y=2" "" "set variable y=2"
-gdb_test "set variable z=2" "" "set variable z=2"
-gdb_test "set variable w=3" "" "set variable w=3"
+gdb_test_no_output "set variable x=14" "set variable x=14"
+gdb_test_no_output "set variable y=2" "set variable y=2"
+gdb_test_no_output "set variable z=2" "set variable z=2"
+gdb_test_no_output "set variable w=3" "set variable w=3"
gdb_test "print x" " = 14" "print value of x"
# Test associativity of <, >, <=, >=, ==, !=
-gdb_test "set variable x=3" "" "set variable x"
-gdb_test "set variable y=5" "" "set variable y"
-gdb_test "set variable z=2" "" "set variable z"
+gdb_test_no_output "set variable x=3" "set variable x"
+gdb_test_no_output "set variable y=5" "set variable y"
+gdb_test_no_output "set variable z=2" "set variable z"
gdb_test "print x < y < z" "$true" "print value of x<y<z"
gdb_test "print x >= y >= z" "$false" "print value of x>=y>=z"
-gdb_test "set variable x=2" "" "set variable x"
-gdb_test "set variable y=2" "" "set variable y"
-gdb_test "set variable z=1" "" "set variable z"
+gdb_test_no_output "set variable x=2" "set variable x"
+gdb_test_no_output "set variable y=2" "set variable y"
+gdb_test_no_output "set variable z=1" "set variable z"
gdb_test "print x == y == z" "$true" "print value of x==y==z"
-gdb_test "set variable z=0" "" "set variable z"
+gdb_test_no_output "set variable z=0" "set variable z"
gdb_test "print x != y != z" "$false" "print value of x!=y!=z"
# test precedence rules on pairs of relational operators
-gdb_test "set variable x=0" "" "set variable x"
-gdb_test "set variable y=2" "" "set variable y"
-gdb_test "set variable z=2" "" "set variable z"
+gdb_test_no_output "set variable x=0" "set variable x"
+gdb_test_no_output "set variable y=2" "set variable y"
+gdb_test_no_output "set variable z=2" "set variable z"
gdb_test "print x < y == z" "$false" "print value of x<y==z"
# 0 2 2
gdb_test "print x < y != z" "$true" "print value of x<y!=z"
-gdb_test "set variable x=2" "" "set variable x"
-gdb_test "set variable y=3" "" "set variable y"
-gdb_test "set variable z=1" "" "set variable z"
+gdb_test_no_output "set variable x=2" "set variable x"
+gdb_test_no_output "set variable y=3" "set variable y"
+gdb_test_no_output "set variable z=1" "set variable z"
# 2 3 1
# 2 3 1
gdb_test "print x < y >= z" "$true" "print value of x<y>=z"
-gdb_test "set variable z=0" "" " set variable z"
+gdb_test_no_output "set variable z=0" " set variable z"
# 2 3 0
gdb_test "print x < y > z" "$true" "print value of x<y>z"
-gdb_test "set variable x=1" "" " set variable x"
+gdb_test_no_output "set variable x=1" " set variable x"
# 1 3 0
gdb_test "print x > y >= z" "$true" "print value of x>y>=z"
-gdb_test "set variable z=2" "" " set variable z"
+gdb_test_no_output "set variable z=2" " set variable z"
# 1 3 2
gdb_test "print x > y == z" "$false" "print value of x>y==z"
-gdb_test "set variable x=2" "" " set variable x"
-gdb_test "set variable z=0" "" " set variable z"
+gdb_test_no_output "set variable x=2" " set variable x"
+gdb_test_no_output "set variable z=0" " set variable z"
# 2 3 0
gdb_test "print x > y != z" "$false" "print value of x>y!=z"
-gdb_test "set variable x=4" "" "set x to 4"
+gdb_test_no_output "set variable x=4" "set x to 4"
# 4 3 0
gdb_test "print x > y <= z" "$false" "print value of x>y<=z"
# 4 3 0
gdb_test "print x >= y == z" "$false" "print value of x>=y==z"
-gdb_test "set variable x=2" "" " set variable x"
+gdb_test_no_output "set variable x=2" " set variable x"
# 2 3 0
gdb_test "print x >= y != z" "$false" "print value of x>=y!=z"
-gdb_test "set variable x=0" "" " set variable x"
-gdb_test "set variable z=4" "" " set variable z"
+gdb_test_no_output "set variable x=0" " set variable x"
+gdb_test_no_output "set variable z=4" " set variable z"
# 0 3 4
gdb_test "print x >= y <= z" "$true" "print value of x>=y<=z"
# 0 3 4
gdb_test "print x <= y == z" "$false" "print value of x<=y==z"
-gdb_test "set variable x=2" "" " set variable x"
+gdb_test_no_output "set variable x=2" " set variable x"
# 2 3 4
gdb_test "print x <= y != z" "$true" "print value of x<=y!=z"
# test use of parenthesis to enforce different order of evaluation
-gdb_test "set variable z=0" "" " set variable z"
+gdb_test_no_output "set variable z=0" " set variable z"
# 2 3 0
gdb_test "print x >= (y < z)" "$true" "print value of x>=(y<z)"
# 2 3 0
gdb_test "print x == (y == z)" "$false" "print value of x==(y==z)"
-gdb_test "set variable x=1" "" " set variable x"
-gdb_test "set variable z=4" "" " set variable z"
+gdb_test_no_output "set variable x=1" " set variable x"
+gdb_test_no_output "set variable z=4" " set variable z"
# 1 3 4
gdb_test "print (x == y) < z" "$true" "print value of (x==y)<z"
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
-gdb_test "set \$offset = 0x10000" ""
+gdb_test_no_output "set \$offset = 0x10000"
# Load the object file.
gdb_test "add-symbol-file ${binfile} \$offset" \
"Argument required .integer, `fixed' or `limited'.\." \
"set write-packet - NULL"
-gdb_test "set remote memory-write-packet-size 20" ""
+gdb_test_no_output "set remote memory-write-packet-size 20"
gdb_test "show remote memory-write-packet-size" \
"The memory-write-packet-size is 20. Packets are limited to 20 bytes." \
"set write-packet - small"
-gdb_test "set remote memory-write-packet-size 1" ""
+gdb_test_no_output "set remote memory-write-packet-size 1"
gdb_test "show remote memory-write-packet-size" \
"The memory-write-packet-size is 1. Packets are limited to 20 bytes." \
"set write-packet - very-small"
set test "timed download `[file tail $executable]' - $class, $writesize"
if {$writesize != ""} then {
- gdb_test "set remote memory-write-packet-size $writesize" \
- "" "$test - set packet size"
+ gdb_test_no_output "set remote memory-write-packet-size $writesize" \
+ "$test - set packet size"
send_gdb "set remote memory-write-packet-size $class\n"
gdb_expect 5 {
# Read a chunk just larger than the packet size (reduce the packet
# size to make life easier)
-gdb_test "set remote memory-read-packet-size 16" \
- ""
+gdb_test_no_output "set remote memory-read-packet-size 16"
+
gdb_test "show remote memory-read-packet-size" \
"The memory-read-packet-size is 16. Packets are limited to 20 bytes."
gdb_test "x/17ub random_data" \
# Verify that a breakpoint can be set via a convenience variable.
#
-gdb_test "set \$foo=$bp_location11" "" \
+gdb_test_no_output "set \$foo=$bp_location11" \
"set convenience variable \$foo to bp_location11"
gdb_test "break \$foo" \
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
- gdb_test "set debug-file-directory ${test_different_dir}" ".*" "set separate debug location"
+ gdb_test_no_output "set debug-file-directory ${test_different_dir}" \
+ "set separate debug location"
gdb_load ${binfile}
if [target_info exists gdb_stub] {
# Now, switch the language to a specific language, instead of leaving it
# on auto.
-gdb_test "set lang ada" \
- "" \
+gdb_test_no_output "set lang ada" \
"forcing the language to ada"
# Verify that the language is now "ada".
"show lang after switching language to ada"
# Then, switch back to auto...
-gdb_test "set lang auto" \
- "" \
+gdb_test_no_output "set lang auto" \
"switching the language back to auto"
# ... And verify that the language mode is back to auto *and* that
#test annotation_level 1
gdb_test "info line 1" "Line 1 of .* is at address .* but contains no code.*:1:0:beg:0x.*" "annotation_level 1"
#test set annotate 0
-gdb_test "set annotate 0" "" "set annotate 0"
+gdb_test_no_output "set annotate 0" "set annotate 0"
gdb_test "show annotate" "Annotation_level is 0..*" "show annotate (0)"
#test annotation_level 0
gdb_test "info line 1" "Line 1 of .* is at address .* but contains no code.*" "annotation_level 0"
#test set args
-gdb_test "set args foo bar blup baz bubble" "" "set args"
+gdb_test_no_output "set args foo bar blup baz bubble" "set args"
#test show args
gdb_test "show args" "Argument list to give program being debugged when it is started is \"foo bar blup baz bubble\"..*" "show args"
#test show check range on
gdb_test "show check range" "Range checking is \"on\"\..*" "show check range (on)"
#test set check range off with trailing space
-gdb_test "set check range off " "" "set check range off"
+gdb_test_no_output "set check range off " "set check range off"
#test show check range off
gdb_test "show check range" "Range checking is \"off\"\..*" "show check range (off)"
#test set check range auto
-gdb_test "set check range auto" "" "set check range auto"
+gdb_test_no_output "set check range auto" "set check range auto"
#test show check range auto
gdb_test "show check range" "Range checking is \"auto; currently .*" "show check range (auto)"
#test set check type on
#test show check type on
gdb_test "show check type" "Type checking is \"on\"..*" "show check type (on)"
#test set check type off with trailing space
-gdb_test "set check type off " "" "set check type off"
+gdb_test_no_output "set check type off " "set check type off"
#test show check type off
gdb_test "show check type" "Type checking is \"off\"..*" "show check type (off)"
#test set check type auto
-gdb_test "set check type auto" "" "set check type auto"
+gdb_test_no_output "set check type auto" "set check type auto"
#test show check type
gdb_test "show check type" "Type checking is \"auto; currently .*" "show check type (auto)"
#test set complaints 100
-gdb_test "set complaints 100" "" "set complaints 100"
+gdb_test_no_output "set complaints 100" "set complaints 100"
#test show complaints 100
gdb_test "show complaints" "Max number of complaints about incorrect symbols is 100..*" "show complaints (100)"
#test set complaints 0
-gdb_test "set complaints 0" "" "set complaints 0"
+gdb_test_no_output "set complaints 0" "set complaints 0"
#test show complaints 0
gdb_test "show complaints" "Max number of complaints about incorrect symbols is 0..*" "show complaints (0)"
#test set confirm off
-gdb_test "set confirm off" "" "set confirm off"
+gdb_test_no_output "set confirm off" "set confirm off"
#test show confirm off
gdb_test "show confirm" "Whether to confirm potentially dangerous operations is off..*" "show confirm (off)"
#test set confirm on
-gdb_test "set confirm on" "" "set confirm on"
+gdb_test_no_output "set confirm on" "set confirm on"
#test show confirm on
gdb_test "show confirm" "Whether to confirm potentially dangerous operations is on..*" "show confirm (on)"
#test set editing off
-gdb_test "set editing off" "" "set editing off"
+gdb_test_no_output "set editing off" "set editing off"
#test show editing off
gdb_test "show editing" "Editing of command lines as they are typed is off..*" "show editing (off)"
#test set editing on
-#gdb_test "set editing on" "" "set editing on"
+#gdb_test_no_output "set editing on" "set editing on"
#test show editing on
#gdb_test "show editing" "Editing of command lines as they are typed is on..*" "show editing (on)"
#test set environment FOOBARBAZ
-gdb_test "set environment FOOBARBAZ = grbxgrbxgrbx" "" "set environment FOOBARBAZ"
+gdb_test_no_output "set environment FOOBARBAZ = grbxgrbxgrbx" \
+ "set environment FOOBARBAZ"
#test show environment FOOBARBAZ
gdb_test "show environment FOOBARBAZ" "FOOBARBAZ = grbxgrbxgrbx.*" "show environment FOOBARBAZ"
#test set height 100
-gdb_test "set height 100" "" "set height 100"
+gdb_test_no_output "set height 100" "set height 100"
#test show height 100
gdb_test "show height" "Number of lines gdb thinks are in a page is 100..*" "show height"
# back to infinite height to avoid pagers
gdb_test "set height 0" "" ""
#test set history expansion on
-gdb_test "set history expansion on" "" "set history expansion on"
+gdb_test_no_output "set history expansion on" "set history expansion on"
#test show history expansion on
gdb_test "show history expansion on" "History expansion on command input is on.*" "show history expansion"
#test set history filename foobar.baz
-gdb_test "set history filename foobar.baz" "" "set history filename foobar.baz"
+gdb_test_no_output "set history filename foobar.baz" \
+ "set history filename foobar.baz"
#test show history filename foobar.baz
gdb_test "show history filename" "The filename in which to record the command history is \"foobar.baz\"..*" "show history filename (foobar.baz)"
#test set history save on
-gdb_test "set history save on" "" "set history save on"
+gdb_test_no_output "set history save on" "set history save on"
#test show history save on
gdb_test "show history save" "Saving of the history record on exit is on..*" "show history save (on)"
#test set history size 100
-gdb_test "set history size 100" "" "set history size 100"
+gdb_test_no_output "set history size 100" "set history size 100"
#test show history size 100
gdb_test "show history size" "The size of the command history is 100..*" "show history size (100)"
#test set language asm
-gdb_test "set language asm" "" "set language asm"
+gdb_test_no_output "set language asm" "set language asm"
#test show language asm
gdb_test "show language" "The current source language is \"asm\"..*" "show language (asm)"
#test set language java, with a trailing space
-gdb_test "set language java " "" "set language java"
+gdb_test_no_output "set language java " "set language java"
#test show language java
gdb_test "show language" "The current source language is \"java\"..*" "show language (java)"
#test completion for set language.
gdb_test "complete set language min" "set language minimal" \
"complete set language minimal"
#test set language auto
-gdb_test "set language auto" "" "set language auto"
+gdb_test_no_output "set language auto" "set language auto"
#test show language
gdb_test "show language" "The current source language is \"auto.*\"..*" "show language (auto)"
#test set listsize 100
-gdb_test "set listsize 100" "" "set listsize 100"
+gdb_test_no_output "set listsize 100" "set listsize 100"
#test show listsize 100
gdb_test "show listsize" "Number of source lines gdb will list by default is 100..*" "show listsize (100)"
#test show radix 10
gdb_test "show radix" "Input and output radices set to decimal 10, hex a, octal 12..*" "show radix (10)"
#test set width 90
-gdb_test "set width 90" "" "set width 90"
+gdb_test_no_output "set width 90" "set width 90"
#test show width 90
gdb_test "show width" "Number of characters gdb thinks are in a line is 90..*" "show width (90)"
#test set write on
# This is only supported on targets which use exec.o.
-gdb_test "set write on" "" "set write on"
+gdb_test_no_output "set write on" "set write on"
#test show write on
# This is only supported on targets which use exec.o.
gdb_test "show write" "Writing into executable and core files is on..*" "show write (on)"
#test set symbol-reloading on
-gdb_test "set symbol-reloading on" "" "set symbol-reloading on"
+gdb_test_no_output "set symbol-reloading on" "set symbol-reloading on"
#test show symbol-reloading on
gdb_test "show symbol-reloading" "Dynamic symbol table reloading multiple times in one run is on..*" "show symbol-reloading (on)"
#test show user
-gdb_test "show user" "" "show user"
+gdb_test_no_output "show user" "show user"
#test set verbose on
-gdb_test "set verbose on" "" "set verbose on"
+gdb_test_no_output "set verbose on" "set verbose on"
#test show verbose on
gdb_test "show verbose" "Verbose printing of informational messages is on..*" "show verbose (on)"
#test set verbose off
-gdb_test "set verbose off" "" "set verbose off"
+gdb_test_no_output "set verbose off" "set verbose off"
#test show verbose off
gdb_test "show verbose" "Verbosity is off..*" "show verbose (off)"
test_set "set variable v_signed_char=97" "print v_signed_char" ".\[0-9\]* = 97 \'a\'" "set variable signed char=97 ('a')"
test_set "set variable v_signed_char=126" "print v_signed_char" ".\[0-9\]* = 126 \'~\'" "set variable signed char=126 ('~')"
test_set "set variable v_signed_char=127" "print v_signed_char" ".\[0-9\]* = 127 \'.177\'" "set variable signed char=127 (8-bit)"
-gdb_test "set variable v_signed_char=-1" ""
+gdb_test_no_output "set variable v_signed_char=-1"
if {!$gcc_compiled} then { setup_xfail "mips-sgi-irix4*" }
gdb_test "print v_signed_char" ".\[0-9\]* = -1 \'.377\'" \
"set variable signed char=-1 (-1)"
-gdb_test "set variable v_signed_char=0xFF" ""
+gdb_test_no_output "set variable v_signed_char=0xFF"
if {!$gcc_compiled} then { setup_xfail "mips-sgi-irix4*" }
gdb_test "print v_signed_char" ".\[0-9\]* = -1 \'.377\'" \
"set variable signed char=0xFF (0xFF)"
#
# test "set variable" for type "signed short *"
#
-gdb_test "set v_signed_short_pointer=v_signed_short_array" ""
-gdb_test "set variable *(v_signed_short_pointer)=123" ""
-gdb_test "set variable *(v_signed_short_pointer+1)=-456" ""
+gdb_test_no_output "set v_signed_short_pointer=v_signed_short_array"
+gdb_test_no_output "set variable *(v_signed_short_pointer)=123"
+gdb_test_no_output "set variable *(v_signed_short_pointer+1)=-456"
gdb_test "print v_signed_short_array" ".\[0-9\]* =.*\\{123,.*-456\\}" \
"set variable signed short pointer"
gdb_test "print *(v_signed_short_pointer+1)" ".\[0-9\]*.*=.*-456"
#
# test "set variable" for type "unsigned short *"
#
-gdb_test "set v_unsigned_short_pointer=v_unsigned_short_array" ""
-gdb_test "set variable *(v_unsigned_short_pointer)=123" ""
-gdb_test "set variable *(v_unsigned_short_pointer+1)=-456" ""
+gdb_test_no_output "set v_unsigned_short_pointer=v_unsigned_short_array"
+gdb_test_no_output "set variable *(v_unsigned_short_pointer)=123"
+gdb_test_no_output "set variable *(v_unsigned_short_pointer+1)=-456"
gdb_test "print v_unsigned_short_array" ".\[0-9\]* =.*\\{123,.*65080\\}" \
"set variable unsigned short pointer"
gdb_test "print *(v_unsigned_short_pointer+1)" ".\[0-9\]* = 65080"
# Since count is a static variable outside main, runto_main is no
# guarantee that count will be 0 at this point.
- gdb_test "set variable count = 0" ""
+ gdb_test_no_output "set variable count = 0"
# Test an inferior function call that takes a signal that hits a
# breakpoint (with a false condition). When GDB tries to run the
# ...setup an always false conditional breakpoint
gdb_test "break handler if 0" "Breakpoint \[0-9\]+ .*"
- gdb_test "set \$handler_breakpoint_number = \$bpnum" ""
+ gdb_test_no_output "set \$handler_breakpoint_number = \$bpnum"
# ...setup the signal
# then function pointers are descriptors, probe this and remember the
# result.
-gdb_test "set test = code_entry_point" "" "set for function pointer probe"
+gdb_test_no_output "set test = code_entry_point" \
+ "set for function pointer probe"
set test "probe function pointer"
set function_pointer code_entry_point
set signame "SIGSEGV"
global signame
gdb_test continue "Breakpoint.* bowler.*" "${name}; start with the bowler"
# NB: Don't use $tag in the testname - changes across systems.
- gdb_test "set test = $tag" "" "${name}; select the pointer type"
+ gdb_test_no_output "set test = $tag" "${name}; select the pointer type"
gdb_test continue "Program received signal ${signame}.*" \
"${name}; take the ${signame}"
gdb_test backtrace $bt_from_segv "${name}; backtrace from ${signame}"
advancei finish
advancei return
-gdb_test "set done = 1" "" "Set done as return will have skipped it"
+gdb_test_no_output "set done = 1" "Set done as return will have skipped it"
# Check that we can step/next our way into / over a signal handler.
delete_breakpoints
set infinite_loop [gdb_get_line_number {while (!done)}]
-gdb_test "set itimer = itimer_real"
+gdb_test_no_output "set itimer = itimer_real"
gdb_test "break [gdb_get_line_number {done = 0}]"
# Try stepping when there's a signal pending, and a breakpoint at the
}
# Advance to the infinite loop
- gdb_test "advance $infinite_loop" "" "$prefix; advance to infinite loop"
+ gdb_test "advance $infinite_loop" ".*" "$prefix; advance to infinite loop"
# Make the signal pending
sleep 1
# Insert / remove the handler breakpoint.
- gdb_test "break handler" "" "$prefix; break handler"
+ gdb_test "break handler" ".*" "$prefix; break handler"
gdb_test "$i" " handler .*" "$prefix; performing $i"
- gdb_test "clear handler" "" "$prefix; clear handler"
+ gdb_test "clear handler" ".*" "$prefix; clear handler"
}
skip_to_handler step
}
# Advance to the infinite loop
- gdb_test "advance $infinite_loop" "" "$prefix; advance to infinite loop"
+ gdb_test "advance $infinite_loop" ".*" "$prefix; advance to infinite loop"
# Make the signal pending
sleep 1
# Insert / remove the handler breakpoint.
- gdb_test "break *handler" "" "$prefix; break handler"
+ gdb_test "break *handler" ".*" "$prefix; break handler"
gdb_test "$i" " handler .*" "$prefix; performing $i"
- gdb_test "clear *handler" "" "$prefix; clear handler"
+ gdb_test "clear *handler" ".*" "$prefix; clear handler"
}
skip_to_handler_entry step
}
# Advance to the infinite loop
- gdb_test "advance $infinite_loop" "" "$prefix; advance to infinite loop"
+ gdb_test "advance $infinite_loop" ".*" "$prefix; advance to infinite loop"
# Make the signal pending
sleep 1
}
}
- gdb_test "break $infinite_loop" "" "$prefix; break infinite loop"
- gdb_test "break handler" "" "$prefix; break handler"
+ gdb_test "break $infinite_loop" ".*" "$prefix; break infinite loop"
+ gdb_test "break handler" ".*" "$prefix; break handler"
# Continue to the infinite loop
gdb_test "continue" "while ..done.*" "$prefix; continue to infinite loop"
sleep 1
gdb_test "$i" " handler .*" "$prefix; performing $i"
- gdb_test "clear $infinite_loop" "" "$prefix; clear infinite loop"
- gdb_test "clear handler" "" "$prefix; clear handler"
+ gdb_test "clear $infinite_loop" ".*" "$prefix; clear infinite loop"
+ gdb_test "clear handler" ".*" "$prefix; clear handler"
}
breakpoint_to_handler step
}
}
- gdb_test "break $infinite_loop" "" "$prefix; break infinite loop"
- gdb_test "break *handler" "" "$prefix; break handler"
+ gdb_test "break $infinite_loop" ".*" "$prefix; break infinite loop"
+ gdb_test "break *handler" ".*" "$prefix; break handler"
# Continue to the infinite loop
gdb_test "continue" "while ..done.*" "$prefix; continue to infinite loop"
sleep 1
gdb_test "$i" " handler .*" "$prefix; performing $i"
- gdb_test "clear $infinite_loop" "" "$prefix; clear infinite loop"
- gdb_test "clear *handler" "" "$prefix; clear handler"
+ gdb_test "clear $infinite_loop" ".*" "$prefix; clear infinite loop"
+ gdb_test "clear *handler" ".*" "$prefix; clear handler"
}
breakpoint_to_handler_entry step
}
}
- gdb_test "break $infinite_loop" "" "$prefix; break infinite loop"
+ gdb_test "break $infinite_loop" ".*" "$prefix; break infinite loop"
# Continue to the infinite loop
gdb_test "continue" "while ..done.*" "$prefix; continue to infinite loop"
sleep 1
gdb_test "$i" "done = 0.*" "$prefix; performing $i"
- gdb_test "clear $infinite_loop" "" "$prefix; clear infinite loop"
+ gdb_test "clear $infinite_loop" ".*" "$prefix; clear infinite loop"
}
breakpoint_over_handler step
proc check_padding { fmt type val } {
global gdb_prompt
- gdb_test "set padding_${type}.v = ${val}"
+ gdb_test_no_output "set padding_${type}.v = ${val}"
gdb_test "print padding_${type}.p1" "= \"The quick brown \""
gdb_test "print${fmt} padding_${type}.v" "= ${val}"
gdb_test "print padding_${type}.p2" "\"The quick brown \".*"
return
}
-gdb_test "info sharedlibrary" "" "normal list"
+gdb_test "info sharedlibrary" "From * To .*" "normal list"
# GDB checks there for matching L_PREV.
set test "make solibs looping"
return 0
}
-gdb_test "set stop-on-solib-events 1" ""
+gdb_test_no_output "set stop-on-solib-events 1"
gdb_test "continue" "Stopped due to shared library event" "continue to load"
# Break in the library.
gdb_test "br foo" \
- "" \
+ "Breakpoint.*file.*${srcfile_lib}.*" \
"foo in libmd"
gdb_test "continue" \
}
}
-gdb_test "dir ${srcdir}/${subdir}" ""
+gdb_test "dir ${srcdir}/${subdir}" "Source directories searched: .*"
gdb_test "source -s ./source-test.gdb" \
"test source options" \
"source -s"
}
gdb_test "stepi" \
- "" \
+ ".*" \
"step first instruction"
gdb_test "bt" \
"backtrace after first instruction step"
gdb_test "stepi" \
- "" \
+ ".*" \
"step second instruction"
gdb_test "bt" \
"${prefix}; print old l, expecting ${l}"
gdb_test "print r" " = ${r}" \
"${prefix}; print old r, expecting ${r}"
- gdb_test "set variable l = 4" "" \
+ gdb_test_no_output "set variable l = 4" \
"${prefix}; setting l to 4"
gdb_test "print l" " = ${new}" \
"${prefix}; print new l, expecting ${new}"
"${prefix}; print old l, expecting ${l}"
gdb_test "print r" " = ${r}" \
"${prefix}; print old r, expecting ${r}"
- gdb_test "set variable l = 4" "" \
+ gdb_test_no_output "set variable l = 4" \
"${prefix}; set l to 4"
gdb_test "print l" " = ${new}" \
"${prefix}; print new l, expecting ${new}"
"${prefix}; next to add_struct_${t} call"
gdb_test "print u" " = ${old}" \
"${prefix}; print old u, expecting ${old}"
- gdb_test "set variable u = s_${t}" "" \
+ gdb_test_no_output "set variable u = s_${t}" \
"${prefix}; set u to s_${t}"
gdb_test "print u" " = ${new}" \
"${prefix}; print new u, expecting ${new}"
"${prefix}; up"
gdb_test "print u" " = ${old}" \
"${prefix}; print old u, expecting ${old}"
- gdb_test "set variable u = s_${t}" "" \
+ gdb_test_no_output "set variable u = s_${t}" \
"${prefix}; set u to s_${t}"
gdb_test "print u" " = ${new}" \
"${prefix}; print new u, expecting ${new}"
gdb_test "next" "(return u;|\})" "next field ${t}"
gdb_test "print u" " = {i = 1, j = 1, k = 1}" "old field ${t}"
- gdb_test "set variable u = F_${t}"
+ gdb_test_no_output "set variable u = F_${t}"
gdb_test "print u" " = {i = 0, j = 0, k = 0}" "new field ${t}"
- gdb_test "set variable u = F_${t}, u.i = f_${t}.i"
+ gdb_test_no_output "set variable u = F_${t}, u.i = f_${t}.i"
gdb_test "print u" " = {i = 1, j = 0, k = 0}" "f_${t}.i"
- gdb_test "set variable u = F_${t}, u.j = f_${t}.j"
+ gdb_test_no_output "set variable u = F_${t}, u.j = f_${t}.j"
gdb_test "print u" " = {i = 0, j = 1, k = 0}" "f_${t}.j"
- gdb_test "set variable u = F_${t}, u.k = f_${t}.k"
+ gdb_test_no_output "set variable u = F_${t}, u.k = f_${t}.k"
gdb_test "print u" " = {i = 0, j = 0, k = 1}" "f_${t}.k"
- gdb_test "set variable u = f_${t}, u.i = F_${t}.i"
+ gdb_test_no_output "set variable u = f_${t}, u.i = F_${t}.i"
gdb_test "print u" " = {i = 0, j = 1, k = 1}" "F_${t}.i"
- gdb_test "set variable u = f_${t}, u.j = F_${t}.j"
+ gdb_test_no_output "set variable u = f_${t}, u.j = F_${t}.j"
gdb_test "print u" " = {i = 1, j = 0, k = 1}" "F_${t}.j"
- gdb_test "set variable u = f_${t}, u.k = F_${t}.k"
+ gdb_test_no_output "set variable u = f_${t}, u.k = F_${t}.k"
gdb_test "print u" " = {i = 1, j = 1, k = 0}" "F_${t}.k"
}
gdb_load ${binfile}
# Make certain that the output is consistent
- gdb_test "set print sevenbit-strings" "" \
- "set print sevenbit-strings; ${testfile}"
- gdb_test "set print address off" "" \
- "set print address off; ${testfile}"
- gdb_test "set width 0" "" \
- "set width 0; ${testfile}"
- gdb_test "set print elements 300" "" \
- "set print elements 300; ${testfile}"
+ gdb_test_no_output "set print sevenbit-strings"
+ gdb_test_no_output "set print address off"
+ gdb_test_no_output "set width 0"
+ gdb_test_no_output "set print elements 300"
# Advance to main
if { ![runto_main] } then {
# stores its parameter in the global variable "L$N". GDB then
# examining that global to confirm that the value is as expected.
- gdb_test "call Fun${n}(foo${n})" "" "call Fun<n>(foo<n>); ${tests}"
+ gdb_test_no_output "call Fun${n}(foo${n})" "call Fun<n>(foo<n>); ${tests}"
setup_compiler_kfails structs-tc-tll gcc-3-3-* "DWARF 2" i*86-*-* gdb/1455
setup_compiler_kfails structs-tc-td gcc-3-3-* "DWARF 2" i*86-*-* gdb/1455
gdb_test "p/c L${n}" [foo ${n}] "p/c L<n>; ${tests}"
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
-gdb_test "set width 0" ""
+gdb_test_no_output "set width 0"
if { ![runto_main] } then {
gdb_suppress_tests
# Do a bunch of testing of the set/unset/show substitute-path
# commands that do not require the presence of an executable.
-gdb_test "set confirm off" \
- "" \
+gdb_test_no_output "set confirm off" \
"deactivate GDB's confirmation interface"
gdb_test "show substitute-path" \
"No substitution rule defined for `from'" \
"unset substitute-path from, no rule entered yet"
-gdb_test "unset substitute-path" \
- "" \
+gdb_test_no_output "unset substitute-path" \
"unset substitute-path, no rule entered yet"
gdb_test "unset substitute-path from" \
"First argument must be at least one character long" \
"set substitute-path, first argument is empty string"
-gdb_test "set substitute-path from to" \
- "" \
+gdb_test_no_output "set substitute-path from to" \
"add from -> to substitution rule"
-gdb_test "set substitute-path from1 to1/" \
- "" \
+gdb_test_no_output "set substitute-path from1 to1/" \
"add from1 -> to1 substitution rule"
-gdb_test "set substitute-path source destination" \
- "" \
+gdb_test_no_output "set substitute-path source destination" \
"add source -> destination substitution rule"
-gdb_test "set substitute-path depuis/ vers" \
- "" \
+gdb_test_no_output "set substitute-path depuis/ vers" \
"add depuis -> vers substitution rule"
-gdb_test "set substitute-path empty ''" \
- "" \
+gdb_test_no_output "set substitute-path empty ''" \
"add substitution rule to empty string"
gdb_test "show substitute-path" \
"Source path substitution rule matching `garbage':" \
"show substitute-path garbage, after all paths added"
-gdb_test "unset substitute-path from" \
- "" \
+gdb_test_no_output "unset substitute-path from" \
"unset substitute-path from"
gdb_test "show substitute-path from" \
"No substitution rule defined for `from'" \
"unset substitute-path from after the rule was removed"
-gdb_test "unset substitute-path depuis" \
- "" \
+gdb_test_no_output "unset substitute-path depuis" \
"unset substitute-path depuis (middle of list)"
gdb_test "show substitute-path" \
"List of all source path substitution rules:\r\n +`from1' -> `to1'.\r\n +`source' -> `destination'.\r\n\ +`empty' -> `'." \
"show substitute-path after depuis rule removed"
-gdb_test "unset substitute-path empty" \
- "" \
+gdb_test_no_output "unset substitute-path empty" \
"unset substitute-path empty (end of list)"
gdb_test "show substitute-path" \
"List of all source path substitution rules:\r\n +`from1' -> `to1'.\r\n +`source' -> `destination'." \
"show substitute-path after empty rule removed"
-gdb_test "unset substitute-path" \
- "" \
+gdb_test_no_output "unset substitute-path" \
"remove all remaining substitution rules"
gdb_test "show substitute-path" \
}
clean_restart ${binlibfile}
-gdb_test "add-symbol-file ${objdir}/${subdir}/${binmainfile} 0" "" "add-symbol-file" \
- "add symbol table from file \".*\" at.*\\(y or n\\) " "y"
+gdb_test "add-symbol-file ${objdir}/${subdir}/${binmainfile} 0" \
+ "Reading symbols from .*" \
+ "add-symbol-file" \
+ "add symbol table from file \".*\" at.*\\(y or n\\) " "y"
gdb_test "list main"
gdb_test "print symbol_without_target_section"
return -1
}
-gdb_test "set print sevenbit-strings" "" "test set print sevenbit-strings"
-gdb_test "set print address off" "" "test set print address off"
-gdb_test "set width 0" "" "test set width 0"
+gdb_test_no_output "set print sevenbit-strings"
+gdb_test_no_output "set print address off"
+gdb_test_no_output "set width 0"
+
gdb_test "info terminal" "No saved terminal information.*" "test info terminal"
gdb_run_cmd 5
gdb_expect {
}
# Turn on command tracing.
-gdb_test "set trace-commands" "" "set trace-commands"
+gdb_test_no_output "set trace-commands" "set trace-commands"
# Make sure show trace-commands now gives 'on'.
gdb_test "show trace-commands" \
"continue to breakpoint at stop_here"
# Turn on unwindonsignal.
-gdb_test "set unwindonsignal on" \
- "" \
+gdb_test_no_output "set unwindonsignal on" \
"setting unwindonsignal"
+
gdb_test "show unwindonsignal" \
"Unwinding of stack .* is on." \
"showing unwindonsignal"
gdb_test "" "" "eat first prompt"
# Initialization from default_gdb_start.
-gdb_test "set height 0"
-gdb_test "set width 0"
+gdb_test_no_output "set height 0"
+gdb_test_no_output "set width 0"
gdb_test "bt" "in main \\(.*\\) at .*${srcfile}:$double_free"
# even though the overload resolution mechanism says that the types
# don't match.
# - guo
- gdb_test "set overload-resolution 0" ""
+ gdb_test_no_output "set overload-resolution 0"
}
gdb_test "print find_max1(5,1,2,3,4,5)" \
"Old value = 0.*New value = 1.*" \
"watchpoint on global2 variable triggers"
-gdb_test "condition 2 *foo > 10" \
- "" \
+gdb_test_no_output "condition 2 *foo > 10" \
"condition of watchpoint 2 changes"
gdb_test "continue" \
gdb_test "watch shared_var thread 0" "Unknown thread 0\." "Watchpoint on invalid thread"
gdb_test "watch shared_var thread" "A syntax error in expression, near `thread'\." "Invalid watch syntax"
-gdb_test "Next 5" ""
+gdb_test "Next 5" ".*"
gdb_test "break thread_function" "Breakpoint \[0-9\].*" \
"Set breakpoint at thread_function"
set thread_num "$expect_out(1,string)"
-gdb_test "disable 2" "" "Disable breakpoint 2"
+gdb_test_no_output "disable 2" "Disable breakpoint 2"
gdb_test "watch shared_var thread $thread_num" "atchpoint 3: shared_var" "Watchpoint on shared variable"
gdb_test "info breakpoint 3" "stop only in thread $thread_num"
clean_restart ${testfile}
# Problem does not occur otherwise.
-gdb_test "set can-use-hw-watchpoints 0"
+gdb_test_no_output "set can-use-hw-watchpoints 0"
if ![runto_main] {
return -1
gdb_continue_to_breakpoint "Place to set the watchpoint"
# The condition `c == 30' is the subject being tested.
-gdb_test "watch c if c == 30" "" "Place the watchpoint"
+gdb_test "watch c if c == 30" "atchpoint \[0-9\]*.*" "Place the watchpoint"
# We may stay either in the function itself or only at the first instruction of
# its caller depending on the epilogue unwinder (or valid epilogue CFI) presence.
gdb_test "break func1" "Breakpoint.*at.*"
- gdb_test "set \$func1_breakpoint_number = \$bpnum" ""
+ gdb_test_no_output "set \$func1_breakpoint_number = \$bpnum"
gdb_test "continue" "Continuing.*Breakpoint \[0-9\]*, func1.*" \
"continue to breakpoint at func1"
-re "Continuing.*Breakpoint.*func1.*$gdb_prompt $" {
setup_xfail "m68*-*-*" 2597
fail "thought it hit breakpoint at func1 twice"
- gdb_test "delete \$func1_breakpoint_number" ""
+ gdb_test_no_output "delete \$func1_breakpoint_number"
gdb_test "continue" "\
Continuing.*\[Ww\]atchpoint.*ival3.*Old value = -1.*New value = 0.*ival3 = count;" \
"watchpoint hit, first time"
# Check that the hit count is reported correctly
gdb_test "info break" ".*watchpoint\[ \t\]+keep\[ \t\]+y\[ \t\]+ival3\r\n\[ \t]+breakpoint already hit 1 time.*" "Watchpoint hit count is 1"
- gdb_test "delete \$func1_breakpoint_number" ""
+ gdb_test_no_output "delete \$func1_breakpoint_number"
# Continue until the next change, from 0 to 1.
gdb_test "cont" "Continuing.*\[Ww\]atchpoint.*ival3.*Old value = 0.*New value = 1.*ival3 = count; ival4 = count;.*" "watchpoint hit, second time"
gdb_test "watch buf\[4\]" ".*\[Ww\]atchpoint \[0-9\]*: buf\\\[4\\\]"
gdb_test "break marker4" ".*Breakpoint.*"
- gdb_test "set doread = 1" ""
+ gdb_test_no_output "set doread = 1"
# If we send_gdb "123\n" before gdb has switched the tty, then it goes
# to gdb, not the inferior, and we lose. So that is why we have
"continue to marker4"
# Disable everything so we can finish the program at full speed
- gdb_test "disable" "" "disable in test_watchpoint_triggered_in_syscall"
+ gdb_test_no_output "disable" "disable in test_watchpoint_triggered_in_syscall"
if [target_info exists gdb,noresults] { return }
# In particular, test that a watch of stack-based things
# is deleted when the stack-based things go out of scope.
#
- gdb_test "disable" "" "disable in test_complex_watchpoint"
+ gdb_test_no_output "disable" "disable in test_complex_watchpoint"
gdb_test "break marker6" ".*Breakpoint.*"
gdb_test "cont" "Continuing.*Breakpoint.*marker6 \\(\\).*" \
"continue to marker6"
"self-delete local watch in recursive call"
# Disable everything so we can finish the program at full speed
- gdb_test "disable" "" "disable in test_complex_watchpoint"
+ gdb_test_no_output "disable" "disable in test_complex_watchpoint"
if [target_info exists gdb,noresults] { return }
# test expressions with "int" types
#
-gdb_test "set variable x=14" "" "set variable x=14"
-gdb_test "set variable y=2" "" "set variable y=2"
-gdb_test "set variable z=2" "" "set variable z=2"
-gdb_test "set variable w=3" "" "set variable w=3"
+gdb_test_no_output "set variable x=14" "set variable x=14"
+gdb_test_no_output "set variable y=2" "set variable y=2"
+gdb_test_no_output "set variable z=2" "set variable z=2"
+gdb_test_no_output "set variable w=3" "set variable w=3"
gdb_test "print x" " = 14" "print value of x"
gdb_test "print y" " = 2" "print value of y"