tags:

views:

27

answers:

1

HI All

I am doing my first steps with GDB in TUI mode.

During the debug session I see that each line outputted to console occurs in a single line (in the picture you see 222222 highlighted in red ). It is like having an output pane of one single line.

On top of that each \n doesn't cleanup that line so all the strings do overwrite each other making my output very confusing.

Can you address me a bit on this issue or to some key command to look for in order to have a clean output?

I highlighted also another area (in the picture 1111111) because the first string is outputted there and then all other on the frame of the source code window.

THanks AFG alt text

A: 

You can always refresh tui screeen every time your program outputs something with Ctrl+L key binding. Or you can temporarily swith to normal mode, step and watch program output and switch back to tui mode (Ctrl+X A). See all key bindings here.

ks1322
Abruzzo Forte e Gentile
I found this and I hope is gonna helphttp://ftp.gnu.org/old-gnu/Manuals/gdb-5.1.1/html_node/gdb_183.html
Abruzzo Forte e Gentile
As far as I know there is no such feature in gdb as OUTPUT PANE. But it is possible to redirect all program output to another terminal with gdb's TTY command: http://sourceware.org/gdb/current/onlinedocs/gdb/Input_002fOutput.html#index-tty-127
ks1322
Hi Ks1322! Thanks a lot! I did some research since I don't have this /dev/ttyb in Ubuntu. #A. I open a new terminal, give "tty" command to return e.g. "/dev/pts/0" #B. In another terminal where I lunch "gdb"and give "tty /dev/pts/0" to see my output in the first terminal: supre cool! Everything seems fine except for this message "warning: GDB: Failed to set controlling terminal: Operation not permitted". It seems not really affecting my debugging session by the way but I am not sure 100%. Do you know what it could be?
Abruzzo Forte e Gentile
Maby this will help you: http://stackoverflow.com/questions/2346919/warning-gdb-failed-to-set-controlling-terminal-operation-not-permitted ? Maby this warning is Ubuntu specific? I dont observe it on my Fedora 12 system.
ks1322
probably you are right!:) Thanks for your help! Regards
Abruzzo Forte e Gentile