Created
November 1, 2018 22:07
-
-
Save shi-yan/3b2225bd267fcd6114de87d4a7e2c063 to your computer and use it in GitHub Desktop.
gdb exit if program succeeds, break if program crashes?
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 characters
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 |
break dlopen if $_regex($1,".+libssl.so.1.1.+")
https://stackoverflow.com/questions/7423577/how-to-compare-a-stored-string-variable-in-gdb
compare string and break
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
dump callstack and continute
https://stackoverflow.com/questions/17672701/automate-gdb-to-print-stack-frame-at-a-particular-breakpoint