Last active
August 29, 2015 14:26
-
-
Save savanovich/c89e0bc3ebfd350c3a1c to your computer and use it in GitHub Desktop.
Sends SIGTRAP signal and stops gdb
This file contains 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
""" | |
$ gdb --args ./python /home/user/src/python/stop_gdb.py | |
(gdb) run | |
""" | |
import os | |
import signal | |
signal.signal(signal.SIGTRAP, lambda *args, **kwargs: None) | |
stop = lambda: os.kill(os.getpid(), signal.SIGTRAP) | |
stop() | |
def gen(): yield | |
gen() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment