On 3/16/2020 7:23 PM, Ryan Johnson wrote:
Hi Ken,

(Apologies for private mailing you, but my attempts to message cygwin@ and cygwin-developers@ are rejected with TLS errors... any chance you could forward this info to an appropriate person for attention?)

I upgraded cygwin in order to get gcc9, but to my dismay gdb is completely unusable inside emacs, due to weird output garbling. Both gdb/mi and gud-gdb/fullname modes are affected, but the problem is easier to show here with gud-gdb. See garbled output below.

The output below is from the self-built emacs-25.3.1 I normally use.

The official cygwin emacs is also affected, but not quite as badly. Technically it's still sort of usable -- the ^[[21X^[[21C garbage is missing -- but line endings are messed up (newline but no carriage return). Also, it's impossible to navigate away from the gdb source buffer gdb is pointing to -- the source file buffer even reopens itself if I kill it -- and gdb prints all kinds of garbage whenever I switch back to it from other emacs windows.

A self-built gdb-7.8 I had been using without problems before the upgrade is also affected in exactly the same way.

The issue does not seem to occur when running gdb by itself from the shell... but then I lose all the emacs debugging niceties.

I hit the problem previously (early Feb), and was able to fix by reverting from cygwin-3.1.2-1 back to the previous cygwin-3.0.7-1

I was able to fix the problem again today by reverting to cygwin-3.0.7-1. The attached cygcheck.out comes from the broken cygwin-3.1.4-1 I upgraded to -- and back away from -- today.

Any ideas? Maybe this is related to the new console handling stuff I saw discussed on cygwin-dev a little while ago?

Thanks!
Ryan

=== EXAMPLE GARBLED OUTPUT ===

Current directory is /home/Ryan/experiments/xxxxxxxxxxxxx/
GNU gdb (GDB) (Cygwin 8.2.1-1) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
     <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from a.exe...done.
(gdb) start
Temporary breakpoint 1 at 0x10041735d: file xxxxxxxxxxxxx-test.cpp, line 1586.
Starting program: /home/Ryan/experiments/xxxxxxxxxxxxx/a.exe
   This is free software: you are free to change and redistribute 
it.^[[12X^[[12C
There is NO
WARRANTY, to the extent permitted by law.^[[39X^[[39C
                                          Type "show copying" and "show 
warranty"
  for details.^[[67X^[[67C
              This GDB was configured as "x86_64-pc-cygwin".^[[21X^[[21C
                                                            Type "show 
configurat
ion" for configuration details.^[[49X^[[49C
                                For bug reporting instructions, please see:
<http:
//www.gnu.org/software/gdb/bugs/>.^[[46X^[[46C
                                   Find the GDB manual and other documentation 
re
sources online at:^[[62X^[[62C
<http://www.gnu.org/software/gdb/documentation/>.^[[9X^[[9C
^[[80X^[[80C
For help,
  type "help".^[[67X^[[67C
              Type "apropos word" to search for commands related to "word"...
Read
ing symbols from a.exe...done.^[[50X^[[50C
                               (gdb) Temporary breakpoint 1 at 0x10041735d: file
xxxxxxxxxxxxx-test.cpp, line 1586.^[[47X^[[47C
                                  Starting program: 
/home/Ryan/experiments/xxxxxx
xxxxxx/a.exe^[[68X^[[68C
^[[80X^[[80C  This is free software: you are free to change and redistribute it.^[[12X^[[12C
There is NO
WARRANTY, to the extent permitted by law.^[[39X^[[39C
                                          Type "show copying" and "show 
warranty"
  for details.^[[67X^[[67C
              This GDB was configured as "x86_64-pc-cygwin".^[[21X^[[21C
                                                            Type "show 
configurat
ion" for configuration details.^[[49X^[[49C
                                For bug reporting instructions, please see:
<http:
//www.gnu.org/software/gdb/bugs/>.^[[46X^[[46C
                                   Find the GDB manual and other documentation 
re
sources online at:^[[62X^[[62C
<http://www.gnu.org/software/gdb/documentation/>.^[[9X^[[9C
^[[80X^[[80C
For help,
  type "help".^[[67X^[[67C
              Type "apropos word" to search for commands related to "word"...
Read
ing symbols from a.exe...done.^[[50X^[[50C
                               (gdb) Temporary breakpoint 1 at 0x10041735d: file
xxxxxxxxxxxxx-test.cpp, line 1586.^[[47X^[[47C
                                  Starting program: 
/home/Ryan/experiments/xxxxxx
xxxxxx/a.exe^[[68X^[[68C
              [New Thread 7556.0x1238]^[[43X^[[43C
                                      [New Thread 7556.0x3290]^[[19X^[[19C
^[[80X^[[80C[New Thread 7556.0
9ac]^[[76X^[[76C
^[[80X^[[80C[New Thread 7556.0x3ea4]
^[[80X^[[80C             This GDB was configured as 
"x86_64-pc-cygwin".^[[21X^[[21C
                                                            Type "show 
configurat
ion" for configuration details.^[[49X^[[49C
                                For bug reporting instructions, please see:
<http:
//www.gnu.org/software/gdb/bugs/>.^[[46X^[[46C
                                   Find the GDB manual and other documentation 
re
sources online at:^[[62X^[[62C
<http://www.gnu.org/software/gdb/documentation/>.^[[9X^[[9C
^[[80X^[[80C
For help,
  type "help".^[[67X^[[67C
              Type "apropos word" to search for commands related to "word"...
Read
ing symbols from a.exe...done.^[[50X^[[50C
                               (gdb) Temporary breakpoint 1 at 0x10041735d: file
xxxxxxxxxxxxx-test.cpp, line 1586.^[[47X^[[47C
                                  Starting program: 
/home/Ryan/experiments/xxxxxx
xxxxxx/a.exe^[[68X^[[68C
              [New Thread 7556.0x1238]^[[43X^[[43C
                                      [New Thread 7556.0x3290]^[[19X^[[19C
                                                              [New Thread 
7556.0x
9ac]^[[76X^[[76C
     [New Thread 7556.0x3ea4]^[[52X^[[52C
^[[80X^[[80C             This GDB was configured as 
"x86_64-pc-cygwin".^[[21X^[[21C
                                                            Type "show 
configurat
ion" for configuration details.^[[49X^[[49C
                                For bug reporting instructions, please see:
<http:
//www.gnu.org/software/gdb/bugs/>.^[[46X^[[46C
                                   Find the GDB manual and other documentation 
re
sources online at:^[[62X^[[62C
<http://www.gnu.org/software/gdb/documentation/>.^[[9X^[[9C
^[[80X^[[80C
For help,
  type "help".^[[67X^[[67C
              Type "apropos word" to search for commands related to "word"...
Read
ing symbols from a.exe...done.^[[50X^[[50C
                               (gdb) Temporary breakpoint 1 at 0x10041735d: file
xxxxxxxxxxxxx-test.cpp, line 1586.^[[47X^[[47C
                                  Starting program: 
/home/Ryan/experiments/xxxxxx
xxxxxx/a.exe^[[68X^[[68C
              [New Thread 7556.0x1238]^[[43X^[[43C
                                      [New Thread 7556.0x3290]^[[19X^[[19C
                                                              [New Thread 
7556.0x
9ac]^[[76X^[[76C
     [New Thread 7556.0x3ea4]^[[52X^[[52C
^[[80X^[[80C
                             Thread 1 "a" hit Temporary breakpoint 1, 0x00000001
041735d in main ()^[[62X^[[62C
                       at xxxxxxxxxxxxx-test.cpp:1586^[[29X^[[29C
^Z^Z/home/Ryan/experiments/xxx
xxxxxxxx/xxxxxxxxxxxxx-test.cpp:1586:58336:beg:0x10041735d^[[23X^[[23C
(gdb)^[[18X^[[18C

Hi Ryan,

Yes, I would guess this is related to the new pty code. A similar problem was reported in

  https://sourceware.org/pipermail/cygwin/2020-March/243939.html,

with a suggested workaround in

  https://sourceware.org/pipermail/cygwin/2020-March/243955.html

Ken
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to