1//===-- SWIG Interface for SBLineEntry --------------------------*- C++ -*-===// 2// 3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4// See https://llvm.org/LICENSE.txt for license information. 5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6// 7//===----------------------------------------------------------------------===// 8 9namespace lldb { 10 11%feature("docstring", 12"Specifies an association with a contiguous range of instructions and 13a source file location. SBCompileUnit contains SBLineEntry(s). For example, 14 15 for lineEntry in compileUnit: 16 print('line entry: %s:%d' % (str(lineEntry.GetFileSpec()), 17 lineEntry.GetLine())) 18 print('start addr: %s' % str(lineEntry.GetStartAddress())) 19 print('end addr: %s' % str(lineEntry.GetEndAddress())) 20 21produces: 22 23line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:20 24start addr: a.out[0x100000d98] 25end addr: a.out[0x100000da3] 26line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:21 27start addr: a.out[0x100000da3] 28end addr: a.out[0x100000da9] 29line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:22 30start addr: a.out[0x100000da9] 31end addr: a.out[0x100000db6] 32line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:23 33start addr: a.out[0x100000db6] 34end addr: a.out[0x100000dbc] 35... 36 37See also SBCompileUnit." 38) SBLineEntry; 39class SBLineEntry 40{ 41public: 42 43 SBLineEntry (); 44 45 SBLineEntry (const lldb::SBLineEntry &rhs); 46 47 ~SBLineEntry (); 48 49 lldb::SBAddress 50 GetStartAddress () const; 51 52 lldb::SBAddress 53 GetEndAddress () const; 54 55 bool 56 IsValid () const; 57 58 explicit operator bool() const; 59 60 lldb::SBFileSpec 61 GetFileSpec () const; 62 63 uint32_t 64 GetLine () const; 65 66 uint32_t 67 GetColumn () const; 68 69 bool 70 GetDescription (lldb::SBStream &description); 71 72 void 73 SetFileSpec (lldb::SBFileSpec filespec); 74 75 void 76 SetLine (uint32_t line); 77 78 void 79 SetColumn (uint32_t column); 80 81 bool 82 operator == (const lldb::SBLineEntry &rhs) const; 83 84 bool 85 operator != (const lldb::SBLineEntry &rhs) const; 86 87 STRING_EXTENSION(SBLineEntry) 88 89#ifdef SWIGPYTHON 90 %pythoncode %{ 91 file = property(GetFileSpec, None, doc='''A read only property that returns an lldb object that represents the file (lldb.SBFileSpec) for this line entry.''') 92 line = 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.''') 93 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.''') 94 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.''') 95 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.''') 96 %} 97#endif 98}; 99 100} // namespace lldb 101