blob: 488bbc81676cdbf19b54ff086e4c6bbb3095d391 [file] [log] [blame]
Johnny Chenfdc4a862011-07-19 22:41:47 +00001//===-- SWIG Interface for SBInstructionList --------------------*- 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#include <stdio.h>
11
12namespace lldb {
13
Johnny Chen3a315732011-07-21 00:48:02 +000014%feature("docstring",
15"Represents a list of machine instructions. SBFunction and SBSymbol have
16GetInstructions() methods which return SBInstructionList instances.
17
18SBInstructionList supports instruction (SBInstruction instance) iteration.
19For example (see also SBDebugger for a more complete example),
20
21def disassemble_instructions (insts):
22 for i in insts:
23 print i
24
Johnny Chenc7ed2232011-07-21 00:50:54 +000025defines a function which takes an SBInstructionList instance and prints out
Johnny Chen3a315732011-07-21 00:48:02 +000026the machine instructions in assembly format."
27) SBInstructionList;
Johnny Chenfdc4a862011-07-19 22:41:47 +000028class SBInstructionList
29{
30public:
31
32 SBInstructionList ();
33
34 SBInstructionList (const SBInstructionList &rhs);
35
36 ~SBInstructionList ();
37
38 bool
39 IsValid () const;
40
41 size_t
42 GetSize ();
43
44 lldb::SBInstruction
45 GetInstructionAtIndex (uint32_t idx);
46
47 void
48 Clear ();
49
50 void
51 AppendInstruction (lldb::SBInstruction inst);
52
53 void
54 Print (FILE *out);
55
56 bool
57 GetDescription (lldb::SBStream &description);
58
59 bool
60 DumpEmulationForAllInstructions (const char *triple);
61};
62
63} // namespace lldb