title: How to grep on gdb print
body: <p>Is there a way to grep on the output of print command in gdb? In my case, I am debugging a core dump using gdb and the object I am debugging contains hell lots of elements. I am finding it difficult to look for a matching attribute i.e:</p>
  
  <pre><code>(gdb) print *this | grep &lt;attribute&gt;
  </code></pre>
  
  <p>Thanks.</p>