0

catch throw tells GDB to stop when an exception occurs. This has been discussed here.

However, I define a few exception types in my program, I need a way to tell GDB to only stop when one of my exceptions is thrown. Is there a way to do this? I know Visual Studio lets you specify an exception to force the debugger to stop. How do I do this in GDB?

Community
  • 1
  • 1
The Vivandiere
  • 3,059
  • 3
  • 28
  • 50

2 Answers2

0

GDB cannot do this. If you have some other debugger, it can help you here.

The Vivandiere
  • 3,059
  • 3
  • 28
  • 50
0

Since the exception is defined in my own program, the correct way to do this is to simply put a breakpoint in the constructor of the exception.

The Vivandiere
  • 3,059
  • 3
  • 28
  • 50