TUI working on cmd line but not in mintty

Viewed 333

I just tried to get tui up and it said:

Cannot enable the TUI when output is not a terminal

Which I though was odd because I thought I had it up before. Turns out it worked when I was using cmd but doesn't work using mintty.exe. The bash shell says that TERM=xterm. I also tried some other vt terminals without success. So I'm thinking that gdb isn't respecting the TERM variable.

Anyone know anything about this?

1 Answers

The source code for GDB (line 380 of the linked source) uses stderr.isatty() to check whether the output file (in this case MinTTY) is a terminal or not. However, this check fails using MSYS/MinGW because, according to the developer of MinTTY,

Quoting from mingw.org: “MinGW … is a minimalist development environment for native Microsoft Windows applications.” Native Windows means no tty.

Looking at this patch suggests that a workaround may be to unset the $TERM variable to enable the native Windows console driver (rather than using a Unix tty). So try unset TERM to see if that will resolve the issue.

Related