summaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorJim Blandy <jimb@codesourcery.com>2002-01-18 00:13:00 +0000
committerJim Blandy <jimb@codesourcery.com>2002-01-18 00:13:00 +0000
commit4cb90d1cd6084371cb1cbc7bff79ada4afd52eea (patch)
treea141244cd22f5f69bf1c10964ed48859f6a7c942 /gdb/testsuite
parentf81cc9f6807182ac1ec30dca6fa8af8693a7f934 (diff)
downloadgdb-4cb90d1cd6084371cb1cbc7bff79ada4afd52eea.tar.gz
* gdb.asm/asm-source.exp (info symbol): Take another shot at
anchoring the pattern matching the entry point symbol's name.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.asm/asm-source.exp19
2 files changed, 17 insertions, 7 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 642a56c08ae..f5eec6062a0 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2002-01-17 Jim Blandy <jimb@redhat.com>
+
+ * 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 <ac131313@redhat.com>
* 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 b240969ceed..fbcfa7cff50 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"
}