This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Improve end check on rs6000 prologue analyzer
- From: Daniel Jacobowitz <drow at false dot org>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: Mark Kettenis <mark dot kettenis at xs4all dot nl>, gdb-patches at sourceware dot org
- Date: Tue, 10 Apr 2007 17:10:34 -0400
- Subject: Re: Improve end check on rs6000 prologue analyzer
- 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> <ulki1py8e.fsf@gnu.org>
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