Use cgdb instead.
Let GDBW denote the command window,
let SRCW denote the source window
let TTYW denote the input window.
Cgdb basic usage
1 2 3 4 5 6
ESC key in GDBW: switch to SRCW i key in SRCW: switch to GDBW T key in SRCW: switch on/off TTYW PgUp/PgDn key in GDBW: scroll GDBW PgUp/PgDn key in SRCW: scroll SRCW -/= in SRCW: decrease/increase SRCW size
Patch: GDBW output is truncated.