diff options
author | Johnny Chen <johnny.chen@apple.com> | 2011-07-18 22:11:53 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2011-07-18 22:11:53 +0000 |
commit | 0eca544b45077805748f23c720890152dc2d1141 (patch) | |
tree | d604affd88ed63e83b5e9c637ad0480c8b9eadff /lldb/scripts/Python/interface/SBCompileUnit.i | |
parent | 7a16288157efc5fb85fbe3b8b4c37071da7609a6 (diff) | |
download | bcm5719-llvm-0eca544b45077805748f23c720890152dc2d1141.tar.gz bcm5719-llvm-0eca544b45077805748f23c720890152dc2d1141.zip |
Add SWIG Python interface files for SBDebugger, SBCompileUnit, and SBEvent.
llvm-svn: 135432
Diffstat (limited to 'lldb/scripts/Python/interface/SBCompileUnit.i')
-rw-r--r-- | lldb/scripts/Python/interface/SBCompileUnit.i | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/lldb/scripts/Python/interface/SBCompileUnit.i b/lldb/scripts/Python/interface/SBCompileUnit.i new file mode 100644 index 00000000000..8a2e88569e4 --- /dev/null +++ b/lldb/scripts/Python/interface/SBCompileUnit.i @@ -0,0 +1,70 @@ +//===-- SWIG Interface for SBCompileUnit ------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +namespace lldb { + +%feature("docstring", +"Represents a compilation unit, or compiled source file. + +SBCompileUnit supports line entry iteration. For example, + + for lineEntry in compileUnit: + print 'line entry: %s:%d' % (str(lineEntry.GetFileSpec()), + lineEntry.GetLine()) + print 'start addr: %s' % str(lineEntry.GetStartAddress()) + print 'end addr: %s' % str(lineEntry.GetEndAddress()) + +produces: + +line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:20 +start addr: a.out[0x100000d98] +end addr: a.out[0x100000da3] +line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:21 +start addr: a.out[0x100000da3] +end addr: a.out[0x100000da9] +line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:22 +start addr: a.out[0x100000da9] +end addr: a.out[0x100000db6] +line entry: /Volumes/data/lldb/svn/trunk/test/python_api/symbol-context/main.c:23 +start addr: a.out[0x100000db6] +end addr: a.out[0x100000dbc] +... +") SBCompileUnit; +class SBCompileUnit +{ +public: + + SBCompileUnit (); + + SBCompileUnit (const lldb::SBCompileUnit &rhs); + + ~SBCompileUnit (); + + bool + IsValid () const; + + lldb::SBFileSpec + GetFileSpec () const; + + uint32_t + GetNumLineEntries () const; + + lldb::SBLineEntry + GetLineEntryAtIndex (uint32_t idx) const; + + uint32_t + FindLineEntryIndex (uint32_t start_idx, + uint32_t line, + lldb::SBFileSpec *inline_file_spec) const; + + bool + GetDescription (lldb::SBStream &description); +}; + +} // namespace lldb |