How to tell GDB to flush the stdio of the program being debugged
- by Yorkwar
The stdio is usually buffered. When I hit a breakpoint and there's a printf before the breakpoint, the printed string may still be in the buffer and I can not see it.
I know I can flush the stdio by adding some flush code in the program.
Without doing this, is there any way to tell GDB to flush the stdio of the program being debugged after GDB stops? This way is more friendly when debugging a program.