title: What is the proper way to break on failed asserts in gdb?
body: <p>I am attempting to capture failed asserts in my program. I’m using a library that makes direct calls to assert(), rather than a custom function or macro, and it is within this library I am currently trying to trace several porting-related bugs. Everything involved has been compiled with debug symbols in g++.</p>
  
  <p>The best solution I have found is breaking at the file:line of the assert, with the condition of the assert expression. This allows stopping on the assert before it fails, but is a horrible solution. It requires special setup for each possibly-failing assert, won’t work from my IDE, and is far too much effort in general.</p>
  
  <p><strong>How can I break on <em>any</em> failed assert using gdb &amp; gcc in such a way that allows examination of the callstack and variables within the scope of the assert call?</strong></p>
  
  <p>It would be even better if the solution allowed me to discard the assert's failure and continue running.</p>