Johnny Chen | fb35e2a | 2011-07-18 23:11:07 +0000 | [diff] [blame] | 1 | //===-- 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 | |
| 10 | namespace lldb { |
| 11 | |
| 12 | %feature("docstring", |
| 13 | "Specifies an association with a contiguous range of instructions and |
Johnny Chen | 19334f4 | 2011-07-27 18:28:07 +0000 | [diff] [blame] | 14 | a source file location. SBCompileUnit contains SBLineEntry(s). For example, |
Johnny Chen | fb35e2a | 2011-07-18 23:11:07 +0000 | [diff] [blame] | 15 | |
Johnny Chen | 19334f4 | 2011-07-27 18:28:07 +0000 | [diff] [blame] | 16 | 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 | |
| 22 | produces: |
| 23 | |
| 24 | line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:20 |
| 25 | start addr: a.out[0x100000d98] |
| 26 | end addr: a.out[0x100000da3] |
| 27 | line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:21 |
| 28 | start addr: a.out[0x100000da3] |
| 29 | end addr: a.out[0x100000da9] |
| 30 | line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:22 |
| 31 | start addr: a.out[0x100000da9] |
| 32 | end addr: a.out[0x100000db6] |
| 33 | line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:23 |
| 34 | start addr: a.out[0x100000db6] |
| 35 | end addr: a.out[0x100000dbc] |
| 36 | ... |
| 37 | |
| 38 | See also SBCompileUnit." |
Johnny Chen | fb35e2a | 2011-07-18 23:11:07 +0000 | [diff] [blame] | 39 | ) SBLineEntry; |
| 40 | class SBLineEntry |
| 41 | { |
| 42 | public: |
| 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); |
| 70 | }; |
| 71 | |
| 72 | } // namespace lldb |