This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix ending-run.exp bug with addresses containing "33"


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]