cgdb is a better version of gdb using curses to draw colored text and show the current executed line. gdb works, but every time the program prints out text, gdb gets shifted, and you have to press control-L to refresh.
I have many students using cgdb under windows, but for some odd reason I cannot run it myself on 4 separate ubuntu machines. So it seems like the default configuration for Ubuntu 20.04LTS just doesn't work. Here is a picture of what happens before the terminal locks up:
CGDB: a curses debugger
version 0.6.7
type q<Enter> to exit
type help<Enter> for GDB help
type <ESC>:help<Enter> for CGDB help
*qqqqqqqj[39m(B(B[m[8;40H(0[0;1;7m[36m[39m(B(B[m[16;80H[H[2J(0[0;1;7m[36ml
qqqqqqqqqqqk[39m(B(B[m[2;1H(0[0;1;7m[36mx[39m(B(B[m[80G(0[0;1;7m[3
6mx[39m(B(B[m[3;1H(0[0;1;7m[36mx[39m(B(B[m[80G(0[0;1;7m[36mx
[39m(B(B[m[4;1H(0[0;1;7m[36mx[39m(B(B[m[80G(0[0;1;7m[36mx[39m(B(B
[m[5;1H(0[0;1;7m[36mx[39m(B(B[m[80G(0[0;1;7m[36mx[39m(B(B[m[6;1H(0[0;1;7m
[36mx[39m(B(B[m[80G(0[0;1;7m[36mx[39m(B(B[m[7;1H(0[0
;1;7m[36mx[39m(B(B[m[80G(0[0;1;7m[36mx[39m(B(B[m[8;1H(0[0;1;7m
[36mx[39m(B(B[m[8;17H(0[0;1;7m[36m[39m(B(B[m[ No Source Available ]
[80G(0[0;1;7m[36mx[39m(B(B[m[9;1H(0[0;1;7m[36mx[39m(B(B[m[80G(0[0;1;7m
[36mx[39m(B(B[m[10;1H(0[0;1;7m[36mx[39m(B(B[m[80G(0
--Type <RET> for more, q to quit, c to continue without paging--
So this works in Windows using the msys2 shell, and a student running arch linux has no problem either. Thinking that somehow the default terminal is the problem, I installed alacritty, and it happens there too.
TERM is set to xterm-256color, could that be the problem? If so, what do I set it to?
0 Answers