diff options
Diffstat (limited to 'gdb/testsuite/lib/gdb.exp')
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 10d7a75..a86d74d 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -1022,6 +1022,10 @@ proc command_to_message { command } { # if one of them matches. If MESSAGE is empty COMMAND will be used. # -prompt PROMPT_REGEXP specifies a regexp matching the expected prompt # after the command output. If empty, defaults to "$gdb_prompt $". +# -no-prompt-anchor specifies that if the default prompt regexp is used, it +# should not be anchored at the end of the buffer. This means that the +# pattern can match even if there is stuff output after the prompt. Does not +# have any effect if -prompt is specified. # -lbl specifies that line-by-line matching will be used. # EXPECT_ARGUMENTS will be fed to expect in addition to the standard # patterns. Pattern elements will be evaluated in the caller's @@ -1121,6 +1125,7 @@ proc gdb_test_multiple { command message args } { set line_by_line 0 set prompt_regexp "" + set prompt_anchor 1 for {set i 0} {$i < [llength $args]} {incr i} { set arg [lindex $args $i] if { $arg == "-prompt" } { @@ -1128,6 +1133,8 @@ proc gdb_test_multiple { command message args } { set prompt_regexp [lindex $args $i] } elseif { $arg == "-lbl" } { set line_by_line 1 + } elseif { $arg == "-no-prompt-anchor" } { + set prompt_anchor 0 } else { set user_code $arg break @@ -1139,7 +1146,7 @@ proc gdb_test_multiple { command message args } { error "Too few arguments to gdb_test_multiple" } - set prompt_regexp [fill_in_default_prompt $prompt_regexp true] + set prompt_regexp [fill_in_default_prompt $prompt_regexp $prompt_anchor] if { $message == "" } { set message [command_to_message $command] |