title: gdb: howto list open files
body: <p>I am wondering if it might be possible to get a list of files/directories that the debugged application has opened but not closed from GDB itself ?</p>
  
  <p>Currently I set a breakpoint and then I use an external program like <code>lsof</code> to check for opened files.</p>
  
  <p>But this approach is really annoying.</p>
  
  <p>Environment: Debian-Lenny with gdb v6.8</p>
  
  <p><strong>EDIT</strong>: I am asking because my application is leaking file handles in some situations</p>