Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GDB in TUI mode: how to deal with stderr's interaction with the ui

I am trying to use gdb to debug caffe. I prefer to use the tui mode because it allows me to see the whole source code rather than just a single line. But there is a problem: whenever the program caffe outputs something on stderr, the output distorts the tui interface. See the below snapshot for an illustration:

normal

when there is output on stderr

Is this an inherent limitation of gdb tui or is there any way to solve this problem?

like image 373
Siyuan Ren Avatar asked Oct 10 '14 03:10

Siyuan Ren


1 Answers

As suggested by @ks1322 you can press Ctrl-L to refresh the screen. Or define a hook in .gdbinit to refresh after every next command:

define hook-next
    refresh
end
like image 58
builder-7000 Avatar answered Sep 21 '22 00:09

builder-7000