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: [RFC 3/6] mingw-hdep: Add "maint set testuite-mode on/off" command.


On 09/29/2013 03:57 PM, Pierre Muller wrote:
I found out that this patch

$ cvs diff -up
cvs diff: Diffing .
Index: gdb.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.246
diff -u -p -r1.246 gdb.exp
--- gdb.exp     20 Sep 2013 21:47:05 -0000      1.246
+++ gdb.exp     29 Sep 2013 22:50:10 -0000
@@ -1454,6 +1454,9 @@ proc default_gdb_start { } {
         perror "Spawning $GDB failed."
         return 1
      }
+    if [ishost "*-*-mingw*"] {
+       fconfigure $res -translation {crlf crlf}
+    }
      gdb_expect 360 {
         -re "\[\r\n\]$gdb_prompt $" {
             verbose "GDB initialized."


works... but only for cygwin dejagnu...

Yeah, you can't generally run fconfigure on $res here because $res is a an expect spawn_id, not a Tcl file channel.

[I *think*] You can get a file channel by using:

set fc [exp_open -leaveopen -i $res]; # WARNING: I have zero experience with this. I read about it in the expect man page.
fconfigure $fc -translation ...

Another thing that might be worth investigating with is expect's built-in stty command.

I am planning on playing with mingw testing this week. At the very least, I hope to duplicate some of your problems!

Keith


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