This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author thomasvs
Recipients gregory.p.smith, skip.montanaro, thomasvs, vstinner
Date 2010-10-17.16:04:58
SpamBayes Score 2.967112e-10
Marked as misclassified No
Message-id <1287331500.85.0.0260347816702.issue3631@psf.upfronthosting.co.za>
In-reply-to
Content
It's too bad this is closed out of date because
 a) the macro is still there being distributed
 b) it simply hangs!
 c) there's no easy way to figure out that you should be using something else instead.

I spent a few hours of my life figuring out why it fails and writing an alternative implementation that works for me.

Instead of just closing this ticket, something should be done about the distributions of python so that they don't suggest something that you consider outdated and doesn't actually work.

Here's my working version, for reference:

# THOMAS: the test for between Py_Main and Py_GetArgcArgv is because
# code is in that order in the C file; see Modules/main.c and its comment
# print the entire Python call stack
# same for eval in Python/ceval.c

# in 2.6, PyEval_EvalFrame is only bw compatible, and code now calls
# PyEval_EvalFrameEx
define pystack
    set $__lastpc = $pc
    set $__same = -1
     
    while 1 == 1
	# select the highest frame with the same $pc
	# this will automatically terminate if we reach the top
        while $pc == $__lastpc
            up-silently
        end
        down-silently

        if $pc > PyEval_EvalFrameEx && $pc < PyEval_EvalCodeEx
	    pyframe
        else
            # frame
        end
        up-silently 1
        set $__lastpc = $pc

    end
    select-frame 0
end
History
Date User Action Args
2010-10-17 16:05:01thomasvssetrecipients: + thomasvs, skip.montanaro, gregory.p.smith, vstinner
2010-10-17 16:05:00thomasvssetmessageid: <1287331500.85.0.0260347816702.issue3631@psf.upfronthosting.co.za>
2010-10-17 16:04:59thomasvslinkissue3631 messages
2010-10-17 16:04:58thomasvscreate