This is the mail archive of the gdb-patches@sources.redhat.com 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: [RFA/TESTSUITE]: readline tests


   From: Andreas Schwab <schwab@suse.de>
   Date: Fri, 16 Aug 2002 21:20:26 +0200
   User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.3.50 (ia64-suse-linux)
   Content-Type: text/plain; charset=iso-8859-1

   Tom Tromey <tromey@redhat.com> writes:

   |> I think this means that sending C-o didn't cause an operate-and-get-next.
   |> The subsequent problems are caused by this.

   Note that C-o is typically also allocated to the tty flush (DISCARD)
   character.  Since readline does not reset the IEXTEN flag the flush
   character may still be intercepted by the tty driver even in non-canonical
   input.

Yup, that's what's happening.  After

   $ stty discard ^Y

operate-and-get-next works fine.  So we should either reset the IEXTEN
or set DISCARD to _POSIX_VDISABLE, either in readline or GDB.  I'm
inclined to make the attached patch to readline, since something
similar is already done for LNEXT.  Should I submit it to the readline
maintainer?

PS Something strange is still happening.  Some operate-and-get-next
tests still fail when a .gdb_history file is present in the current
directory that has more than 254 lines.  If no .gdb_history file is
present or if it contains less than 255 lines, the tests succeed.
Unfortunately a test that gets run earlier produces just that; a
.gdb_history file with 257 lines.  Anyway, it seems that I've found a
bug in the history code.  I'll see if I can find it.

Index: rltty.c
===================================================================
RCS file: /cvs/src/src/readline/rltty.c,v
retrieving revision 1.5
diff -u -p -r1.5 rltty.c
--- rltty.c 8 Jan 2001 14:57:30 -0000 1.5
+++ rltty.c 17 Aug 2002 00:25:48 -0000
@@ -598,6 +598,10 @@ prepare_terminal_settings (meta_flag, ot
      be necessary.  */
 #if defined (TERMIOS_TTY_DRIVER) && defined (_POSIX_VDISABLE)
 
+#if defined (VDISCARD)
+  tiop->c_cc[VDISCARD] = _POSIX_VDISABLE;
+#endif
+
 #if defined (VLNEXT)
   tiop->c_cc[VLNEXT] = _POSIX_VDISABLE;
 #endif


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