From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5755 invoked by alias); 12 Mar 2007 21:02:21 -0000 Received: (qmail 5744 invoked by uid 22791); 12 Mar 2007 21:02:19 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO brahms.sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 12 Mar 2007 21:02:13 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.14.0/8.14.0) with ESMTP id l2CL28u7024482; Mon, 12 Mar 2007 22:02:09 +0100 (CET) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.14.0/8.14.0/Submit) id l2CL284g022996; Mon, 12 Mar 2007 22:02:08 +0100 (CET) Date: Mon, 12 Mar 2007 21:02:00 -0000 Message-Id: <200703122102.l2CL284g022996@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: drow@false.org CC: gdb-patches@sourceware.org In-reply-to: <20070312121843.GA24487@caradoc.them.org> (message from Daniel Jacobowitz on Mon, 12 Mar 2007 08:18:43 -0400) Subject: Re: Improve end check on rs6000 prologue analyzer References: <20060929213726.GA1770@nevyn.them.org> <200609301932.k8UJW0kw030997@elgar.sibelius.xs4all.nl> <20061017212114.GC12643@nevyn.them.org> <200610181958.k9IJw88G009044@elgar.sibelius.xs4all.nl> <20070309150504.GA5166@caradoc.them.org> <200703111913.l2BJDEhC006601@brahms.sibelius.xs4all.nl> <20070312121843.GA24487@caradoc.them.org> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-03/txt/msg00127.txt.bz2 > Date: Mon, 12 Mar 2007 08:18:43 -0400 > From: Daniel Jacobowitz > > On Sun, Mar 11, 2007 at 08:13:14PM +0100, Mark Kettenis wrote: > > Here's a diff of gdb.sum without and with your diff (testsuite with > > your diff). The gdb.base/attach.exp failure is "normal"; the result > > of that test flips between PASS and FAIL. As you can see, there are > > still "odd location failures". Here is an excerpt from gdb.log for one: > > > > (gdb) list > > 134 char *ttyarg = NULL; > > (gdb) step > > 120 { > > (gdb) PASS: gdb.gdb/selftest.exp: step over ttyarg initialization > > list > > 120 { > > (gdb) FAIL: gdb.gdb/selftest.exp: step over ttyarg initialization ended up at odd location > > step > > 133 char *cdarg = NULL; > > (gdb) PASS: gdb.gdb/selftest.exp: step over ttyarg initialization > > > > This looks as pretty acceptable behaviour. The initializations have > > been moved into the prologue so while stepping over the > > initializations, we hop back and forth. I'm willing to accept this as > > a testsuite problem ;-). > > Me too. But one thing is really puzzling! We're testing the result > of "list" here. The huge gdb_expect includes these two: > > -re "\[0-9\]*\t\{\r\n$gdb_prompt $" { > set description "step over initial brace" > set command "step" > } > > -re "\[ \t\]+\{\r\n$gdb_prompt $" { > setup_xfail "mips-*-irix5*" > fail "$description ended up at odd location" > } > > I would the first one to match. It does plenty of times in my > selftest.exp run. The only way I can imagine for that second pattern > to match would be for {, but there shouldn't be a space there, > just a tab - it comes from print_source_lines_base. Any idea what > happened? Ah, I think I've seen this before. On OpenBSD the tty subsystem does tab expansion, wheras on Linux this doesn't happen by default. So we must match spaces as well as tabs here. I think that means the second pattern is really redundant. How about the attached patch? Index: ChangeLog from Mark Kettenis * gdb.gdb/selftest.exp (do_steps_and_nexts): Match spaces as well as tabs. Remove redundant test pattern. Index: gdb.gdb/selftest.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.gdb/selftest.exp,v retrieving revision 1.11 diff -u -p -r1.11 selftest.exp --- gdb.gdb/selftest.exp 31 Jan 2007 19:32:12 -0000 1.11 +++ gdb.gdb/selftest.exp 12 Mar 2007 21:00:28 -0000 @@ -159,7 +159,7 @@ proc do_steps_and_nexts {} { set description "next over textdomain PACKAGE" set command "next" } - -re "\[0-9\]*\t\{\r\n$gdb_prompt $" { + -re "\[0-9\]+\[\t \]+\{\r\n$gdb_prompt $" { set description "step over initial brace" set command "step" } @@ -197,10 +197,6 @@ proc do_steps_and_nexts {} { set description "step over gdb_stderr initialization" set command "step" } - -re "\[ \t\]+\{\r\n$gdb_prompt $" { - setup_xfail "mips-*-irix5*" - fail "$description ended up at odd location" - } -re ".*main.c.*No such file or directory.*$gdb_prompt $" { setup_xfail "rs6000-*-aix3*" fail "must be able to list source lines"