title: how can I put a breakpoint on "something is printed to the terminal" in gdb?
body: <p>I would like to know from where inside a <em>huge</em> application a certain message is printed. The application is so big and old that it uses all conceivable ways of printing text to the terminal; for example printf(), fprintf(stdout, ...) etc.</p>
  
  <p>I write to put a breakpoint on the write() system call but then I'm flooded with too many breakpoint stops because of various file I/O operations that use write() as well.</p>
  
  <p>So basically I want gdb to stop whenever the program prints something to the terminal but at the same time I don't want gdb to stop when the program writes something to a file.</p>