This ends up being a sort of breakpoint that you don't need to set manually in gdb.  The way this works is:
* compile with DEBUG_MALLOC_FAILURES = 1
* run the code in gdb
* wait for a while
* hit ctrl-c
* you'll be spinning in the ````while(wait_here)```` loop
* ````bt````
* ````set wait_here = 0````
* ````c````

The ````wait_here = true```` line just auto re-arms the "breakpoint" on the way out.

Honestly, I can't even remember for sure why this was better than just using a real breakpoint.  I vaguely remember that it allowed the board enough latitude to properly deal with its USB enumeration during init (handled via interrupts) but also let me still have a pseudo breakpoint in the malloc failures.  Failures to respond during USB enumeration had the unwelcome side-effect of hard-locking my Linux machine which made debugging early init a serious hassle.