From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18055 invoked by alias); 10 Apr 2007 21:10:44 -0000 Received: (qmail 17942 invoked by uid 22791); 10 Apr 2007 21:10:41 -0000 X-Spam-Check-By: sourceware.org Received: from return.false.org (HELO return.false.org) (66.207.162.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 10 Apr 2007 22:10:37 +0100 Received: from return.false.org (localhost [127.0.0.1]) by return.false.org (Postfix) with ESMTP id 1A7644B267; Tue, 10 Apr 2007 16:10:36 -0500 (CDT) Received: from caradoc.them.org (dsl093-172-095.pit1.dsl.speakeasy.net [66.93.172.95]) by return.false.org (Postfix) with ESMTP id E8C684B262; Tue, 10 Apr 2007 16:10:35 -0500 (CDT) Received: from drow by caradoc.them.org with local (Exim 4.63) (envelope-from ) id 1HbNbm-0001U5-TP; Tue, 10 Apr 2007 17:10:34 -0400 Date: Tue, 10 Apr 2007 21:10:00 -0000 From: Daniel Jacobowitz To: Eli Zaretskii Cc: Mark Kettenis , gdb-patches@sourceware.org Subject: Re: Improve end check on rs6000 prologue analyzer Message-ID: <20070410211034.GE2056@caradoc.them.org> Mail-Followup-To: Eli Zaretskii , Mark Kettenis , gdb-patches@sourceware.org References: <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> <200703122102.l2CL284g022996@brahms.sibelius.xs4all.nl> <20070312210856.GA21953@caradoc.them.org> <200703122305.l2CN5AWw022470@brahms.sibelius.xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes 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-04/txt/msg00112.txt.bz2 On Tue, Mar 13, 2007 at 06:24:17AM +0200, Eli Zaretskii wrote: > > Date: Tue, 13 Mar 2007 00:05:10 +0100 (CET) > > From: Mark Kettenis > > CC: gdb-patches@sourceware.org > > > > > Yeesh! I didn't know that. Is there somewhere we could write it down > > > for test writers who make this same mistake, maybe? I would have > > > merrily written tests that expected the tab :-( > > > > Hmm, I'm not sure we have any documentation on this. Eli, do you know > > a good location to put this info. > > There's a section in gdbint.texinfo about the test suite, which seems > a suitable place. Yes indeed. Is this OK? -- Daniel Jacobowitz CodeSourcery 2007-04-10 Daniel Jacobowitz * gdbint.texinfo (Writing Tests): Mention gdb_test_multiple and tab expansion. Index: gdbint.texinfo =================================================================== RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v retrieving revision 1.258 diff -u -p -r1.258 gdbint.texinfo --- gdbint.texinfo 10 Apr 2007 11:58:15 -0000 1.258 +++ gdbint.texinfo 10 Apr 2007 21:09:34 -0000 @@ -7144,7 +7144,14 @@ instance, @file{gdb.base/exprs.exp} defi calls @code{gdb_test} multiple times. Only use @code{send_gdb} and @code{gdb_expect} when absolutely -necessary, such as when @value{GDBN} has several valid responses to a command. +necessary. Even if @value{GDBN} has several valid responses to +a command, you can use @code{gdb_test_multiple}. Like @code{gdb_test}, +@code{gdb_test_multiple} recognizes internal errors and unexpected +prompts. + +Do not write tests which expect a literal tab character from @value{GDBN}. +On some operating systems (e.g.@: OpenBSD) the TTY layer expands tabs to +spaces, so by the time @value{GDBN}'s output reaches expect the tab is gone. The source language programs do @emph{not} need to be in a consistent style. Since @value{GDBN} is used to debug programs written in many different