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]

Re: Improve end check on rs6000 prologue analyzer


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 <mark.kettenis@xs4all.nl>
> > 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  <dan@codesourcery.com>

	* 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


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