title: GDB print variable in readable format (using << operator)
body: <p>GDB is a nice tool but in the way I have been using it so far, it turns pretty useless as soon as one is working with more complex data structures because simply using <code>print</code> on them just fills then entire screen with unreadable details about that class.</p>
  <p>However I usually have a custom <code>operator&lt;&lt;</code> defined for my classes for the purpose of creating a (more or less) readable String representation of my class.</p>
  <p>Therefore I would much prefer if GDB would always use that (if available) instead of its default print behavior.</p>
  <p>I have found <a href="https://stackoverflow.com/questions/3832964/calling-operator-in-gdb">this question</a> from 2010 which describes how one can call <code>operator&lt;&lt;</code> manually. Besides being a bit tedious to do, I have failed to get these to work for me (I always get <code>No symbol &quot;operator&lt;&lt;&quot; in current context.</code>).</p>
  <p>However it appears to me as if there must be a more convenient way of getting GDB to print variables in a readable format. After all I can't be the first one who comes across this situation.</p>
  <p>Therefore my question is: How do you get GDB to print variables in a readable format (preferably using <code>operator&lt;&lt;</code> as implemented in the respective type)?
  The linked question I found is from 2010 and so I am hoping that since then the situation has improved.</p>