brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.4 KiB · a9538f5 Raw
66 lines · plain
1%feature("docstring",2"Represents a compilation unit, or compiled source file.3 4SBCompileUnit supports line entry iteration. For example,::5 6    # Now get the SBSymbolContext from this frame.  We want everything. :-)7    context = frame0.GetSymbolContext(lldb.eSymbolContextEverything)8    ...9 10    compileUnit = context.GetCompileUnit()11 12    for lineEntry in compileUnit:13        print('line entry: %s:%d' % (str(lineEntry.GetFileSpec()),14                                    lineEntry.GetLine()))15        print('start addr: %s' % str(lineEntry.GetStartAddress()))16        print('end   addr: %s' % str(lineEntry.GetEndAddress()))17 18produces: ::19 20  line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:2021  start addr: a.out[0x100000d98]22  end   addr: a.out[0x100000da3]23  line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:2124  start addr: a.out[0x100000da3]25  end   addr: a.out[0x100000da9]26  line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:2227  start addr: a.out[0x100000da9]28  end   addr: a.out[0x100000db6]29  line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:2330  start addr: a.out[0x100000db6]31  end   addr: a.out[0x100000dbc]32  ...33 34See also :py:class:`SBSymbolContext` and :py:class:`SBLineEntry`"35) lldb::SBCompileUnit;36 37%feature("docstring", "38     Get the index for a provided line entry in this compile unit.39 40     @param[in] line_entry41        The SBLineEntry object for which we are looking for the index.42 43     @param[in] exact44        An optional boolean defaulting to false that ensures that the provided45        line entry has a perfect match in the compile unit.46 47     @return48        The index of the user-provided line entry. UINT32_MAX if the line entry49        was not found in the compile unit.") lldb::SBCompileUnit::FindLineEntryIndex;50 51%feature("docstring", "52     Get all types matching type_mask from debug info in this53     compile unit.54 55     @param[in] type_mask56        A bitfield that consists of one or more bits logically OR'ed57        together from the lldb::TypeClass enumeration. This allows58        you to request only structure types, or only class, struct59        and union types. Passing in lldb::eTypeClassAny will return60        all types found in the debug information for this compile61        unit.62 63     @return64        A list of types in this compile unit that match type_mask"65) lldb::SBCompileUnit::GetTypes;66