diff options
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/maint.exp | 45 |
2 files changed, 24 insertions, 26 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index a3114d3..7c3fd4c 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-03-15 Tom de Vries <tdevries@suse.de> + + * gdb.base/maint.exp: Use exp_continue in long lines for "maint print + objfiles". + 2020-03-14 Tom Tromey <tom@tromey.com> * gdb.base/cvexpr.exp: Add test for _Atomic and restrict. diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp index f6eeb98..3431f2c 100644 --- a/gdb/testsuite/gdb.base/maint.exp +++ b/gdb/testsuite/gdb.base/maint.exp @@ -215,7 +215,7 @@ gdb_expect { # There aren't any ... gdb_test_no_output "maint print dummy-frames" -send_gdb "maint print objfiles\n" + # To avoid timeouts, we avoid expects with many .* patterns that match # many lines. Instead, we keep track of which milestones we've seen @@ -224,31 +224,24 @@ send_gdb "maint print objfiles\n" set header 0 set psymtabs 0 set symtabs 0 -set keep_looking 1 - -while {$keep_looking} { - gdb_expect { - - -re "\r\n" { - set output $expect_out(buffer) - if {[regexp ".*Object file.*maint($EXEEXT)?: Objfile at ${hex}" $output]} { - set header 1 - } - if {[regexp ".*Psymtabs:\[\r\t \]+\n" $output]} { - set psymtabs 1 - } - if {[regexp ".*Symtabs:\[\r\t \]+\n" $output]} { - set symtabs 1 - } - } - - -re ".*$gdb_prompt $" { - set keep_looking 0 - } - timeout { - fail "(timeout) maint print objfiles" - set keep_looking 0 - } +gdb_test_multiple "maint print objfiles" "" -lbl { + -re "\r\nObject file.*maint($EXEEXT)?: Objfile at ${hex}" { + set header 1 + exp_continue + } + -re "\r\nPsymtabs:\[\r\t \]+" { + set psymtabs 1 + exp_continue + } + -re "\r\nSymtabs:\[\r\t \]+\n" { + set symtabs 1 + exp_continue + } + -re " at $hex," { + exp_continue + } + -re -wrap "" { + pass $gdb_test_name } } |