News for hackers. Stuff that matters.
Re:Pyringe: Debugger capable of attaching to and injecting i... by kngl on Sunday March 30, 2014 @01:04PM (#7496864)
What's wrong with http://pyrasite.com/ ?
Re:Pyringe: Debugger capable of attaching to and injecting i... by tehmillhouse on Sunday March 30, 2014 @01:38PM (#7497006)
Depending on what state cpython is in when you inject, pyrasite may deadlock or segfault the interpreter. All it does is try to get the GIL and then inject the code.

Pyringe first gets to a safe place before injecting by (essentially) faking the delivery of a signal, then waiting for python-level signal handler dispatch to trigger. By doing so, it ensures the interpreter first gets itself into a state in which it can execute arbitrary python code before performing the injection.

Pyrasite has a bunch of features pyringe doesn't, though.

Re:Pyringe: Debugger capable of attaching to and injecting i... by kngl on Sunday March 30, 2014 @02:18PM (#7497177)
Using a signal may also have side effects on your program.
Re:Pyringe: Debugger capable of attaching to and injecting i... by tehmillhouse on Sunday March 30, 2014 @02:27PM (#7497223)
It doesn't really send a signal to your program. It just sets flags inside cpython to make it think so. (pendingbusy and pendingcalls_to_do, to be precise)
Re:Pyringe: Debugger capable of attaching to and injecting i... by rpearl on Sunday March 30, 2014 @09:39PM (#7498988)
why not just contribute to pyrasite to have this different method of injection instead of building out a new project? what is the tradeoff here?