Here is a tutorial video on using GDB to debug exceptions in application code:
https://www.youtube.com/watch?v=p63VEYS7ZUw
The technique/recipe was discussed in this excellent forum thread.
http://esp32.com/viewtopic.php?f=13&t=263
Please review that for more details and other great debugging techniques.