Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GDB TUI - output does not line up

Tags:

gdb

I am using gdb 7.7.1 on ubuntu, GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1.

My terminal is Konsole 2.13.2.

The problem I am having is, when I go to the TUI mode, after one or two debugger sessions - session, I mean, set breakpoint, run, step over a while and finally kill it by "kill" command - the output starts messed up. Supposedly each output should go to a new line, but now they just all scramble, one immediately after another one.

I attach a screenshot.

I have to quit GDB, open a new terminal tab and start gdb again.

I tried "ctrl-x-a" back and forth, does not help; neither does "ctrl-l".

A while back, I was using another terminal, it also had this problem.

Any help is appreciated.

enter image description here

like image 240
my_question Avatar asked Nov 08 '22 08:11

my_question


1 Answers

It appears that your tty settings changed, in much the same way that tty -onlcr might change them (tty onlcr restores the default). Perhaps the code you're debugging changes tty settings, and doesn't get a chance to restore them because of a crash.

As suggested in a comment, using a separate window might provide a workaround.

like image 199
Eirik Fuller Avatar answered Jan 04 '23 01:01

Eirik Fuller