Debugging confusion -- too many stacks!

Jason Stokes jstok at bluedog.apana.org.au
Sat Apr 1 11:20:19 CEST 2000


I'm confused about the difference between the C stack, the Frame stack, and
the stack *inside* each execution frame.

>From reading the source, I believe that each new code object gets a new
frame allocated on the frame stack, within which is stored all kinds of
useful information about the context the code is executing in -- the global
and local environment, a tuple of constants, a tuple of arguments etc.
*Within* each frame is *another* stack, upon which the Python virtual
machine loads and manipulates intermediate values.

However, I'm not sure what the terminology is to refer to this third stack.
Understanding the distinction seems to be vital to using pdb, though.





More information about the Python-list mailing list