Sections
Timeline
Browse Source
New Ticket
Sub-Sections
Download
Comma-delimited Text
Tab-delimited Text
RSS Feed
Metanav
Preferences
About Trac
Links
Slowchop Studios
Gerald Kaszuba
Advertisement

Ticket #5 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Not registering 'return'

Reported by: pcg@… Owned by: gak
Priority: major Component: general
Version: 0.3.0 Keywords:
Cc:

Description

The callgraphs I generated looked wrong. It turns out that the tracer function needs to return a tracer to be used in each local scope! (See http://www.python.org/doc/2.3.4/lib/debugger-hooks.html#debugger-hooks)

I added a line to tracer, to return itself. That seemed to work:

def tracer(frame, event, arg):
    ................
    if event == 'return':
        if pr: print 'return'
        if call_stack:
            call_stack.pop(-1)
    return tracer   #new

Attachments

foo.diff (386 bytes) - added by anonymous 2 years ago.
A nice (overkill) diff of the above mentioned fix…

Change History

Changed 2 years ago by mig000

yepp, same problem with the same solution

Changed 2 years ago by anonymous

A nice (overkill) diff of the above mentioned fix...

Changed 2 years ago by gak

  • status changed from new to closed
  • resolution set to fixed

Add/Change #5 (Not registering 'return')

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.