[PATCH] Assume "unknown" terminal type by default

Stephanos Ioannidis root@stephanos.io
Tue Jun 2 16:15:03 GMT 2020


> Isn't this something that ncurses itself should do on MS-Windows?

ncurses assumes the "#win32con" terminal type (required for proper terminal 
operation on the Windows console) when the tgetent is called with 
termtype=NULL or termtype="unknown".

In this case, _rl_init_terminal_io is passing termtype="dumb" to tgetent when 
the TERM environment variable is not defined, so ncurses is resolving the 
"dumb" terminal type instead of required "#win32con".

This effectively causes some keys (e.g. backspace and arrow keys) to not work 
in the gdb command line, and this patch ensures that the problem is fixed.

p.s. I apologise for the horrible line formatting in the previous messages; I
 am sending these from a home machine and the mail client settings are all
 messed up.


More information about the Gdb-patches mailing list