title: Printing details about file stream objects in gdb - c++
body: <p>I have function whose signature is something like so:  </p>
  
  <pre><code>void someFunc(ifstream ifile) { 
  </code></pre>
  
  <p>This function is embedded deep within the code. When I am debugging this code with ddd, how can I get the name of the file from the ifstream object. Trying the following:<br>
  <code>p ifile</code>  or</p>
  
  <pre><code>ptype ifile  
  </code></pre>
  
  <p>leads to a mountain of information being dumped. Is there a way to get the filename that ifile is a stream to?  </p>
  
  <p>Thanks,<br>
  Sriram.</p>