This is the mail archive of the 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: [RFC] Improve testsuite for poor expect behavior

  My way to use cygwin expect for DJGPP
is quite ugly, but it gives some results.

  The basic idea is to consider that djgpp 
is a remote target and to overload several
expect procedures to cope with DJGPP specific 

  I added a .dejagnu directory in my cygwin home,
with an empty site.exp file
and a boards directory.
  This directory stores several files,
but only one concerns DJGPP.
  I simply called it djgpp.exp
and I run the testsuite
(with a DJGPP compiled gdb.exe at djgpp/gdb level).
I an sereral testsuite subsets using
make check RUNTESTFLAGS="--target=djgpp --host_board=djgpp gdb.*/wa*.exp"
Which means that the same file ($HOME/.dejagnu/boards/djgpp.exp)
is used both as host_board and target...
as I said it is really ugly, but I didn't have time to
sort things out, and I am not sure I will have the willingness
to do it...

  I attached the djpp.exp file.

  The key functions are
djgpp_spawn and djgpp_exec
djgpp_exec uses a response file 
for long commandlines, to overcome the 
80 chars limitations for Dos command lines.
  In its present form, it prints out lots of 
information, send_user can probably be changed to verbose
if someone just wants to use it.

  Eli, tell me if you get a chance to try it out.


> -----Message d'origine-----
> De?: Eli Zaretskii []
> Envoyé?: Wednesday, June 17, 2009 7:17 PM
> À?: 'Daniel Jacobowitz'
> Cc?:;; gdb-
> Objet?: Re: [RFC] Improve testsuite for poor expect behavior
> > Date: Wed, 17 Jun 2009 09:36:26 -0400
> > From: 'Daniel Jacobowitz' <>
> > Cc: 'Joel Brobecker' <>, gdb-
> >
> > I have not tried this on DJGPP at all.
> You cannot try this with DJGPP, because there are no such APIs in
> DJGPP (with the exception of `setmode', which does exist).  Also,
> there are no pipes in DJGPP.
> I cannot judge what would be needed for DJGPP, since Pierre did not
> yet explain how does he run DJGPP with the test suite, nor show any
> code that achieves that.  All I can say is that DJGPP has the
> `setmode' function that can be used to switch a standard handle into
> binary mode, and that `isatty' is available to detect whether a handle
> is connected to a terminal device.  Note that the DJGPP build of GDB
> generally does not always use file I/O functions to write to the
> terminal; it uses direct screen I/O for some ops.  Thus, binary mode
> file I/O not necessarily will solve the problem that bothers Pierre,
> although I do not yet understand fully whether it is relevant to DJGPP
> as it is to MinGW.

Attachment: djgpp.exp
Description: Binary data

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