如何在 gdb 中捕获任何异常

在 gdb 中,运行

how-to-catch-any-exception-in-gdb.txt
catch throw

以便在任何抛出的异常处中断。

如果你只想在特定异常类型处中断,使用

catch_throw_example.txt
catch throw [exception type]

Check out similar posts by category: C/C++