blob: 0fe4e919191c11511177a1253900a6e596347e1a [file] [log] [blame]
Johnny Chenfb35e2a2011-07-18 23:11:07 +00001//===-- SWIG Interface for SBLineEntry --------------------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10namespace lldb {
11
12%feature("docstring",
13"Specifies an association with a contiguous range of instructions and
Johnny Chen19334f42011-07-27 18:28:07 +000014a source file location. SBCompileUnit contains SBLineEntry(s). For example,
Johnny Chenfb35e2a2011-07-18 23:11:07 +000015
Johnny Chen19334f42011-07-27 18:28:07 +000016 for lineEntry in compileUnit:
17 print 'line entry: %s:%d' % (str(lineEntry.GetFileSpec()),
18 lineEntry.GetLine())
19 print 'start addr: %s' % str(lineEntry.GetStartAddress())
20 print 'end addr: %s' % str(lineEntry.GetEndAddress())
21
22produces:
23
24line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:20
25start addr: a.out[0x100000d98]
26end addr: a.out[0x100000da3]
27line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:21
28start addr: a.out[0x100000da3]
29end addr: a.out[0x100000da9]
30line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:22
31start addr: a.out[0x100000da9]
32end addr: a.out[0x100000db6]
33line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:23
34start addr: a.out[0x100000db6]
35end addr: a.out[0x100000dbc]
36...
37
38See also SBCompileUnit."
Johnny Chenfb35e2a2011-07-18 23:11:07 +000039) SBLineEntry;
40class SBLineEntry
41{
42public:
43
44 SBLineEntry ();
45
46 SBLineEntry (const lldb::SBLineEntry &rhs);
47
48 ~SBLineEntry ();
49
50 lldb::SBAddress
51 GetStartAddress () const;
52
53 lldb::SBAddress
54 GetEndAddress () const;
55
56 bool
57 IsValid () const;
58
59 lldb::SBFileSpec
60 GetFileSpec () const;
61
62 uint32_t
63 GetLine () const;
64
65 uint32_t
66 GetColumn () const;
67
68 bool
69 GetDescription (lldb::SBStream &description);
Greg Clayton23b8abb2011-09-26 07:11:27 +000070
71 void
72 SetFileSpec (lldb::SBFileSpec filespec);
73
74 void
75 SetLine (uint32_t line);
76
77 void
78 SetColumn (uint32_t column);
79
Greg Clayton1b925202012-01-29 06:07:39 +000080 %pythoncode %{
81 __swig_getmethods__["file"] = GetFileSpec
Greg Clayton2a94be12012-06-29 22:00:42 +000082 if _newclass: file = property(GetFileSpec, None, doc='''A read only property that returns an lldb object that represents the file (lldb.SBFileSpec) for this line entry.''')
Greg Clayton1b925202012-01-29 06:07:39 +000083
84 __swig_getmethods__["line"] = GetLine
Greg Clayton2a94be12012-06-29 22:00:42 +000085 if _newclass: ling = property(GetLine, None, doc='''A read only property that returns the 1 based line number for this line entry, a return value of zero indicates that no line information is available.''')
Greg Clayton1b925202012-01-29 06:07:39 +000086
87 __swig_getmethods__["column"] = GetColumn
Greg Clayton2a94be12012-06-29 22:00:42 +000088 if _newclass: column = property(GetColumn, None, doc='''A read only property that returns the 1 based column number for this line entry, a return value of zero indicates that no column information is available.''')
Greg Clayton1b925202012-01-29 06:07:39 +000089
Greg Claytonb302dff2012-02-01 08:09:32 +000090 __swig_getmethods__["addr"] = GetStartAddress
Greg Clayton2a94be12012-06-29 22:00:42 +000091 if _newclass: addr = property(GetStartAddress, None, doc='''A read only property that returns an lldb object that represents the start address (lldb.SBAddress) for this line entry.''')
Greg Clayton1b925202012-01-29 06:07:39 +000092
93 __swig_getmethods__["end_addr"] = GetEndAddress
Greg Clayton2a94be12012-06-29 22:00:42 +000094 if _newclass: end_addr = property(GetEndAddress, None, doc='''A read only property that returns an lldb object that represents the end address (lldb.SBAddress) for this line entry.''')
Greg Clayton1b925202012-01-29 06:07:39 +000095
96 %}
97
Johnny Chenfb35e2a2011-07-18 23:11:07 +000098};
99
100} // namespace lldb