Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / bindings / interface / SBCompileUnitDocstrings.i
bloba9538f5f63c665fc6492e01bc0cbd31549c9c454
1 %feature("docstring",
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)
8 ...
10 compileUnit = context.GetCompileUnit()
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()))
18 produces: ::
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]
32 ...
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.
40 @param[in] line_entry
41 The SBLineEntry object for which we are looking for the index.
43 @param[in] exact
44 An optional boolean defaulting to false that ensures that the provided
45 line entry has a perfect match in the compile unit.
47 @return
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
53 compile unit.
55 @param[in] type_mask
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
61 unit.
63 @return
64 A list of types in this compile unit that match type_mask"
65 ) lldb::SBCompileUnit::GetTypes;