In a large project, exceptions may be thrown in various places, and when encountering crashes or exceptions, itβs crucial to address two main issues:
Exception Source: Determine where the exception is thrown.
Exception Handling: Identify where the exception is caught.
Exceptions can be triggered by custom code or thrown by underlying libraries, making it challenging to pinpoint the exact location.
Fortunately, GDB provides two essential commands for handling these situations:
To catch exceptions thrown: catch throw
To catch exceptions caught: catch catch
More detail: https://light-city.medium.com/how-to-use-gdb-to-debug-exceptions-with-zero-experience-5d61e4b7d14e
Top comments (0)