[Pythonmac-SIG] readline: where and how installed?
Zachary Pincus
zpincus at stanford.edu
Thu Apr 13 05:52:25 CEST 2006
Well, not to keep this thread going on any more than necessary --
though we do still need to hear from Ronald about what version of
readline was used for the Universal MacPython -- but I have a comment.
> I would think that most gdb users already know how to cross an
> execve, but maybe I'm wrong.
I would disagree. You can amass a fairly decent knowledge of gdb
without ever crossing an execve. People doing systems programming
would of course know all about this, but people who develop and debug
pretty exclusively single-process, single-task userland stuff could
spend a whole lot of time in gdb without ever having to deal with
forking, exec, or any of that.
And since normal pythons don't execve on launch, it's even more
confusing because nobody ever expects the spanish execve. Imagine
you're someone like me -- a competent (I hope) graduate student who
has been programming for over six years in C, C++, python and other
crappier languages, but who has never done any systems work. One day
'gdb python' -- useful for tracking down errors in some little
extension module you've made -- reports a SIGTRAP in
__dyld__dyld_start. Googling for 'GDB SIGTRAP' or 'SIGRAP' yields
almost nothing of any value as to understanding what's going on.
It's a fun exercise to try to see if you could figure out what the
"problem" with your program was if all you had to go on was:
> Program received signal SIGTRAP, Trace/breakpoint trap.
> 0x8fe0100c in __dyld__dyld_start ()
without prior knowledge that (a) SIGTRAP is what happens when an
execve happens and the program is being ptrace'd, or (b) that your
copy of python is even doing an execve at all, and that might have
implications for debugging.
All I'm saying is that it might be a good idea to put a few lines in
the README about the execve deal, and its implications for things
like debugging. Because otherwise it could get pretty frustrating for
some folk pretty fast.
Zach
More information about the Pythonmac-SIG
mailing list