blob: fec05bb42b4e61929d3f5f93352da9718db86855 [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
Jason Molenda8c713372013-11-05 11:00:35 +000013Some of the important classes are described here:
Johnny Chenee481782011-06-30 21:29:50 +000014
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
Sean Callananecb20882012-08-09 00:53:54 +000047/* C++ headers to be included. */
48%{
49#include <string>
50%}
51
Greg Claytonc0cc73e2010-06-12 15:34:20 +000052/* The liblldb header files to be included. */
Chris Lattner30fdc8d2010-06-08 16:52:24 +000053%{
Greg Claytone0d378b2011-03-24 21:19:54 +000054#include "lldb/lldb-public.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000055#include "lldb/API/SBAddress.h"
56#include "lldb/API/SBBlock.h"
57#include "lldb/API/SBBreakpoint.h"
58#include "lldb/API/SBBreakpointLocation.h"
59#include "lldb/API/SBBroadcaster.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000060#include "lldb/API/SBCommandInterpreter.h"
61#include "lldb/API/SBCommandReturnObject.h"
Greg Clayton05faeb72010-10-07 04:19:01 +000062#include "lldb/API/SBCommunication.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000063#include "lldb/API/SBCompileUnit.h"
Enrico Granata9128ee22011-09-06 19:20:51 +000064#include "lldb/API/SBData.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000065#include "lldb/API/SBDebugger.h"
Enrico Granata10de0902012-10-10 22:54:17 +000066#include "lldb/API/SBDeclaration.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000067#include "lldb/API/SBError.h"
68#include "lldb/API/SBEvent.h"
Jim Ingham35e1bda2012-10-16 21:41:58 +000069#include "lldb/API/SBExpressionOptions.h"
Johnny Chen23fd10c2010-08-27 22:35:26 +000070#include "lldb/API/SBFileSpec.h"
Jim Ingham969795f2011-09-21 01:17:13 +000071#include "lldb/API/SBFileSpecList.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000072#include "lldb/API/SBFrame.h"
73#include "lldb/API/SBFunction.h"
Greg Clayton05faeb72010-10-07 04:19:01 +000074#include "lldb/API/SBHostOS.h"
Greg Clayton1d273162010-10-06 03:09:58 +000075#include "lldb/API/SBInstruction.h"
76#include "lldb/API/SBInstructionList.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000077#include "lldb/API/SBLineEntry.h"
78#include "lldb/API/SBListener.h"
79#include "lldb/API/SBModule.h"
Greg Clayton226cce22013-07-08 22:22:41 +000080#include "lldb/API/SBModuleSpec.h"
Greg Claytonfbb76342013-11-20 21:07:01 +000081#include "lldb/API/SBPlatform.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000082#include "lldb/API/SBProcess.h"
Jason Molenda5e8dce42013-12-13 00:29:16 +000083#include "lldb/API/SBQueue.h"
84#include "lldb/API/SBQueueItem.h"
Greg Claytoncac9c5f2011-09-24 00:52:29 +000085#include "lldb/API/SBSection.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000086#include "lldb/API/SBSourceManager.h"
Caroline Ticedde9cff2010-09-20 05:20:02 +000087#include "lldb/API/SBStream.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000088#include "lldb/API/SBStringList.h"
89#include "lldb/API/SBSymbol.h"
90#include "lldb/API/SBSymbolContext.h"
Greg Clayton05faeb72010-10-07 04:19:01 +000091#include "lldb/API/SBSymbolContextList.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000092#include "lldb/API/SBTarget.h"
93#include "lldb/API/SBThread.h"
Kuba Breckaa5ea1e22014-09-06 01:21:19 +000094#include "lldb/API/SBThreadCollection.h"
Jim Ingham2bdbfd52014-09-29 23:17:18 +000095#include "lldb/API/SBThreadPlan.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000096#include "lldb/API/SBType.h"
Enrico Granata061858c2012-02-15 02:34:21 +000097#include "lldb/API/SBTypeCategory.h"
Todd Fiala732215f2014-06-02 20:55:29 +000098#include "lldb/API/SBTypeEnumMember.h"
Enrico Granata061858c2012-02-15 02:34:21 +000099#include "lldb/API/SBTypeFilter.h"
100#include "lldb/API/SBTypeFormat.h"
101#include "lldb/API/SBTypeNameSpecifier.h"
102#include "lldb/API/SBTypeSummary.h"
103#include "lldb/API/SBTypeSynthetic.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000104#include "lldb/API/SBValue.h"
Caroline Tice77404122010-09-22 16:41:52 +0000105#include "lldb/API/SBValueList.h"
Greg Clayton1b282f92011-10-13 18:08:26 +0000106#include "lldb/API/SBWatchpoint.h"
Todd Fiala802dc4022014-06-23 19:30:49 +0000107#include "lldb/API/SBUnixSignals.h"
Enrico Granatac972c702013-06-21 18:57:30 +0000108
109#include "../scripts/Python/python-swigsafecast.swig"
110
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000111%}
112
113/* Various liblldb typedefs that SWIG needs to know about. */
Johnny Chen4b332092010-12-16 00:01:06 +0000114#define __extension__ /* Undefine GCC keyword to make Swig happy when processing glibc's stdint.h. */
Todd Fiala802dc4022014-06-23 19:30:49 +0000115/* The ISO C99 standard specifies that in C++ implementations limit macros such
116 as INT32_MAX should only be defined if __STDC_LIMIT_MACROS is. */
117#define __STDC_LIMIT_MACROS
Filipe Cabecinhas3e6ff112012-09-19 15:22:05 +0000118%include "stdint.i"
Greg Clayton05faeb72010-10-07 04:19:01 +0000119%include "lldb/lldb-defines.h"
120%include "lldb/lldb-enumerations.h"
121%include "lldb/lldb-forward.h"
Greg Clayton05faeb72010-10-07 04:19:01 +0000122%include "lldb/lldb-types.h"
Johnny Chen349f0762011-07-19 01:07:06 +0000123
Johnny Chenfdc4a862011-07-19 22:41:47 +0000124/* Forward declaration of SB classes. */
Johnny Chen0f519682011-07-19 21:49:34 +0000125%include "lldb/API/SBDefines.h"
Johnny Chen0f519682011-07-19 21:49:34 +0000126
127/* Python interface files with docstrings. */
128%include "./Python/interface/SBAddress.i"
129%include "./Python/interface/SBBlock.i"
130%include "./Python/interface/SBBreakpoint.i"
131%include "./Python/interface/SBBreakpointLocation.i"
Johnny Chenfdc4a862011-07-19 22:41:47 +0000132%include "./Python/interface/SBBroadcaster.i"
133%include "./Python/interface/SBCommandInterpreter.i"
134%include "./Python/interface/SBCommandReturnObject.i"
135%include "./Python/interface/SBCommunication.i"
Johnny Chen0f519682011-07-19 21:49:34 +0000136%include "./Python/interface/SBCompileUnit.i"
Enrico Granata9128ee22011-09-06 19:20:51 +0000137%include "./Python/interface/SBData.i"
Johnny Chen0f519682011-07-19 21:49:34 +0000138%include "./Python/interface/SBDebugger.i"
Enrico Granata10de0902012-10-10 22:54:17 +0000139%include "./Python/interface/SBDeclaration.i"
Johnny Chenfdc4a862011-07-19 22:41:47 +0000140%include "./Python/interface/SBError.i"
Johnny Chen0f519682011-07-19 21:49:34 +0000141%include "./Python/interface/SBEvent.i"
Jim Ingham35e1bda2012-10-16 21:41:58 +0000142%include "./Python/interface/SBExpressionOptions.i"
Johnny Chenfdc4a862011-07-19 22:41:47 +0000143%include "./Python/interface/SBFileSpec.i"
Jim Ingham969795f2011-09-21 01:17:13 +0000144%include "./Python/interface/SBFileSpecList.i"
Johnny Chen0f519682011-07-19 21:49:34 +0000145%include "./Python/interface/SBFrame.i"
146%include "./Python/interface/SBFunction.i"
Johnny Chenfdc4a862011-07-19 22:41:47 +0000147%include "./Python/interface/SBHostOS.i"
Johnny Chenfdc4a862011-07-19 22:41:47 +0000148%include "./Python/interface/SBInstruction.i"
149%include "./Python/interface/SBInstructionList.i"
Johnny Chenf74cb502011-07-18 23:11:07 +0000150%include "./Python/interface/SBLineEntry.i"
151%include "./Python/interface/SBListener.i"
152%include "./Python/interface/SBModule.i"
Greg Clayton226cce22013-07-08 22:22:41 +0000153%include "./Python/interface/SBModuleSpec.i"
Greg Claytonfbb76342013-11-20 21:07:01 +0000154%include "./Python/interface/SBPlatform.i"
Johnny Chen357033b2011-07-18 20:13:38 +0000155%include "./Python/interface/SBProcess.i"
Jason Molenda5e8dce42013-12-13 00:29:16 +0000156%include "./Python/interface/SBQueue.i"
157%include "./Python/interface/SBQueueItem.i"
Greg Claytoncac9c5f2011-09-24 00:52:29 +0000158%include "./Python/interface/SBSection.i"
Johnny Chenfdc4a862011-07-19 22:41:47 +0000159%include "./Python/interface/SBSourceManager.i"
160%include "./Python/interface/SBStream.i"
161%include "./Python/interface/SBStringList.i"
Johnny Chen349f0762011-07-19 01:07:06 +0000162%include "./Python/interface/SBSymbol.i"
163%include "./Python/interface/SBSymbolContext.i"
164%include "./Python/interface/SBSymbolContextList.i"
Johnny Chendc7d3c12011-07-16 21:15:39 +0000165%include "./Python/interface/SBTarget.i"
Johnny Chen357033b2011-07-18 20:13:38 +0000166%include "./Python/interface/SBThread.i"
Kuba Breckaa5ea1e22014-09-06 01:21:19 +0000167%include "./Python/interface/SBThreadCollection.i"
Jim Ingham2bdbfd52014-09-29 23:17:18 +0000168%include "./Python/interface/SBThreadPlan.i"
Johnny Chenfdc4a862011-07-19 22:41:47 +0000169%include "./Python/interface/SBType.i"
Enrico Granata061858c2012-02-15 02:34:21 +0000170%include "./Python/interface/SBTypeCategory.i"
Todd Fiala732215f2014-06-02 20:55:29 +0000171%include "./Python/interface/SBTypeEnumMember.i"
Enrico Granata061858c2012-02-15 02:34:21 +0000172%include "./Python/interface/SBTypeFilter.i"
173%include "./Python/interface/SBTypeFormat.i"
174%include "./Python/interface/SBTypeNameSpecifier.i"
175%include "./Python/interface/SBTypeSummary.i"
176%include "./Python/interface/SBTypeSynthetic.i"
Johnny Chen67ae7bd2011-07-18 19:08:30 +0000177%include "./Python/interface/SBValue.i"
178%include "./Python/interface/SBValueList.i"
Greg Clayton1b282f92011-10-13 18:08:26 +0000179%include "./Python/interface/SBWatchpoint.i"
Todd Fiala802dc4022014-06-23 19:30:49 +0000180%include "./Python/interface/SBUnixSignals.i"
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000181
Caroline Ticedac97f32010-09-22 23:01:29 +0000182%include "./Python/python-extensions.swig"
Caroline Tice18474c92010-09-27 18:00:20 +0000183
Johnny Chen11346d32011-07-26 19:09:03 +0000184%include "./Python/python-wrapper.swig"