blob: e60c6089bcfbb877bafa19cd79911fe3af2b72f7 [file] [log] [blame]
Chris Lattner30fdc8d2010-06-08 16:52:24 +00001/*
2 lldb.swig
3
Chris Lattner30fdc8d2010-06-08 16:52:24 +00004 This is the input file for SWIG, to create the appropriate C++ wrappers and
5 functions for various scripting languages, to enable them to call the
6 liblldb Script Bridge functions.
Chris Lattner30fdc8d2010-06-08 16:52:24 +00007*/
8
Johnny Chenee481782011-06-30 21:29:50 +00009/* Define our module docstring. */
10%define DOCSTRING
11"The lldb module contains the public APIs for Python binding.
Chris Lattner30fdc8d2010-06-08 16:52:24 +000012
Johnny Chenee481782011-06-30 21:29:50 +000013Some of the important classes are describe here:
14
15o SBTarget: Represents the target program running under the debugger.
16o SBProcess: Represents the process associated with the target program.
17o SBThread: Represents a thread of execution. SBProcess contains SBThread(s).
18o SBFrame: Represents one of the stack frames associated with a thread. SBThread
19 contains SBFrame(s).
20o SBSymbolContext: A container that stores various debugger related info.
21o SBValue: Represents the value of a variable, a register, or an expression.
22o SBModule: Represents an executable image and its associated object and symbol
Johnny Chen4036b582011-07-14 21:32:11 +000023 files. SBTarget conatins SBModule(s).
24o SBBreakpoint: Represents a logical breakpoint and its associated settings.
25 SBTarget conatins SBBreakpoint(s).
Johnny Chen993f2b62011-07-14 21:23:24 +000026o SBSymbol: Represents the symbol possibly associated with a stack frame.
Johnny Chenee481782011-06-30 21:29:50 +000027o SBCompileUnit: Represents a compilation unit, or compiled source file.
28o SBFunction: Represents a generic function, which can be inlined or not.
29o SBBlock: Represents a lexical block. SBFunction contains SBBlock(s).
30o SBLineEntry: Specifies an association with a contiguous range of instructions
Johnny Chen61abb2a2011-07-01 18:39:47 +000031 and a source file location. SBCompileUnit contains SBLineEntry(s)."
Johnny Chenee481782011-06-30 21:29:50 +000032%enddef
33
Johnny Chen9ffc9f72011-07-16 21:27:36 +000034// The name of the module to be created.
Johnny Chenee481782011-06-30 21:29:50 +000035%module(docstring=DOCSTRING) lldb
36
Johnny Chen9ffc9f72011-07-16 21:27:36 +000037// Parameter types will be used in the autodoc string.
38%feature("autodoc", "1");
Chris Lattner30fdc8d2010-06-08 16:52:24 +000039
Greg Clayton6b2bd932012-02-01 08:09:32 +000040%pythoncode%{
41import uuid
42import re
43import os
44%}
Johnny Chen11346d32011-07-26 19:09:03 +000045%include "./Python/python-typemaps.swig"
Greg Claytonca512b32011-01-14 04:54:56 +000046
Greg Claytonc0cc73e2010-06-12 15:34:20 +000047/* The liblldb header files to be included. */
Chris Lattner30fdc8d2010-06-08 16:52:24 +000048%{
Greg Claytone0d378b2011-03-24 21:19:54 +000049#include "lldb/lldb-public.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000050#include "lldb/API/SBAddress.h"
51#include "lldb/API/SBBlock.h"
52#include "lldb/API/SBBreakpoint.h"
53#include "lldb/API/SBBreakpointLocation.h"
54#include "lldb/API/SBBroadcaster.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000055#include "lldb/API/SBCommandInterpreter.h"
56#include "lldb/API/SBCommandReturnObject.h"
Greg Clayton05faeb72010-10-07 04:19:01 +000057#include "lldb/API/SBCommunication.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000058#include "lldb/API/SBCompileUnit.h"
Enrico Granata9128ee22011-09-06 19:20:51 +000059#include "lldb/API/SBData.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000060#include "lldb/API/SBDebugger.h"
61#include "lldb/API/SBError.h"
62#include "lldb/API/SBEvent.h"
Johnny Chen23fd10c2010-08-27 22:35:26 +000063#include "lldb/API/SBFileSpec.h"
Jim Ingham969795f2011-09-21 01:17:13 +000064#include "lldb/API/SBFileSpecList.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000065#include "lldb/API/SBFrame.h"
66#include "lldb/API/SBFunction.h"
Greg Clayton05faeb72010-10-07 04:19:01 +000067#include "lldb/API/SBHostOS.h"
68#include "lldb/API/SBInputReader.h"
Greg Clayton1d273162010-10-06 03:09:58 +000069#include "lldb/API/SBInstruction.h"
70#include "lldb/API/SBInstructionList.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000071#include "lldb/API/SBLineEntry.h"
72#include "lldb/API/SBListener.h"
73#include "lldb/API/SBModule.h"
74#include "lldb/API/SBProcess.h"
Greg Claytoncac9c5f2011-09-24 00:52:29 +000075#include "lldb/API/SBSection.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000076#include "lldb/API/SBSourceManager.h"
Caroline Ticedde9cff2010-09-20 05:20:02 +000077#include "lldb/API/SBStream.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000078#include "lldb/API/SBStringList.h"
79#include "lldb/API/SBSymbol.h"
80#include "lldb/API/SBSymbolContext.h"
Greg Clayton05faeb72010-10-07 04:19:01 +000081#include "lldb/API/SBSymbolContextList.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000082#include "lldb/API/SBTarget.h"
83#include "lldb/API/SBThread.h"
84#include "lldb/API/SBType.h"
85#include "lldb/API/SBValue.h"
Caroline Tice77404122010-09-22 16:41:52 +000086#include "lldb/API/SBValueList.h"
Greg Clayton1b282f92011-10-13 18:08:26 +000087#include "lldb/API/SBWatchpoint.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000088%}
89
90/* Various liblldb typedefs that SWIG needs to know about. */
Johnny Chen4b332092010-12-16 00:01:06 +000091#define __extension__ /* Undefine GCC keyword to make Swig happy when processing glibc's stdint.h. */
Greg Clayton05faeb72010-10-07 04:19:01 +000092%include <stdint.h>
93%include "lldb/lldb-defines.h"
94%include "lldb/lldb-enumerations.h"
95%include "lldb/lldb-forward.h"
Greg Clayton05faeb72010-10-07 04:19:01 +000096%include "lldb/lldb-types.h"
Johnny Chen349f0762011-07-19 01:07:06 +000097
Johnny Chenfdc4a862011-07-19 22:41:47 +000098/* Forward declaration of SB classes. */
Johnny Chen0f519682011-07-19 21:49:34 +000099%include "lldb/API/SBDefines.h"
Johnny Chen0f519682011-07-19 21:49:34 +0000100
101/* Python interface files with docstrings. */
102%include "./Python/interface/SBAddress.i"
103%include "./Python/interface/SBBlock.i"
104%include "./Python/interface/SBBreakpoint.i"
105%include "./Python/interface/SBBreakpointLocation.i"
Johnny Chenfdc4a862011-07-19 22:41:47 +0000106%include "./Python/interface/SBBroadcaster.i"
107%include "./Python/interface/SBCommandInterpreter.i"
108%include "./Python/interface/SBCommandReturnObject.i"
109%include "./Python/interface/SBCommunication.i"
Johnny Chen0f519682011-07-19 21:49:34 +0000110%include "./Python/interface/SBCompileUnit.i"
Enrico Granata9128ee22011-09-06 19:20:51 +0000111%include "./Python/interface/SBData.i"
Johnny Chen0f519682011-07-19 21:49:34 +0000112%include "./Python/interface/SBDebugger.i"
Johnny Chenfdc4a862011-07-19 22:41:47 +0000113%include "./Python/interface/SBError.i"
Johnny Chen0f519682011-07-19 21:49:34 +0000114%include "./Python/interface/SBEvent.i"
Johnny Chenfdc4a862011-07-19 22:41:47 +0000115%include "./Python/interface/SBFileSpec.i"
Jim Ingham969795f2011-09-21 01:17:13 +0000116%include "./Python/interface/SBFileSpecList.i"
Johnny Chen0f519682011-07-19 21:49:34 +0000117%include "./Python/interface/SBFrame.i"
118%include "./Python/interface/SBFunction.i"
Johnny Chenfdc4a862011-07-19 22:41:47 +0000119%include "./Python/interface/SBHostOS.i"
120%include "./Python/interface/SBInputReader.i"
121%include "./Python/interface/SBInstruction.i"
122%include "./Python/interface/SBInstructionList.i"
Johnny Chenf74cb502011-07-18 23:11:07 +0000123%include "./Python/interface/SBLineEntry.i"
124%include "./Python/interface/SBListener.i"
125%include "./Python/interface/SBModule.i"
Johnny Chen357033b2011-07-18 20:13:38 +0000126%include "./Python/interface/SBProcess.i"
Greg Claytoncac9c5f2011-09-24 00:52:29 +0000127%include "./Python/interface/SBSection.i"
Johnny Chenfdc4a862011-07-19 22:41:47 +0000128%include "./Python/interface/SBSourceManager.i"
129%include "./Python/interface/SBStream.i"
130%include "./Python/interface/SBStringList.i"
Johnny Chen349f0762011-07-19 01:07:06 +0000131%include "./Python/interface/SBSymbol.i"
132%include "./Python/interface/SBSymbolContext.i"
133%include "./Python/interface/SBSymbolContextList.i"
Johnny Chendc7d3c12011-07-16 21:15:39 +0000134%include "./Python/interface/SBTarget.i"
Johnny Chen357033b2011-07-18 20:13:38 +0000135%include "./Python/interface/SBThread.i"
Johnny Chenfdc4a862011-07-19 22:41:47 +0000136%include "./Python/interface/SBType.i"
Johnny Chen67ae7bd2011-07-18 19:08:30 +0000137%include "./Python/interface/SBValue.i"
138%include "./Python/interface/SBValueList.i"
Greg Clayton1b282f92011-10-13 18:08:26 +0000139%include "./Python/interface/SBWatchpoint.i"
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000140
Caroline Ticedac97f32010-09-22 23:01:29 +0000141%include "./Python/python-extensions.swig"
Caroline Tice18474c92010-09-27 18:00:20 +0000142
Johnny Chen11346d32011-07-26 19:09:03 +0000143%include "./Python/python-wrapper.swig"