# to use it. This allows the test program to run at full speed until
# we get to the first marker function.
- if [gdb_test "disable 3" "disable 3\[\r\n\]+" "disable watchpoint" ] {
+ if [gdb_test_no_output "disable 3" "disable watchpoint" ] {
return 0
}
# Ensure that the watchpoint is disabled when we startup.
- if [gdb_test "disable 3" "^disable 3\[\r\n\]+" "disable watchpoint in test_simple_watchpoint" ] {
+ if [gdb_test_no_output "disable 3" \
+ "disable watchpoint in test_simple_watchpoint" ] {
return 0
}
# After reaching the marker function, enable the watchpoint.
- if [gdb_test "enable 3" "^enable 3\[\r\n\]+" "enable watchpoint" ] {
+ if [gdb_test_no_output "enable 3" "enable watchpoint" ] {
return
}
# Disable the watchpoint so we run at full speed until we exit.
- if [gdb_test "disable 3" "^disable 3\[\r\n\]+" "watchpoint disabled" ] {
+ if [gdb_test_no_output "disable 3" "watchpoint disabled" ] {
return
}
# Ensure that the watchpoint is disabled when we startup.
- if [gdb_test "disable 3" "^disable 3\[\r\n\]+" "disable watchpoint in test_disabling_watchpoints" ] {
+ if [gdb_test_no_output "disable 3" \
+ "disable watchpoint in test_disabling_watchpoints" ] {
return 0
}
# After reaching the marker function, enable the watchpoint.
- if [gdb_test "enable 3" "^enable 3\[\r\n\]+" "watchpoint enabled" ] {
+ if [gdb_test_no_output "enable 3" "watchpoint enabled" ] {
return
}
# Disable the watchpoint but leave breakpoints
- if [gdb_test "disable 3" "^disable 3\[\r\n\]+" "disable watchpoint #2 in test_disabling_watchpoints" ] {
+ if [gdb_test_no_output "disable 3" \
+ "disable watchpoint #2 in test_disabling_watchpoints" ] {
return 0
}
#
# See gdb_test for a description of the -prompt, -no-prompt-anchor, -nopass,
# COMMAND, and MESSAGE parameters.
+#
+# Returns:
+# 1 if the test failed,
+# 0 if the test passes,
+# -1 if there was an internal error.
proc gdb_test_no_output { args } {
global gdb_prompt
set prompt [fill_in_default_prompt $prompt [expr !${no-prompt-anchor}]]
set command_regex [string_to_regexp $command]
- gdb_test_multiple $command $message -prompt $prompt {
+ return [gdb_test_multiple $command $message -prompt $prompt {
-re "^$command_regex\r\n$prompt" {
if {!$nopass} {
pass $gdb_test_name
}
}
- }
+ }]
}
# Send a command and then wait for a sequence of outputs.