trepan/processor/command/frame.py
def find_and_set_debugged_frame(self, frame, thread_id):
        '''The dance we have to do to set debugger frame state to
        *frame*, which is in the thread with id *thread_id*. We may
        need to the hide initial debugger frames.
        '''
        thread = threading._active[thread_id]
        thread_name = thread.getName()
        if (not self.settings['dbg_trepan'] and
            thread_name == Mthread.current_thread_name()):
            # The frame we came in on ('current_thread_name') is
            # the same as the one we want to switch to. In this case
            # we need to some debugger frames are in this stack so
            # we need to remove them.
            newframe = Mthread.find_debugged_frame(frame)
            if newframe is not None:  frame = newframe
            pass
        # FIXME: else: we might be blocked on other threads which are
        # about to go into the debugger it not for the fact this one got there
        # first. Possibly in the future we want
        # to hide the blocks into threading of that locking code as well.

        # Set stack to new frame
        self.stack, self.curindex = Mcmdproc.get_stack(frame, None,
                                                       self.proc)
        self.proc.stack, self.proc.curindex = self.stack, self.curindex
        self.proc.frame_thread_name = thread_name
        return
def find_and_set_debugged_frame(self, frame, thread_id):
        '''The dance we have to do to set debugger frame state to
        *frame*, which is in the thread with id *thread_id*. We may
        need to the hide initial debugger frames.
        '''
        thread = threading._active[thread_id]
        thread_name = thread.getName()
        if (not self.settings['dbg_trepan'] and
            thread_name == Mthread.current_thread_name()):
            # The frame we came in on ('current_thread_name') is
            # the same as the one we want to switch to. In this case
            # we need to some debugger frames are in this stack so
            # we need to remove them.
            newframe = Mthread.find_debugged_frame(frame)
            if newframe is not None:  frame = newframe
            pass
        # FIXME: else: we might be blocked on other threads which are
        # about to go into the debugger it not for the fact this one got there
        # first. Possibly in the future we want
        # to hide the blocks into threading of that locking code as well.

        # Set stack to new frame
        self.stack, self.curindex = Mcmdproc.get_stack(frame, None,
                                                       self.proc)
        self.proc.stack, self.proc.curindex = self.stack, self.curindex
        self.proc.frame_thread_name = thread_name
        return
def find_and_set_debugged_frame ( self , frame , thread_id ) : thread = threading . _active [ thread_id ] thread_name = thread . getName ( ) if ( not self . settings [ 'dbg_trepan' ] and thread_name == Mthread . current_thread_name ( ) ) : # The frame we came in on ('current_thread_name') is # the same as the one we want to switch to. In this case # we need to some debugger frames are in this stack so # we need to remove them. newframe = Mthread . find_debugged_frame ( frame ) if newframe is not None : frame = newframe pass # FIXME: else: we might be blocked on other threads which are # about to go into the debugger it not for the fact this one got there # first. Possibly in the future we want # to hide the blocks into threading of that locking code as well. # Set stack to new frame self . stack , self . curindex = Mcmdproc . get_stack ( frame , None , self . proc ) self . proc . stack , self . proc . curindex = self . stack , self . curindex self . proc . frame_thread_name = thread_name return
The dance we have to do to set debugger frame state to
        *frame*, which is in the thread with id *thread_id*. We may
        need to the hide initial debugger frames.
The dance we have to do to set debugger frame state to * frame * which is in the thread with id * thread_id * . We may need to the hide initial debugger frames .