brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.1 KiB · f6fb774 Raw
169 lines · plain
1%feature("docstring",2"Represents one of the stack frames associated with a thread.3 4SBThread contains SBFrame(s). For example (from test/lldbutil.py), ::5 6    def print_stacktrace(thread, string_buffer = False):7        '''Prints a simple stack trace of this thread.'''8 9        ...10 11        for i in range(depth):12            frame = thread.GetFrameAtIndex(i)13            function = frame.GetFunction()14 15            load_addr = addrs[i].GetLoadAddress(target)16            if not function:17                file_addr = addrs[i].GetFileAddress()18                start_addr = frame.GetSymbol().GetStartAddress().GetFileAddress()19                symbol_offset = file_addr - start_addr20                print >> output, '  frame #{num}: {addr:#016x} {mod}`{symbol} + {offset}'.format(21                    num=i, addr=load_addr, mod=mods[i], symbol=symbols[i], offset=symbol_offset)22            else:23                print >> output, '  frame #{num}: {addr:#016x} {mod}`{func} at {file}:{line} {args}'.format(24                    num=i, addr=load_addr, mod=mods[i],25                    func='%s [inlined]' % funcs[i] if frame.IsInlined() else funcs[i],26                    file=files[i], line=lines[i],27                    args=get_args_as_string(frame, showFuncName=False) if not frame.IsInlined() else '()')28 29        ...30 31And, ::32 33    for frame in thread:34        print frame35 36See also SBThread."37) lldb::SBFrame;38 39%feature("docstring", "40    Get the Canonical Frame Address for this stack frame.41    This is the DWARF standard's definition of a CFA, a stack address42    that remains constant throughout the lifetime of the function.43    Returns an lldb::addr_t stack address, or LLDB_INVALID_ADDRESS if44    the CFA cannot be determined."45) lldb::SBFrame::GetCFA;46 47%feature("docstring", "48    Gets the deepest block that contains the frame PC.49 50    See also GetFrameBlock()."51) lldb::SBFrame::GetBlock;52 53    %feature("docstring", "54    Get the appropriate function name for this frame. Inlined functions in55    LLDB are represented by Blocks that have inlined function information, so56    just looking at the SBFunction or SBSymbol for a frame isn't enough.57    This function will return the appropriate function, symbol or inlined58    function name for the frame.59 60    This function returns:61    - the name of the inlined function (if there is one)62    - the name of the concrete function (if there is one)63    - the name of the symbol (if there is one)64    - NULL65 66    See also IsInlined()."67) lldb::SBFrame::GetFunctionName;68 69%feature("docstring", "70    Returns the language of the frame's SBFunction, or if there.71    is no SBFunction, guess the language from the mangled name.72    ."73) lldb::SBFrame::GuessLanguage;74 75%feature("docstring", "76    Return true if this frame represents an inlined function.77 78    See also GetFunctionName()."79) lldb::SBFrame::IsInlined;80 81%feature("docstring", "82    Returns an SBValueList which is an array of one or more register83    sets that exist for this thread.  84    Each SBValue in the SBValueList represents one register-set. 85    The first register-set will be the general purpose registers -- 86    the registers printed by the `register read` command-line in lldb, with 87    no additional arguments.  88    The register-set SBValue will have a name, e.g. 89    SBFrame::GetRegisters().GetValueAtIndex(0).GetName() 90    By convention, certain stubs choose to name their general-purpose 91    register-set the 'General Purpose Registers', but that is not required.92    A register-set SBValue will have children, one child per register 93    in the register-set."94) lldb::SBFrame::GetRegisters;95 96%feature("docstring", "97    Return true if this frame is artificial (e.g a frame synthesized to98    capture a tail call). Local variables may not be available in an artificial99    frame."100) lldb::SBFrame::IsArtificial;101 102%feature("docstring", "103    The version that doesn't supply a 'use_dynamic' value will use the104    target's default."105) lldb::SBFrame::EvaluateExpression;106 107%feature("docstring", "108    Gets the lexical block that defines the stack frame. Another way to think109    of this is it will return the block that contains all of the variables110    for a stack frame. Inlined functions are represented as SBBlock objects111    that have inlined function information: the name of the inlined function,112    where it was called from. The block that is returned will be the first113    block at or above the block for the PC (SBFrame::GetBlock()) that defines114    the scope of the frame. When a function contains no inlined functions,115    this will be the top most lexical block that defines the function.116    When a function has inlined functions and the PC is currently117    in one of those inlined functions, this method will return the inlined118    block that defines this frame. If the PC isn't currently in an inlined119    function, the lexical block that defines the function is returned."120) lldb::SBFrame::GetFrameBlock;121 122%feature("docstring", "123    The version that doesn't supply a 'use_dynamic' value will use the124    target's default."125) lldb::SBFrame::GetVariables;126 127%feature("docstring", "128    The version that doesn't supply a 'use_dynamic' value will use the129    target's default."130) lldb::SBFrame::FindVariable;131 132%feature("docstring", "133    Get a lldb.SBValue for a variable path.134 135    Variable paths can include access to pointer or instance members: ::136 137        rect_ptr->origin.y138        pt.x139 140    Pointer dereferences: ::141 142        *this->foo_ptr143        **argv144 145    Address of: ::146 147        &pt148        &my_array[3].x149 150    Array accesses and treating pointers as arrays: ::151 152        int_array[1]153        pt_ptr[22].x154 155    Unlike `EvaluateExpression()` which returns :py:class:`SBValue` objects156    with constant copies of the values at the time of evaluation,157    the result of this function is a value that will continue to158    track the current value of the value as execution progresses159    in the current frame."160) lldb::SBFrame::GetValueForVariablePath;161 162%feature("docstring", "163    Find variables, register sets, registers, or persistent variables using164    the frame as the scope.165 166    The version that doesn't supply a ``use_dynamic`` value will use the167    target's default."168) lldb::SBFrame::FindValue;169