title: gdb output starts threads but gives on output
body: <p>I have some code that segfaults after giving a few lines of output. But when I run the code on gdb like so:</p>
  
  <p><code>(gdb) r &lt; err.in</code></p>
  
  <p>I get the following </p>
  
  <pre><code>Starting program: /Users/prikshetsharma/Downloads/parser/parse &lt; err.in                                                                   
  [New Thread 0xf03 of process 39241]                                                                                             
  [New Thread 0xc03 of process 39241]   
  
  </code></pre>
  
  <p>And gdb just keeps stuck here. And it doesn't give the output it gives while running it regularly. How to fix this?</p>
  
  <p>-- Edit --</p>
  
  <p>An interesting thing is happening. Sometimes gdb gives the output and sometimes it doesn't, even though I change nothing. When it does give an output it does the following:</p>
  
  <pre><code>Starting program: /Users/prikshetsharma/Downloads/parser/parse &lt; err.in                                                                                                                                                                                                                                                       
  [New Thread 0x1003 of process 39841]                                                                                                                                                                                                                                                                                          
  [New Thread 0x1103 of process 39841]                                                                                                                                                                                                                                                                                          
  [New Thread 0x1503 of process 39841]                                                                                                                                                                                                                                                                                          
  warning: `/BuildRoot/Library/Caches/com.apple.xbs/Binaries/Libc_darwin/install/TempContent/Objects/Libc.build/libsystem_darwin.dylib.build/Objects-normal/x86_64/bsd.o': can't open to read symbols: No such file or directory.                                                                                               
  warning: `/BuildRoot/Library/Caches/com.apple.xbs/Binaries/Libc_darwin/install/TempContent/Objects/Libc.build/libsystem_darwin.dylib.build/Objects-normal/x86_64/darwin_vers.o': can't open to read symbols: No such file or directory.                                                                                       
  warning: `/BuildRoot/Library/Caches/com.apple.xbs/Binaries/Libc_darwin/install/TempContent/Objects/Libc.build/libsystem_darwin.dylib.build/Objects-normal/x86_64/dirstat.o': can't open to read symbols: No such file or directory.                                                                                           
  warning: `/BuildRoot/Library/Caches/com.apple.xbs/Binaries/Libc_darwin/install/TempContent/Objects/Libc.build/libsystem_darwin.dylib.build/Objects-normal/x86_64/dirstat_collection.o': can't open to read symbols: No such file or directory.                                                                                
  warning: `/BuildRoot/Library/Caches/com.apple.xbs/Binaries/Libc_darwin/install/TempContent/Objects/Libc.build/libsystem_darwin.dylib.build/Objects-normal/x86_64/err.o': can't open to read symbols: No such file or directory.                                                                                               
  warning: `/BuildRoot/Library/Caches/com.apple.xbs/Binaries/Libc_darwin/install/TempContent/Objects/Libc.build/libsystem_darwin.dylib.build/Objects-normal/x86_64/exception.o': can't open to read symbols: No such file or directory.                                                                                         
  warning: `/BuildRoot/Library/Caches/com.apple.xbs/Binaries/Libc_darwin/install/TempContent/Objects/Libc.build/libsystem_darwin.dylib.build/Objects-normal/x86_64/init.o': can't open to read symbols: No such file or directory.                                                                                              
  warning: `/BuildRoot/Library/Caches/com.apple.xbs/Binaries/Libc_darwin/install/TempContent/Objects/Libc.build/libsystem_darwin.dylib.build/Objects-normal/x86_64/mach.o': can't open to read symbols: No such file or directory.                                                                                              
  warning: `/BuildRoot/Library/Caches/com.apple.xbs/Binaries/Libc_darwin/install/TempContent/Objects/Libc.build/libsystem_darwin.dylib.build/Objects-normal/x86_64/stdio.o': can't open to read symbols: No such file or directory.                                                                                             
  warning: `/BuildRoot/Library/Caches/com.apple.xbs/Binaries/Libc_darwin/install/TempContent/Objects/Libc.build/libsystem_darwin.dylib.build/Objects-normal/x86_64/stdlib.o': can't open to read symbols: No such file or directory.                                                                                            
  warning: `/BuildRoot/Library/Caches/com.apple.xbs/Binaries/Libc_darwin/install/TempContent/Objects/Libc.build/libsystem_darwin.dylib.build/Objects-normal/x86_64/string.o': can't open to read symbols: No such file or directory.                                                                                            
  warning: `/BuildRoot/Library/Caches/com.apple.xbs/Binaries/Libc_darwin/install/TempContent/Objects/Libc.build/libsystem_darwin.dylib.build/Objects-normal/x86_64/variant.o': can't open to read symbols: No such file or directory.      
  </code></pre>
  
  <p>followed by the regular output of the program. That's strange. </p>