blob: 9e0262be509965dd24c28723ec6338ce619cca06 [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
Bruce Mitchener58ef3912015-06-18 05:27:05 +000023 files. SBTarget contains SBModule(s).
Johnny Chen4036b582011-07-14 21:32:11 +000024o SBBreakpoint: Represents a logical breakpoint and its associated settings.
Bruce Mitchener58ef3912015-06-18 05:27:05 +000025 SBTarget contains 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"
Oleksiy Vyalov71d08b32015-02-16 00:04:19 +000056#include "lldb/API/SBAttachInfo.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000057#include "lldb/API/SBBlock.h"
58#include "lldb/API/SBBreakpoint.h"
59#include "lldb/API/SBBreakpointLocation.h"
60#include "lldb/API/SBBroadcaster.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000061#include "lldb/API/SBCommandInterpreter.h"
62#include "lldb/API/SBCommandReturnObject.h"
Greg Clayton05faeb72010-10-07 04:19:01 +000063#include "lldb/API/SBCommunication.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000064#include "lldb/API/SBCompileUnit.h"
Enrico Granata9128ee22011-09-06 19:20:51 +000065#include "lldb/API/SBData.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000066#include "lldb/API/SBDebugger.h"
Enrico Granata10de0902012-10-10 22:54:17 +000067#include "lldb/API/SBDeclaration.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000068#include "lldb/API/SBError.h"
69#include "lldb/API/SBEvent.h"
Enrico Granatae85e84a2014-10-01 20:43:45 +000070#include "lldb/API/SBExecutionContext.h"
Jim Ingham35e1bda2012-10-16 21:41:58 +000071#include "lldb/API/SBExpressionOptions.h"
Johnny Chen23fd10c2010-08-27 22:35:26 +000072#include "lldb/API/SBFileSpec.h"
Jim Ingham969795f2011-09-21 01:17:13 +000073#include "lldb/API/SBFileSpecList.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000074#include "lldb/API/SBFrame.h"
75#include "lldb/API/SBFunction.h"
Greg Clayton05faeb72010-10-07 04:19:01 +000076#include "lldb/API/SBHostOS.h"
Greg Clayton1d273162010-10-06 03:09:58 +000077#include "lldb/API/SBInstruction.h"
78#include "lldb/API/SBInstructionList.h"
Ilia K7f836242015-04-28 12:51:16 +000079#include "lldb/API/SBLanguageRuntime.h"
Oleksiy Vyalov1ef7b2c2015-02-04 23:19:15 +000080#include "lldb/API/SBLaunchInfo.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000081#include "lldb/API/SBLineEntry.h"
82#include "lldb/API/SBListener.h"
83#include "lldb/API/SBModule.h"
Greg Clayton226cce22013-07-08 22:22:41 +000084#include "lldb/API/SBModuleSpec.h"
Greg Claytonfbb76342013-11-20 21:07:01 +000085#include "lldb/API/SBPlatform.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000086#include "lldb/API/SBProcess.h"
Jason Molenda5e8dce42013-12-13 00:29:16 +000087#include "lldb/API/SBQueue.h"
88#include "lldb/API/SBQueueItem.h"
Greg Claytoncac9c5f2011-09-24 00:52:29 +000089#include "lldb/API/SBSection.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000090#include "lldb/API/SBSourceManager.h"
Caroline Ticedde9cff2010-09-20 05:20:02 +000091#include "lldb/API/SBStream.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000092#include "lldb/API/SBStringList.h"
93#include "lldb/API/SBSymbol.h"
94#include "lldb/API/SBSymbolContext.h"
Greg Clayton05faeb72010-10-07 04:19:01 +000095#include "lldb/API/SBSymbolContextList.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +000096#include "lldb/API/SBTarget.h"
97#include "lldb/API/SBThread.h"
Kuba Breckaa5ea1e22014-09-06 01:21:19 +000098#include "lldb/API/SBThreadCollection.h"
Jim Ingham2bdbfd52014-09-29 23:17:18 +000099#include "lldb/API/SBThreadPlan.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000100#include "lldb/API/SBType.h"
Enrico Granata061858c2012-02-15 02:34:21 +0000101#include "lldb/API/SBTypeCategory.h"
Todd Fiala732215f2014-06-02 20:55:29 +0000102#include "lldb/API/SBTypeEnumMember.h"
Enrico Granata061858c2012-02-15 02:34:21 +0000103#include "lldb/API/SBTypeFilter.h"
104#include "lldb/API/SBTypeFormat.h"
105#include "lldb/API/SBTypeNameSpecifier.h"
106#include "lldb/API/SBTypeSummary.h"
107#include "lldb/API/SBTypeSynthetic.h"
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000108#include "lldb/API/SBValue.h"
Caroline Tice77404122010-09-22 16:41:52 +0000109#include "lldb/API/SBValueList.h"
Zachary Turner51f96ee2015-02-17 17:55:50 +0000110#include "lldb/API/SBVariablesOptions.h"
Greg Clayton1b282f92011-10-13 18:08:26 +0000111#include "lldb/API/SBWatchpoint.h"
Todd Fiala802dc4022014-06-23 19:30:49 +0000112#include "lldb/API/SBUnixSignals.h"
Enrico Granatac972c702013-06-21 18:57:30 +0000113
114#include "../scripts/Python/python-swigsafecast.swig"
115
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000116%}
117
118/* Various liblldb typedefs that SWIG needs to know about. */
Johnny Chen4b332092010-12-16 00:01:06 +0000119#define __extension__ /* Undefine GCC keyword to make Swig happy when processing glibc's stdint.h. */
Todd Fiala802dc4022014-06-23 19:30:49 +0000120/* The ISO C99 standard specifies that in C++ implementations limit macros such
121 as INT32_MAX should only be defined if __STDC_LIMIT_MACROS is. */
122#define __STDC_LIMIT_MACROS
Filipe Cabecinhas3e6ff112012-09-19 15:22:05 +0000123%include "stdint.i"
Greg Clayton05faeb72010-10-07 04:19:01 +0000124%include "lldb/lldb-defines.h"
125%include "lldb/lldb-enumerations.h"
126%include "lldb/lldb-forward.h"
Greg Clayton05faeb72010-10-07 04:19:01 +0000127%include "lldb/lldb-types.h"
Johnny Chen349f0762011-07-19 01:07:06 +0000128
Johnny Chenfdc4a862011-07-19 22:41:47 +0000129/* Forward declaration of SB classes. */
Johnny Chen0f519682011-07-19 21:49:34 +0000130%include "lldb/API/SBDefines.h"
Johnny Chen0f519682011-07-19 21:49:34 +0000131
132/* Python interface files with docstrings. */
Bruce Mitchener17d27302015-04-24 00:38:53 +0000133%include "./interface/SBAddress.i"
134%include "./interface/SBAttachInfo.i"
135%include "./interface/SBBlock.i"
136%include "./interface/SBBreakpoint.i"
137%include "./interface/SBBreakpointLocation.i"
138%include "./interface/SBBroadcaster.i"
139%include "./interface/SBCommandInterpreter.i"
140%include "./interface/SBCommandReturnObject.i"
141%include "./interface/SBCommunication.i"
142%include "./interface/SBCompileUnit.i"
143%include "./interface/SBData.i"
144%include "./interface/SBDebugger.i"
145%include "./interface/SBDeclaration.i"
146%include "./interface/SBError.i"
147%include "./interface/SBEvent.i"
148%include "./interface/SBExecutionContext.i"
149%include "./interface/SBExpressionOptions.i"
150%include "./interface/SBFileSpec.i"
151%include "./interface/SBFileSpecList.i"
152%include "./interface/SBFrame.i"
153%include "./interface/SBFunction.i"
154%include "./interface/SBHostOS.i"
155%include "./interface/SBInstruction.i"
156%include "./interface/SBInstructionList.i"
Ilia K7f836242015-04-28 12:51:16 +0000157%include "./interface/SBLanguageRuntime.i"
Bruce Mitchener17d27302015-04-24 00:38:53 +0000158%include "./interface/SBLaunchInfo.i"
159%include "./interface/SBLineEntry.i"
160%include "./interface/SBListener.i"
161%include "./interface/SBModule.i"
162%include "./interface/SBModuleSpec.i"
163%include "./interface/SBPlatform.i"
164%include "./interface/SBProcess.i"
165%include "./interface/SBQueue.i"
166%include "./interface/SBQueueItem.i"
167%include "./interface/SBSection.i"
168%include "./interface/SBSourceManager.i"
169%include "./interface/SBStream.i"
170%include "./interface/SBStringList.i"
171%include "./interface/SBSymbol.i"
172%include "./interface/SBSymbolContext.i"
173%include "./interface/SBSymbolContextList.i"
174%include "./interface/SBTarget.i"
175%include "./interface/SBThread.i"
176%include "./interface/SBThreadCollection.i"
177%include "./interface/SBThreadPlan.i"
178%include "./interface/SBType.i"
179%include "./interface/SBTypeCategory.i"
180%include "./interface/SBTypeEnumMember.i"
181%include "./interface/SBTypeFilter.i"
182%include "./interface/SBTypeFormat.i"
183%include "./interface/SBTypeNameSpecifier.i"
184%include "./interface/SBTypeSummary.i"
185%include "./interface/SBTypeSynthetic.i"
186%include "./interface/SBValue.i"
187%include "./interface/SBValueList.i"
188%include "./interface/SBVariablesOptions.i"
189%include "./interface/SBWatchpoint.i"
190%include "./interface/SBUnixSignals.i"
Chris Lattner30fdc8d2010-06-08 16:52:24 +0000191
Caroline Ticedac97f32010-09-22 23:01:29 +0000192%include "./Python/python-extensions.swig"
Caroline Tice18474c92010-09-27 18:00:20 +0000193
Johnny Chen11346d32011-07-26 19:09:03 +0000194%include "./Python/python-wrapper.swig"