[pypy-dev] RE: type problems
Armin Rigo
arigo at tunes.org
Sat Jul 12 23:08:56 MEST 2003
Hello Hunter,
On Thu, Jul 10, 2003 at 05:32:05AM -0700, Hunter Peress wrote:
> That may be a good idea. I am currently hunting down a deeply
> nested Exception problem and knowing which frames get created executing
> which code helps in understanding what's going on. Without lots of
> print-statements this would be very difficult (not that it really gets
> easy :-).
There are several problems with the current way exceptions are printed. For
example the tracebacks are incredibly long. This is due to the fact that a
number of nested interpreter-level calls are needed for each application-level
call. Internally, the OperationError can record which lines in the traceback
correspond to which application-level call; the problem is mainly how to
display it reasonably. Another problem is that application-level frames and
multimethod calls are extremely confusing in the traceback -- you can't even
know which multimethod was called, because they all involve the same code in
multimethod.py.
I would suggest we add debugging commands in the code of pypy; something that
would allow us to build a custom traceback, and also possibly record the call
tree. I'm thinking about explicit "pypy.debug.enter/leave" calls around
multimethod calls and calls to application-level functions.
Customizing pdb also looks like a good idea. Uncaught exceptions should
automatically throw us into our debugger.
A bientot,
Armin.
More information about the pypy-dev
mailing list