I have a program and want to debug it in gdb.
Will I see usual program output? How can I enable/disable this output, leaving only gdb messages.
I have a program and want to debug it in gdb.
Will I see usual program output? How can I enable/disable this output, leaving only gdb messages.
Yes, you will see all output from your program.
You can disable this by sending it off elsewhere. For example:
(gdb) run > /dev/null
You can redirect output from within gdb:
(gdb) run > somefile.txt
will redirect standard output to somefile.txt. You can also specify a terminal to send output to:
(gdb) tty /dev/ttyb