python core dump

Quinn Dunkan quinn at lira.ugcs.caltech.edu
Sat Mar 25 02:18:47 CET 2000


No, I don't mean the interpreter crashed (although, re that seek(-4, -4) thing
a while back, I noticed that the Irix lseek(2) man page specifically says the
process gets SIGSYS in addition to EINVAL.  So perhaps python should have an
#ifdef IRIX or something to catch that SIGSYS).

What I mean is something where you could wrap your whole program in a

try:
    main()
except:
    dump_core(prog_name + '.core', sys.exc_info())
    raise

and dump_core() would then pickle the state of the program at the time the
exception was thrown.  Then you could run pdb on the core later, and grope
around to see what went wrong.

Is this possible?  Has someone done something like this?



More information about the Python-list mailing list