trepan/processor/cmdproc.py
def get_stack(f, t, botframe, proc_obj=None):
    """Return a stack of frames which the debugger will use for in
    showing backtraces and in frame switching. As such various frame
    that are really around may be excluded unless we are debugging the
    sebugger. Also we will add traceback frame on top if that
    exists."""
    exclude_frame = lambda f: False
    if proc_obj:
        settings = proc_obj.debugger.settings
        if not settings['dbg_trepan']:
            exclude_frame = lambda f: \
                proc_obj.core.ignore_filter.is_included(f)
            pass
        pass
    stack = []
    if t and t.tb_frame is f:
        t = t.tb_next
    while f is not None:
        if exclude_frame(f): break  # See commented alternative below
        stack.append((f, f.f_lineno))
        # bdb has:
        # if f is botframe: break
        f = f.f_back
        pass
    stack.reverse()
    i = max(0, len(stack) - 1)
    while t is not None:
        stack.append((t.tb_frame, t.tb_lineno))
        t = t.tb_next
        pass
    return stack, i
def get_stack(f, t, botframe, proc_obj=None):
    exclude_frame = lambda f: False
    if proc_obj:
        settings = proc_obj.debugger.settings
        if not settings['dbg_trepan']:
            exclude_frame = lambda f: \
                proc_obj.core.ignore_filter.is_included(f)
            pass
        pass
    stack = []
    if t and t.tb_frame is f:
        t = t.tb_next
    while f is not None:
        if exclude_frame(f): break  # See commented alternative below
        stack.append((f, f.f_lineno))
        # bdb has:
        # if f is botframe: break
        f = f.f_back
        pass
    stack.reverse()
    i = max(0, len(stack) - 1)
    while t is not None:
        stack.append((t.tb_frame, t.tb_lineno))
        t = t.tb_next
        pass
    return stack, i
def get_stack ( f , t , botframe , proc_obj = None ) : exclude_frame = lambda f : False if proc_obj : settings = proc_obj . debugger . settings if not settings [ 'dbg_trepan' ] : exclude_frame = lambda f : proc_obj . core . ignore_filter . is_included ( f ) pass pass stack = [ ] if t and t . tb_frame is f : t = t . tb_next while f is not None : if exclude_frame ( f ) : break # See commented alternative below stack . append ( ( f , f . f_lineno ) ) # bdb has: # if f is botframe: break f = f . f_back pass stack . reverse ( ) i = max ( 0 , len ( stack ) - 1 ) while t is not None : stack . append ( ( t . tb_frame , t . tb_lineno ) ) t = t . tb_next pass return stack , i
Return a stack of frames which the debugger will use for in
    showing backtraces and in frame switching. As such various frame
    that are really around may be excluded unless we are debugging the
    sebugger. Also we will add traceback frame on top if that
    exists.
Return a stack of frames which the debugger will use for in showing backtraces and in frame switching . As such various frame that are really around may be excluded unless we are debugging the sebugger . Also we will add traceback frame on top if that exists .