2 "Represents a compilation unit, or compiled source file.
4 SBCompileUnit supports line entry iteration. For example,::
6 # Now get the SBSymbolContext from this frame. We want everything. :-)
7 context = frame0.GetSymbolContext(lldb.eSymbolContextEverything)
10 compileUnit = context.GetCompileUnit()
12 for lineEntry in compileUnit:
13 print('line entry: %s:%d' % (str(lineEntry.GetFileSpec()),
15 print('start addr: %s' % str(lineEntry.GetStartAddress()))
16 print('end addr: %s' % str(lineEntry.GetEndAddress()))
20 line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:20
21 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:21
24 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:22
27 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:23
30 start addr: a.out[0x100000db6]
31 end addr: a.out[0x100000dbc]
34 See also :py:class:`SBSymbolContext` and :py:class:`SBLineEntry`"
35 ) lldb
::SBCompileUnit
;
37 %feature
("docstring", "
38 Get the index for a provided line entry in this compile unit.
41 The SBLineEntry object for which we are looking for the index.
44 An optional boolean defaulting to false that ensures that the provided
45 line entry has a perfect match in the compile unit.
48 The index of the user-provided line entry. UINT32_MAX if the line entry
49 was not found in the compile unit.") lldb
::SBCompileUnit
::FindLineEntryIndex
;
51 %feature
("docstring", "
52 Get all types matching type_mask from debug info in this
56 A bitfield that consists of one or more bits logically OR'ed
57 together from the lldb::TypeClass enumeration. This allows
58 you to request only structure types, or only class, struct
59 and union types. Passing in lldb::eTypeClassAny will return
60 all types found in the debug information for this compile
64 A list of types in this compile unit that match type_mask"
65 ) lldb
::SBCompileUnit
::GetTypes
;