From 347dc97d2d4b80f3d8c23570fbedf7c6fa5e7c5c Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Mon, 10 Dec 2001 20:30:00 +0000 Subject: [PATCH] * gdb.asm/asm-source.exp (info symbol): Anchor the pattern matching the entry point symbol's name at the beginning of the line. --- gdb/testsuite/ChangeLog | 6 ++++++ gdb/testsuite/gdb.asm/asm-source.exp | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index d8bbcdcf860..6b1e36747fb 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2001-12-10 Jim Blandy + + * gdb.asm/asm-source.exp (info symbol): Anchor the pattern + matching the entry point symbol's name at the beginning of the + line. + 2001-12-07 Daniel Jacobowitz * gdb.c++/classes.exp, gdb.c++/derivation.exp, diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp index 2af398f91f9..a864686db31 100644 --- a/gdb/testsuite/gdb.asm/asm-source.exp +++ b/gdb/testsuite/gdb.asm/asm-source.exp @@ -122,7 +122,10 @@ gdb_expect { -re "info symbol 0x$entry_point\[\r\n\]*" { exp_continue } - -re "(.*) in section .*$gdb_prompt $" { + -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. set entry_symbol $expect_out(1,string) pass "info symbol" } -- 2.30.2