blob: 6ea5978baedf2c2aa2f773b5de6b6eea84ddfbd6 [file] [log] [blame]
Johnny Chen349f0762011-07-19 01:07:06 +00001//===-- SWIG Interface for SBSymbolContextList ------------------*- 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"Represents a list of symbol context object. See also SBSymbolContext.
14
15For example (from test/python_api/target/TestTargetAPI.py),
16
17 def find_functions(self, exe_name):
18 '''Exercise SBTaget.FindFunctions() API.'''
19 exe = os.path.join(os.getcwd(), exe_name)
20
21 # Create a target by the debugger.
22 target = self.dbg.CreateTarget(exe)
23 self.assertTrue(target, VALID_TARGET)
24
25 list = lldb.SBSymbolContextList()
26 num = target.FindFunctions('c', lldb.eFunctionNameTypeAuto, False, list)
27 self.assertTrue(num == 1 and list.GetSize() == 1)
28
29 for sc in list:
30 self.assertTrue(sc.GetModule().GetFileSpec().GetFilename() == exe_name)
31 self.assertTrue(sc.GetSymbol().GetName() == 'c')
32") SBSymbolContextList;
33class SBSymbolContextList
34{
35public:
36 SBSymbolContextList ();
37
38 SBSymbolContextList (const lldb::SBSymbolContextList& rhs);
39
40 ~SBSymbolContextList ();
41
42 bool
43 IsValid () const;
44
45 uint32_t
46 GetSize() const;
47
48 SBSymbolContext
49 GetContextAtIndex (uint32_t idx);
50
51 void
52 Clear();
53};
54
55} // namespace lldb