Use GDB Python extension to check serial output
1.Revise gdb starup parameter. Let it run Python sript after normal GDB command.
2.Redirect serial port to a file