Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

interrupt program in debugger when c++ exception is thrown

How can I make gdb interrupt (like in breakpoint) the program at the point where an exception is thrown, and interrupt again on rethrows and beginnings of the relevant catch blocks?

like image 830
Adrian Panasiuk Avatar asked Mar 18 '26 09:03

Adrian Panasiuk


2 Answers

Try catch throw and catch catch.

like image 83
Jared Oberhaus Avatar answered Mar 20 '26 21:03

Jared Oberhaus


Set a catchpoint.

like image 44
Nemanja Trifunovic Avatar answered Mar 20 '26 21:03

Nemanja Trifunovic