title: using gdb to debug a interactive program that reads input from stdin
body: <p>I'm writing a client/server program in C.</p>
  
  <p>My client has a thread reading input from stdin, it's just a while(1) loop to read input from stdin. Whenever it reads a line, it deliver it to another thread that handles message parsing and framing.</p>
  
  <p>As I enter gdb, the command line is occupied by gdb prompt and I can no longer input lines into stdin.</p>
  
  <p>Is there a way to do it? (I don't want to redirect stdin to an input file because I've tried this method and it didn't work) </p>