aboutsummaryrefslogtreecommitdiff
path: root/gdb
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
commitecace851a68236cf9c355e58ff21deb0a227c5a0 (patch)
tree74415bd486274269a806631e774372d921da17ca /gdb
parent590a5fb55e510b29752aa238a1c13d61725f8eae (diff)
downloadgdb-ecace851a68236cf9c355e58ff21deb0a227c5a0.zip
gdb-ecace851a68236cf9c355e58ff21deb0a227c5a0.tar.gz
gdb-ecace851a68236cf9c355e58ff21deb0a227c5a0.tar.bz2
* 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')
-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 642a56c..f5eec60 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 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"
}