Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Joseph S. Myers" <joseph@codesourcery.com>
To: gdb-patches@sourceware.org
Subject: Fix ending-run.exp bug with addresses containing "33"
Date: Thu, 03 Sep 2009 21:50:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.64.0909032148590.23163@digraph.polyomino.org.uk> (raw)

I saw a failure on gdb.base/ending-run.exp of the form:

33      }
(gdb) next
__libc_start_main (main=0x804862d <main>, argc=1, ubp_av=0xbf9ca144,
init=0x80486c0 <__libc_csu_init>, fini=0x80486b0 <__libc_csu_fini>,
rtld_fini=0xb7f0a330 <_dl_fini>, stack_end=0xbf9ca13c) at
libc-start.c:252
252       exit (result);
(gdb) FAIL: gdb.base/ending-run.exp: step out of main

The problem here is the "33" in the address of _dl_fini matching a
regular expression intended to match a line number, and so resulting
in the error for seeing the closing brace twice; this patch restricts
that regular expression to avoid this bogus match.  OK to commit?

2009-09-03  Joseph Myers  <joseph@codesourcery.com>

	* gdb.base/ending-run.exp: Restrict regular expression matching
	line number to require closing brace following.

Index: gdb.base/ending-run.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/ending-run.exp,v
retrieving revision 1.36
diff -u -r1.36 ending-run.exp
--- gdb.base/ending-run.exp	5 Jul 2009 22:38:19 -0000	1.36
+++ gdb.base/ending-run.exp	3 Sep 2009 21:45:51 -0000
@@ -120,7 +120,7 @@
 send_gdb "next\n"
 set nexted 0
 gdb_expect {
-    -re "33.*$gdb_prompt $" {
+    -re "33\[ \t\]+\}.*$gdb_prompt $" {
 	# sometimes we stop at the closing brace, if so, do another next
 	if { $nexted } {
 	    fail "step out of main"

-- 
Joseph S. Myers
joseph@codesourcery.com


             reply	other threads:[~2009-09-03 21:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-03 21:50 Joseph S. Myers [this message]
2009-09-03 21:58 ` Pedro Alves
2009-09-03 22:01 ` Joel Brobecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0909032148590.23163@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox