xref: /freebsd/contrib/llvm-project/lldb/bindings/interface/SBCompileUnitDocstrings.i (revision 06c3fb2749bda94cb5201f81ffdb8fa6c3161b2e)
1 %feature("docstring",
2 "Represents a compilation unit, or compiled source file.
3 
4 SBCompileUnit 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 
18 produces: ::
19 
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   ...
33 
34 See 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_entry
41         The SBLineEntry object for which we are looking for the index.
42 
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.
46 
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;
50 
51 %feature("docstring", "
52      Get all types matching type_mask from debug info in this
53      compile unit.
54 
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.
62 
63      @return
64         A list of types in this compile unit that match type_mask"
65 ) lldb::SBCompileUnit::GetTypes;
66