2010-06-09 00:52:24 +08:00
|
|
|
/*
|
|
|
|
lldb.swig
|
|
|
|
|
|
|
|
This is the input file for SWIG, to create the appropriate C++ wrappers and
|
|
|
|
functions for various scripting languages, to enable them to call the
|
|
|
|
liblldb Script Bridge functions.
|
|
|
|
*/
|
|
|
|
|
2011-07-01 05:29:50 +08:00
|
|
|
/* Define our module docstring. */
|
|
|
|
%define DOCSTRING
|
|
|
|
"The lldb module contains the public APIs for Python binding.
|
|
|
|
|
2013-11-05 19:00:35 +08:00
|
|
|
Some of the important classes are described here:
|
2011-07-01 05:29:50 +08:00
|
|
|
|
|
|
|
o SBTarget: Represents the target program running under the debugger.
|
|
|
|
o SBProcess: Represents the process associated with the target program.
|
|
|
|
o SBThread: Represents a thread of execution. SBProcess contains SBThread(s).
|
|
|
|
o SBFrame: Represents one of the stack frames associated with a thread. SBThread
|
|
|
|
contains SBFrame(s).
|
|
|
|
o SBSymbolContext: A container that stores various debugger related info.
|
|
|
|
o SBValue: Represents the value of a variable, a register, or an expression.
|
|
|
|
o SBModule: Represents an executable image and its associated object and symbol
|
2015-06-18 13:27:05 +08:00
|
|
|
files. SBTarget contains SBModule(s).
|
2011-07-15 05:32:11 +08:00
|
|
|
o SBBreakpoint: Represents a logical breakpoint and its associated settings.
|
2015-06-18 13:27:05 +08:00
|
|
|
SBTarget contains SBBreakpoint(s).
|
2011-07-15 05:23:24 +08:00
|
|
|
o SBSymbol: Represents the symbol possibly associated with a stack frame.
|
2011-07-01 05:29:50 +08:00
|
|
|
o SBCompileUnit: Represents a compilation unit, or compiled source file.
|
|
|
|
o SBFunction: Represents a generic function, which can be inlined or not.
|
|
|
|
o SBBlock: Represents a lexical block. SBFunction contains SBBlock(s).
|
|
|
|
o SBLineEntry: Specifies an association with a contiguous range of instructions
|
2011-07-02 02:39:47 +08:00
|
|
|
and a source file location. SBCompileUnit contains SBLineEntry(s)."
|
2011-07-01 05:29:50 +08:00
|
|
|
%enddef
|
|
|
|
|
2011-07-17 05:27:36 +08:00
|
|
|
// The name of the module to be created.
|
2011-07-01 05:29:50 +08:00
|
|
|
%module(docstring=DOCSTRING) lldb
|
2010-06-09 00:52:24 +08:00
|
|
|
|
2011-07-17 05:27:36 +08:00
|
|
|
// Parameter types will be used in the autodoc string.
|
|
|
|
%feature("autodoc", "1");
|
2010-06-09 00:52:24 +08:00
|
|
|
|
2012-02-01 16:09:32 +08:00
|
|
|
%pythoncode%{
|
|
|
|
import uuid
|
|
|
|
import re
|
|
|
|
import os
|
2015-11-12 01:59:57 +08:00
|
|
|
|
|
|
|
import six
|
2012-02-01 16:09:32 +08:00
|
|
|
%}
|
2011-07-27 03:09:03 +08:00
|
|
|
%include "./Python/python-typemaps.swig"
|
2011-01-14 12:54:56 +08:00
|
|
|
|
2012-08-09 08:53:54 +08:00
|
|
|
/* C++ headers to be included. */
|
|
|
|
%{
|
2015-11-13 01:01:48 +08:00
|
|
|
#include <algorithm>
|
2012-08-09 08:53:54 +08:00
|
|
|
#include <string>
|
|
|
|
%}
|
|
|
|
|
2010-06-12 23:34:20 +08:00
|
|
|
/* The liblldb header files to be included. */
|
2010-06-09 00:52:24 +08:00
|
|
|
%{
|
2011-03-25 05:19:54 +08:00
|
|
|
#include "lldb/lldb-public.h"
|
2010-06-09 00:52:24 +08:00
|
|
|
#include "lldb/API/SBAddress.h"
|
2015-02-16 08:04:19 +08:00
|
|
|
#include "lldb/API/SBAttachInfo.h"
|
2010-06-09 00:52:24 +08:00
|
|
|
#include "lldb/API/SBBlock.h"
|
|
|
|
#include "lldb/API/SBBreakpoint.h"
|
|
|
|
#include "lldb/API/SBBreakpointLocation.h"
|
|
|
|
#include "lldb/API/SBBroadcaster.h"
|
|
|
|
#include "lldb/API/SBCommandInterpreter.h"
|
|
|
|
#include "lldb/API/SBCommandReturnObject.h"
|
2010-10-07 12:19:01 +08:00
|
|
|
#include "lldb/API/SBCommunication.h"
|
2010-06-09 00:52:24 +08:00
|
|
|
#include "lldb/API/SBCompileUnit.h"
|
Redesign of the interaction between Python and frozen objects:
- introduced two new classes ValueObjectConstResultChild and ValueObjectConstResultImpl: the first one is a ValueObjectChild obtained from
a ValueObjectConstResult, the second is a common implementation backend for VOCR and VOCRCh of method calls meant to read through pointers stored
in frozen objects ; now such reads transparently move from host to target as required
- as a consequence of the above, removed code that made target-memory copies of expression results in several places throughout LLDB, and also
removed code that enabled to recognize an expression result VO as such
- introduced a new GetPointeeData() method in ValueObject that lets you read a given amount of objects of type T from a VO
representing a T* or T[], and doing dereferences transparently
in private layer it returns a DataExtractor ; in public layer it returns an instance of a newly created lldb::SBData
- as GetPointeeData() does the right thing for both frozen and non-frozen ValueObject's, reimplemented ReadPointedString() to use it
en lieu of doing the raw read itself
- introduced a new GetData() method in ValueObject that lets you get a copy of the data that backs the ValueObject (for pointers,
this returns the address without any previous dereferencing steps ; for arrays it actually reads the whole chunk of memory)
in public layer this returns an SBData, just like GetPointeeData()
- introduced a new CreateValueFromData() method in SBValue that lets you create a new SBValue from a chunk of data wrapped in an SBData
the limitation to remember for this kind of SBValue is that they have no address: extracting the address-of for these objects (with any
of GetAddress(), GetLoadAddress() and AddressOf()) will return invalid values
- added several tests to check that "p"-ing objects (STL classes, char* and char[]) will do the right thing
Solved a bug where global pointers to global variables were not dereferenced correctly for display
New target setting "max-string-summary-length" gives the maximum number of characters to show in a string when summarizing it, instead of the hardcoded 128
Solved a bug where the summary for char[] and char* would not be shown if the ValueObject's were dumped via the "p" command
Removed m_pointers_point_to_load_addrs from ValueObject. Introduced a new m_address_type_of_children, which each ValueObject can set to tell the address type
of any pointers and/or references it creates. In the current codebase, this is load address most of the time (the only notable exception being file
addresses that generate file address children UNLESS we have a live process)
Updated help text for summary-string
Fixed an issue in STL formatters where std::stlcontainer::iterator would match the container's synthetic children providers
Edited the syntax and help for some commands to have proper argument types
llvm-svn: 139160
2011-09-07 03:20:51 +08:00
|
|
|
#include "lldb/API/SBData.h"
|
2010-06-09 00:52:24 +08:00
|
|
|
#include "lldb/API/SBDebugger.h"
|
2012-10-11 06:54:17 +08:00
|
|
|
#include "lldb/API/SBDeclaration.h"
|
2010-06-09 00:52:24 +08:00
|
|
|
#include "lldb/API/SBError.h"
|
|
|
|
#include "lldb/API/SBEvent.h"
|
2014-10-02 04:43:45 +08:00
|
|
|
#include "lldb/API/SBExecutionContext.h"
|
2012-10-17 05:41:58 +08:00
|
|
|
#include "lldb/API/SBExpressionOptions.h"
|
2010-08-28 06:35:26 +08:00
|
|
|
#include "lldb/API/SBFileSpec.h"
|
2011-09-21 09:17:13 +08:00
|
|
|
#include "lldb/API/SBFileSpecList.h"
|
2010-06-09 00:52:24 +08:00
|
|
|
#include "lldb/API/SBFrame.h"
|
|
|
|
#include "lldb/API/SBFunction.h"
|
2010-10-07 12:19:01 +08:00
|
|
|
#include "lldb/API/SBHostOS.h"
|
2010-10-06 11:09:58 +08:00
|
|
|
#include "lldb/API/SBInstruction.h"
|
|
|
|
#include "lldb/API/SBInstructionList.h"
|
2015-04-28 20:51:16 +08:00
|
|
|
#include "lldb/API/SBLanguageRuntime.h"
|
2015-02-05 07:19:15 +08:00
|
|
|
#include "lldb/API/SBLaunchInfo.h"
|
2010-06-09 00:52:24 +08:00
|
|
|
#include "lldb/API/SBLineEntry.h"
|
|
|
|
#include "lldb/API/SBListener.h"
|
2016-06-25 07:40:35 +08:00
|
|
|
#include "lldb/API/SBMemoryRegionInfo.h"
|
|
|
|
#include "lldb/API/SBMemoryRegionInfoList.h"
|
2010-06-09 00:52:24 +08:00
|
|
|
#include "lldb/API/SBModule.h"
|
Added a way to extract the module specifications from a file. A module specification is information that is required to describe a module (executable, shared library, object file, ect). This information includes host path, platform path (remote path), symbol file path, UUID, object name (for objects in .a files for example you could have an object name of "foo.o"), and target triple. Module specification can be used to create a module, or used to add a module to a target. A list of module specifications can be used to enumerate objects in container objects (like universal mach files and BSD archive files).
There are two new classes:
lldb::SBModuleSpec
lldb::SBModuleSpecList
The SBModuleSpec wraps up a lldb_private::ModuleSpec, and SBModuleSpecList wraps up a lldb_private::ModuleSpecList.
llvm-svn: 185877
2013-07-09 06:22:41 +08:00
|
|
|
#include "lldb/API/SBModuleSpec.h"
|
2013-11-21 05:07:01 +08:00
|
|
|
#include "lldb/API/SBPlatform.h"
|
2010-06-09 00:52:24 +08:00
|
|
|
#include "lldb/API/SBProcess.h"
|
2013-12-13 08:29:16 +08:00
|
|
|
#include "lldb/API/SBQueue.h"
|
|
|
|
#include "lldb/API/SBQueueItem.h"
|
2011-09-24 08:52:29 +08:00
|
|
|
#include "lldb/API/SBSection.h"
|
2010-06-09 00:52:24 +08:00
|
|
|
#include "lldb/API/SBSourceManager.h"
|
2010-09-20 13:20:02 +08:00
|
|
|
#include "lldb/API/SBStream.h"
|
2010-06-09 00:52:24 +08:00
|
|
|
#include "lldb/API/SBStringList.h"
|
2016-08-19 12:21:48 +08:00
|
|
|
#include "lldb/API/SBStructuredData.h"
|
2010-06-09 00:52:24 +08:00
|
|
|
#include "lldb/API/SBSymbol.h"
|
|
|
|
#include "lldb/API/SBSymbolContext.h"
|
2010-10-07 12:19:01 +08:00
|
|
|
#include "lldb/API/SBSymbolContextList.h"
|
2010-06-09 00:52:24 +08:00
|
|
|
#include "lldb/API/SBTarget.h"
|
|
|
|
#include "lldb/API/SBThread.h"
|
2014-09-06 09:21:19 +08:00
|
|
|
#include "lldb/API/SBThreadCollection.h"
|
2014-09-30 07:17:18 +08:00
|
|
|
#include "lldb/API/SBThreadPlan.h"
|
2010-06-09 00:52:24 +08:00
|
|
|
#include "lldb/API/SBType.h"
|
2012-02-15 10:34:21 +08:00
|
|
|
#include "lldb/API/SBTypeCategory.h"
|
2014-06-03 04:55:29 +08:00
|
|
|
#include "lldb/API/SBTypeEnumMember.h"
|
2012-02-15 10:34:21 +08:00
|
|
|
#include "lldb/API/SBTypeFilter.h"
|
|
|
|
#include "lldb/API/SBTypeFormat.h"
|
|
|
|
#include "lldb/API/SBTypeNameSpecifier.h"
|
|
|
|
#include "lldb/API/SBTypeSummary.h"
|
|
|
|
#include "lldb/API/SBTypeSynthetic.h"
|
2010-06-09 00:52:24 +08:00
|
|
|
#include "lldb/API/SBValue.h"
|
2010-09-23 00:41:52 +08:00
|
|
|
#include "lldb/API/SBValueList.h"
|
2015-02-18 01:55:50 +08:00
|
|
|
#include "lldb/API/SBVariablesOptions.h"
|
2011-10-14 02:08:26 +08:00
|
|
|
#include "lldb/API/SBWatchpoint.h"
|
2014-06-24 03:30:49 +08:00
|
|
|
#include "lldb/API/SBUnixSignals.h"
|
2013-06-22 02:57:30 +08:00
|
|
|
|
2015-10-15 00:59:32 +08:00
|
|
|
#include "../source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h"
|
2013-06-22 02:57:30 +08:00
|
|
|
|
2015-10-15 00:59:32 +08:00
|
|
|
#include "../scripts/Python/python-swigsafecast.swig"
|
2010-06-09 00:52:24 +08:00
|
|
|
%}
|
|
|
|
|
|
|
|
/* Various liblldb typedefs that SWIG needs to know about. */
|
2010-12-16 08:01:06 +08:00
|
|
|
#define __extension__ /* Undefine GCC keyword to make Swig happy when processing glibc's stdint.h. */
|
2014-06-24 03:30:49 +08:00
|
|
|
/* The ISO C99 standard specifies that in C++ implementations limit macros such
|
|
|
|
as INT32_MAX should only be defined if __STDC_LIMIT_MACROS is. */
|
|
|
|
#define __STDC_LIMIT_MACROS
|
2012-09-19 23:22:05 +08:00
|
|
|
%include "stdint.i"
|
2015-10-15 00:59:32 +08:00
|
|
|
|
2010-10-07 12:19:01 +08:00
|
|
|
%include "lldb/lldb-defines.h"
|
|
|
|
%include "lldb/lldb-enumerations.h"
|
|
|
|
%include "lldb/lldb-forward.h"
|
|
|
|
%include "lldb/lldb-types.h"
|
2011-07-19 09:07:06 +08:00
|
|
|
|
2011-07-20 06:41:47 +08:00
|
|
|
/* Forward declaration of SB classes. */
|
2011-07-20 05:49:34 +08:00
|
|
|
%include "lldb/API/SBDefines.h"
|
|
|
|
|
|
|
|
/* Python interface files with docstrings. */
|
2015-04-24 08:38:53 +08:00
|
|
|
%include "./interface/SBAddress.i"
|
|
|
|
%include "./interface/SBAttachInfo.i"
|
|
|
|
%include "./interface/SBBlock.i"
|
|
|
|
%include "./interface/SBBreakpoint.i"
|
|
|
|
%include "./interface/SBBreakpointLocation.i"
|
|
|
|
%include "./interface/SBBroadcaster.i"
|
|
|
|
%include "./interface/SBCommandInterpreter.i"
|
|
|
|
%include "./interface/SBCommandReturnObject.i"
|
|
|
|
%include "./interface/SBCommunication.i"
|
|
|
|
%include "./interface/SBCompileUnit.i"
|
|
|
|
%include "./interface/SBData.i"
|
|
|
|
%include "./interface/SBDebugger.i"
|
|
|
|
%include "./interface/SBDeclaration.i"
|
|
|
|
%include "./interface/SBError.i"
|
|
|
|
%include "./interface/SBEvent.i"
|
|
|
|
%include "./interface/SBExecutionContext.i"
|
|
|
|
%include "./interface/SBExpressionOptions.i"
|
|
|
|
%include "./interface/SBFileSpec.i"
|
|
|
|
%include "./interface/SBFileSpecList.i"
|
|
|
|
%include "./interface/SBFrame.i"
|
|
|
|
%include "./interface/SBFunction.i"
|
|
|
|
%include "./interface/SBHostOS.i"
|
|
|
|
%include "./interface/SBInstruction.i"
|
|
|
|
%include "./interface/SBInstructionList.i"
|
2015-04-28 20:51:16 +08:00
|
|
|
%include "./interface/SBLanguageRuntime.i"
|
2015-04-24 08:38:53 +08:00
|
|
|
%include "./interface/SBLaunchInfo.i"
|
|
|
|
%include "./interface/SBLineEntry.i"
|
|
|
|
%include "./interface/SBListener.i"
|
2016-06-25 07:40:35 +08:00
|
|
|
%include "./interface/SBMemoryRegionInfo.i"
|
|
|
|
%include "./interface/SBMemoryRegionInfoList.i"
|
2015-04-24 08:38:53 +08:00
|
|
|
%include "./interface/SBModule.i"
|
|
|
|
%include "./interface/SBModuleSpec.i"
|
|
|
|
%include "./interface/SBPlatform.i"
|
|
|
|
%include "./interface/SBProcess.i"
|
|
|
|
%include "./interface/SBQueue.i"
|
|
|
|
%include "./interface/SBQueueItem.i"
|
|
|
|
%include "./interface/SBSection.i"
|
|
|
|
%include "./interface/SBSourceManager.i"
|
|
|
|
%include "./interface/SBStream.i"
|
|
|
|
%include "./interface/SBStringList.i"
|
2016-08-19 12:21:48 +08:00
|
|
|
%include "./interface/SBStructuredData.i"
|
2015-04-24 08:38:53 +08:00
|
|
|
%include "./interface/SBSymbol.i"
|
|
|
|
%include "./interface/SBSymbolContext.i"
|
|
|
|
%include "./interface/SBSymbolContextList.i"
|
|
|
|
%include "./interface/SBTarget.i"
|
|
|
|
%include "./interface/SBThread.i"
|
|
|
|
%include "./interface/SBThreadCollection.i"
|
|
|
|
%include "./interface/SBThreadPlan.i"
|
|
|
|
%include "./interface/SBType.i"
|
|
|
|
%include "./interface/SBTypeCategory.i"
|
|
|
|
%include "./interface/SBTypeEnumMember.i"
|
|
|
|
%include "./interface/SBTypeFilter.i"
|
|
|
|
%include "./interface/SBTypeFormat.i"
|
|
|
|
%include "./interface/SBTypeNameSpecifier.i"
|
|
|
|
%include "./interface/SBTypeSummary.i"
|
|
|
|
%include "./interface/SBTypeSynthetic.i"
|
|
|
|
%include "./interface/SBValue.i"
|
|
|
|
%include "./interface/SBValueList.i"
|
|
|
|
%include "./interface/SBVariablesOptions.i"
|
|
|
|
%include "./interface/SBWatchpoint.i"
|
|
|
|
%include "./interface/SBUnixSignals.i"
|
2010-06-09 00:52:24 +08:00
|
|
|
|
2010-09-23 07:01:29 +08:00
|
|
|
%include "./Python/python-extensions.swig"
|
2010-09-28 02:00:20 +08:00
|
|
|
|
2011-07-27 03:09:03 +08:00
|
|
|
%include "./Python/python-wrapper.swig"
|