From ecace851a68236cf9c355e58ff21deb0a227c5a0 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Fri, 18 Jan 2002 00:13:00 +0000 Subject: * gdb.asm/asm-source.exp (info symbol): Take another shot at anchoring the pattern matching the entry point symbol's name. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.asm/asm-source.exp | 19 ++++++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) (limited to 'gdb') diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 642a56c..f5eec60 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2002-01-17 Jim Blandy + + * gdb.asm/asm-source.exp (info symbol): Take another shot at + anchoring the pattern matching the entry point symbol's name. + 2002-01-17 Andrew Cagney * gdb.base/maint.exp: Update ``maint internal-error'' to match diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp index b240969..fbcfa7c 100644 --- a/gdb/testsuite/gdb.asm/asm-source.exp +++ b/gdb/testsuite/gdb.asm/asm-source.exp @@ -133,13 +133,18 @@ gdb_expect { set entry_symbol "" send_gdb "info symbol 0x$entry_point\n" gdb_expect { - -re "info symbol 0x$entry_point\[\r\n\]*" { - exp_continue - } - -re "^(.*) in section .*$gdb_prompt $" { - # It's important to anchor the pattern above at the beginning - # of the line. Without that carat, the (.*) may end up - # matching the empty string. + -re "info symbol 0x$entry_point\[\r\n\]+(\[^\r\n\]*) in section .*$gdb_prompt $" { + # We match the echoed `info symbol' command here, to help us + # reliably identify the beginning of the start symbol in the + # command's output. You might think we could just use '^' to + # start matching at the beginning of the line, but + # unfortunately, in Expect, '^' matches the beginning of the + # input that hasn't been matched by any expect clause yet. If + # every expect clause consumes a complete line, along with its + # terminating CR/LF, this is equivalent to the beginning of a + # line. But expect clauses that end with `.*' will consume as + # much as happened to arrive from the TTY --- exactly where + # they leave you depends on inter-process timing. :( set entry_symbol $expect_out(1,string) pass "info symbol" } -- cgit v1.1