top | item 4107174

Exploring and Dynamically Patching Django/Python Using GDB

81 points| ebroder | 13 years ago |stripe.com | reply

11 comments

order
[+] robbles|13 years ago|reply
Couldn't you do almost the exact same thing using pdb, without all the C API / register stuff?

Maybe I misunderstood the post, but it sounds like you're just stopping right before the request returns, reloading the module, generating a new response, and allowing execution to continue.

Why is GDB required for any of this?

[+] ebroder|13 years ago|reply
You're right! You could do all of this with pdb, but only if you have enough foresight to run the app under pdb to begin with (which I definitely never do).

Using GDB, you don't have to change the app or remember to run it in a particular way.

[+] pc|13 years ago|reply
I've always missed this feature from Seaside/Smalltalk. (Not to mention having a proper language-level debugger at your disposal.)
[+] agumonkey|13 years ago|reply
nice use of cpython knowledge. very black magic, but very usefull in time.