Created
November 1, 2018 22:07
-
-
Save shi-yan/3b2225bd267fcd6114de87d4a7e2c063 to your computer and use it in GitHub Desktop.
Revisions
-
shi-yan created this gist
Nov 1, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ https://stackoverflow.com/questions/8657648/how-to-have-gdb-exit-if-program-succeeds-break-if-program-crashes If you put the following lines in your ~/.gdbinit file, gdb will exit when your program exits with a status code of 0. python def exit_handler ( event ): if event .exit_code == 0: gdb .execute ( "quit" ) gdb .events .exited .connect ( exit_handler ) end