History log of /external/lldb/scripts/lldb.swig
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f9215bae3f7f76ad98bace0097821a12415690c5 09-Jul-2013 Greg Clayton <gclayton@apple.com> 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.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185877 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
d91dc8141e6cd030a056a056b8f4e16c1bbb24a6 21-Jun-2013 Enrico Granata <egranata@apple.com> Change the SWIG wrappers to stop directly casting SB object to SWIG objects, and instead use a safer type-checked API (thanks templates)
Any time a SWIG wrapper needs a PyObject for an SB object, it now should call into SBTypeToSWIGWrapper<SBType>(SBType*)
If you try to use it on an SBType for which there is not an implementation yet, LLDB will fail to link - just add your specialization to python-swigsafecast.swig and rebuild

This is the first step in simplifying our SWIG Wrapper layer



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@184580 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
47beabb1386be44e3f90dbc30a0b22c23b93a4dc 16-Oct-2012 Jim Ingham <jingham@apple.com> Add the ability to set timeout & "run all threads" options both from the "expr" command and from
the SB API's that evaluate expressions.

<rdar://problem/12457211>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166062 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
49306144bb37f0b3423d992f17cdcc24703374b4 11-Oct-2012 Enrico Granata <egranata@apple.com> <rdar://problem/12462744> Implement a new SBDeclaration class to wrap an lldb_private::Declaration - make a GetDeclaration() API on SBValue to return a declaration. This will only work for vroot variables as they are they only objects for which we currently provide a valid Declaration

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165672 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
56de6d1d23b3afe69452e0255906a62866998e94 19-Sep-2012 Filipe Cabecinhas <me@filcab.net> Fix some type-related swig bugs on FreeBSD on x86_64 (and maybe other OS/arch).

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164227 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
4761ca3a6936108321563706f449d73405fb3564 09-Aug-2012 Sean Callanan <scallanan@apple.com> Made lldb.swig include <string>, which it requires.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161560 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
16376ed044df3ee70fcf69e19f06af01e71a8e9a 15-Feb-2012 Enrico Granata <granata.enrico@gmail.com> <rdar://problem/10062621>
New public API for handling formatters: creating, deleting, modifying categories, and formatters, and managing type/formatter association.
This provides SB classes for each of the main object types involved in providing formatter support:
SBTypeCategory
SBTypeFilter
SBTypeFormat
SBTypeSummary
SBTypeSynthetic
plus, an SBTypeNameSpecifier class that is used on the public API layer to abstract the notion that formatters can be applied to plain type-names as well as to regular expressions
For naming consistency, this patch also renames a lot of formatters-related classes.
Plus, the changes in how flags are handled that started with summaries is now extended to other classes as well. A new enum (lldb::eTypeOption) is meant to support this on the public side.
The patch also adds several new calls to the formatter infrastructure that are used to implement by-index accessing and several other design changes required to accommodate the new API layer.
An architectural change is introduced in that backing objects for formatters now become writable. On the public API layer, CoW is implemented to prevent unwanted propagation of changes.
Lastly, there are some modifications in how the "default" category is constructed and managed in relation to other categories.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150558 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
b302dffacdadeef509d28133a4c66299418122f8 01-Feb-2012 Greg Clayton <gclayton@apple.com> Added many more python convenience accessors:

You can now access a frame in a thread using:

lldb.SBThread.frame[int] -> lldb.SBFrame object for a frame in a thread

Where "int" is an integer index. You can also access a list object with all of
the frames using:

lldb.SBThread.frames => list() of lldb.SBFrame objects

All SB objects that give out SBAddress objects have properties named "addr"

lldb.SBInstructionList now has the following convenience accessors for len() and
instruction access using an index:

insts = lldb.frame.function.instructions
for idx in range(len(insts)):
print insts[idx]

Instruction lists can also lookup an isntruction using a lldb.SBAddress as the key:

pc_inst = lldb.frame.function.instructions[lldb.frame.addr]

lldb.SBProcess now exposes:

lldb.SBProcess.is_alive => BOOL Check if a process is exists and is alive
lldb.SBProcess.is_running => BOOL check if a process is running (or stepping):
lldb.SBProcess.is_running => BOOL check if a process is currently stopped or crashed:
lldb.SBProcess.thread[int] => lldb.SBThreads for a given "int" zero based index
lldb.SBProcess.threads => list() containing all lldb.SBThread objects in a process

SBInstruction now exposes:
lldb.SBInstruction.mnemonic => python string for instruction mnemonic
lldb.SBInstruction.operands => python string for instruction operands
lldb.SBInstruction.command => python string for instruction comment

SBModule now exposes:

lldb.SBModule.uuid => uuid.UUID(), an UUID object from the "uuid" python module
lldb.SBModule.symbol[int] => lldb.Symbol, lookup symbol by zero based index
lldb.SBModule.symbol[str] => list() of lldb.Symbol objects that match "str"
lldb.SBModule.symbol[re] => list() of lldb.Symbol objecxts that match the regex
lldb.SBModule.symbols => list() of all symbols in a module


SBAddress objects can now access the current load address with the "lldb.SBAddress.load_addr"
property. The current "lldb.target" will be used to try and resolve the load address.

Load addresses can also be set using this accessor:

addr = lldb.SBAddress()
addd.load_addr = 0x123023

Then you can check the section and offset to see if the address got resolved.

SBTarget now exposes:

lldb.SBTarget.module[int] => lldb.SBModule from zero based module index
lldb.SBTarget.module[str] => lldb.SBModule by basename or fullpath or uuid string
lldb.SBTarget.module[uuid.UUID()] => lldb.SBModule whose UUID matches
lldb.SBTarget.module[re] => list() of lldb.SBModule objects that match the regex
lldb.SBTarget.modules => list() of all lldb.SBModule objects in the target

SBSymbol now exposes:

lldb.SBSymbol.name => python string for demangled symbol name
lldb.SBSymbol.mangled => python string for mangled symbol name or None if there is none
lldb.SBSymbol.type => lldb.eSymbolType enum value
lldb.SBSymbol.addr => SBAddress object that represents the start address for this symbol (if there is one)
lldb.SBSymbol.end_addr => SBAddress for the end address of the symbol (if there is one)
lldb.SBSymbol.prologue_size => pythin int containing The size of the prologue in bytes
lldb.SBSymbol.instructions => SBInstructionList containing all instructions for this symbol

SBFunction now also has these new properties in addition to what is already has:
lldb.SBFunction.addr => SBAddress object that represents the start address for this function
lldb.SBFunction.end_addr => SBAddress for the end address of the function
lldb.SBFunction.instructions => SBInstructionList containing all instructions for this function

SBFrame now exposes the SBAddress for the frame:
lldb.SBFrame.addr => SBAddress which is the section offset address for the current frame PC

These are all in addition to what was already added. Documentation and website
updates coming soon.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149489 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
90c5214bc61ee2cdf68236b36d9746ecd275302e 30-Jan-2012 Greg Clayton <gclayton@apple.com> Removed the "lldb-forward-rtti.h" header file as it was designed to contain
all RTTI types, and since we don't use RTTI anymore since clang and llvm don't
we don't really need this header file. All shared pointer definitions have
been moved into "lldb-forward.h".

Defined std::tr1::weak_ptr definitions for all of the types that inherit from
enable_shared_from_this() in "lldb-forward.h" in preparation for thread
hardening our public API.

The first in the thread hardening check-ins. First we start with SBThread.
We have issues in our lldb::SB API right now where if you have one object
that is being used by two threads we have a race condition. Consider the
following code:

1 int
2 SBThread::SomeFunction()
3 {
4 int result = -1;
5 if (m_opaque_sp)
6 {
7 result = m_opaque_sp->DoSomething();
8 }
9 return result;
10 }

And now this happens:

Thread 1 enters any SBThread function and checks its m_opaque_sp and is about
to execute the code on line 7 but hasn't yet
Thread 2 gets to run and class sb_thread.Clear() which calls m_opaque_sp.clear()
and clears the contents of the shared pointer member
Thread 1 now crashes when it resumes.

The solution is to use std::tr1::weak_ptr. Now the SBThread class contains a
lldb::ThreadWP (weak pointer to our lldb_private::Thread class) and this
function would look like:

1 int
2 SBThread::SomeFunction()
3 {
4 int result = -1;
5 ThreadSP thread_sp(m_opaque_wp.lock());
6 if (thread_sp)
7 {
8 result = m_opaque_sp->DoSomething();
9 }
10 return result;
11 }

Now we have a solid thread safe API where we get a local copy of our thread
shared pointer from our weak_ptr and then we are guaranteed it can't go away
during our function.

So lldb::SBThread has been thread hardened, more checkins to follow shortly.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149218 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
1fa6b3d6c83955fe06c63d3a4025f2c0ec431d68 13-Oct-2011 Greg Clayton <gclayton@apple.com> Cleaned up the SBWatchpoint public API.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141876 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
092bd1575675778c6ebe901a7760af7427db617e 27-Sep-2011 Johnny Chen <johnny.chen@apple.com> Export the watchpoint related API (SBWatchpointLocation class and added SBTarget methods)
to the Python interface.

Implement yet another (threre're 3 now) iterator protocol for SBTarget: watchpoint_location_iter(),
to iterate on the available watchpoint locations. And add a print representation for
SBWatchpointLocation.

Exercise some of these Python API with TestWatchpointLocationIter.py.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140595 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
3e8c25f62f92145b6fb699b379cbfe72b1245d4a 24-Sep-2011 Greg Clayton <gclayton@apple.com> Added to the public API to allow symbolication:
- New SBSection objects that are object file sections which can be accessed
through the SBModule classes. You can get the number of sections, get a
section at index, and find a section by name.
- SBSections can contain subsections (first find "__TEXT" on darwin, then
us the resulting SBSection to find "__text" sub section).
- Set load addresses for a SBSection in the SBTarget interface
- Set the load addresses of all SBSection in a SBModule in the SBTarget interface
- Add a new module the an existing target in the SBTarget interface
- Get a SBSection from a SBAddress object

This should get us a lot closer to being able to symbolicate using LLDB through
the public API.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140437 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
03c8ee5aeafcd6c43f10002a4f8096af01780f86 21-Sep-2011 Jim Ingham <jingham@apple.com> Add a new breakpoint type "break by source regular expression".
Fix the RegularExpression class so it has a real copy constructor.
Fix the breakpoint setting with multiple shared libraries so it makes
one breakpoint not one per shared library.
Add SBFileSpecList, to be used to expose the above to the SB interface (not done yet.)


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140225 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
915448044bac6fdac22a33cc46697dcb771a8df2 06-Sep-2011 Enrico Granata <granata.enrico@gmail.com> 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


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139160 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
6b1596d81c34c6efb10ed51a3572d6b145b73f5b 17-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Changes to Python commands:
- They now have an SBCommandReturnObject instead of an SBStream as third argument
- The class CommandObjectPythonFunction has been merged into CommandObjectCommands.cpp
- The command to manage them is now:
command script with subcommands add, list, delete, clear
command alias is returned to its previous functionality
- Python commands are now part of an user dictionary, instead of being seen as aliases



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137785 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
f307cf7d46bb82ed366b338a624b565975ebf865 26-Jul-2011 Johnny Chen <johnny.chen@apple.com> lldb.swig (the SWIG input file) has become too large. Modularize a bit by introducing two files
to be included from lldb.swig: python-typemaps.swig and python-wrapper.swig.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136117 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
9ae7cef26612773c6b3422834cec83f0fbb2cf8c 24-Jul-2011 Enrico Granata <granata.enrico@gmail.com> Python synthetic children:
- you can now define a Python class as a synthetic children producer for a type
the class must adhere to this "interface":
def __init__(self, valobj, dict):
def get_child_at_index(self, index):
def get_child_index(self, name):
then using type synth add -l className typeName
(e.g. type synth add -l fooSynthProvider foo)
(This is still WIP with lots to be added)
A small test case is available also as reference

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135865 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
5cb6cab6395a896ec5938acc0885858b8e2ba2c8 20-Jul-2011 Johnny Chen <johnny.chen@apple.com> Move the rest of the SB headers to interface files.
They are not docstring'ed yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135531 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
335b3ee1631e14e6cde2a03b28267136d1eabf9f 19-Jul-2011 Johnny Chen <johnny.chen@apple.com> Rearrange the %include SWIG directives into two groups. One is the pure .h headers and the other is the .i interface files.
The objective is to move the .h header into .i interface file eventually.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135526 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
6d91e0a095183e02a84b2833c5cbe46e7963e8ba 19-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add SWIG interface files for SBSymbol, SBSymbolContext, and SBSymbolContextList.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135459 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
fb35e2ad9893ca53f33eb3ce190147c02d97ec87 19-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add SWIG Python interface files for SBLineEntry, SBListener, and SBModule.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135441 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
6cf1bc333301e95ad5c96481d63b270eac7a7266 19-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add SWIG Python interface files for SBDebugger, SBCompileUnit, and SBEvent.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135432 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
3cfd5e89ce6b66f271727032b36afb635287a24b 18-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add SWIG Python interface files for SBAddress, SBBlock, SBBreakpoint, and SBBreakpointLocation.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135430 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
c3fba812b636dcdede81be622d557efbdc834240 18-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add SWIG Python interface files for SBProcess, SBThread, and SBFrame.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135419 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
854a1ba617fded6eb054b3f93b3299d0a7173ca1 18-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add two new interface files SBValue.i and SBValueList.i, instead of directly swigging the header files.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135416 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
6c9f3e2e03775adfcea6706cda20182eb8b84ee8 18-Jul-2011 Enrico Granata <granata.enrico@gmail.com> Runtime errors in Python scripts were not being shown; this fix makes them print out to ease correcting errors

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135395 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
871768739ac6386e282976f8acd76f6f2b8b89ee 16-Jul-2011 Johnny Chen <johnny.chen@apple.com> Have SWIG generate autodoc strings with parameter types for all SB API objects by default.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135357 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
ebd63b28c6b7574ed9fbd71e57677c25e57c6a5b 16-Jul-2011 Johnny Chen <johnny.chen@apple.com> Create an interface file for SBTarget named SBTarget.i which relieves SBTarget.h
of the duty of having SWIG docstring features and multiline string literals
embedded within.

lldb.swig now %include .../SBTarget.i, instead of .../SBTarget.h. Will create
other interface files and transition them over.

Also update modify-python-lldb.py to better handle the trailing blank line right
before the ending '"""' Python docstring delimiter.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135355 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
f7a9b14c2c02d2fa9fad586c19f29d77533fcc09 15-Jul-2011 Enrico Granata <granata.enrico@gmail.com> Python summary strings:
- you can use a Python script to write a summary string for data-types, in one of
three ways:
-P option and typing the script a line at a time
-s option and passing a one-line Python script
-F option and passing the name of a Python function
these options all work for the "type summary add" command
your Python code (if provided through -P or -s) is wrapped in a function
that accepts two parameters: valobj (a ValueObject) and dict (an LLDB
internal dictionary object). if you use -F and give a function name,
you're expected to define the function on your own and with the right
prototype. your function, however defined, must return a Python string
- test case for the Python summary feature
- a few quirks:
Python summaries cannot have names, and cannot use regex as type names
both issues will be fixed ASAP
major redesign of type summary code:
- type summary working with strings and type summary working with Python code
are two classes, with a common base class SummaryFormat
- SummaryFormat classes now are able to actively format objects rather than
just aggregating data
- cleaner code to print descriptions for summaries
the public API now exports a method to easily navigate a ValueObject hierarchy
New InputReaderEZ and PriorityPointerPair classes
Several minor fixes and improvements

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135238 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
59efa13e6129725eb12a64d29aab477952bcc63b 14-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add summary info for SBBreakpoint to the lldb module level docstring.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135194 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
61858995ea904bd12556dd95cad5d50305ad48f3 14-Jul-2011 Johnny Chen <johnny.chen@apple.com> Minor wording change.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135190 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
33b4be1d7ca14b25d0d57b5a2032971294980996 09-Jul-2011 Johnny Chen <johnny.chen@apple.com> o TestEvents.py:

Add a usage example of SBEvent APIs.

o SBEvent.h and SBListener.h:

Add method docstrings for SBEvent.h and SBListener.h, and example usage of SBEvent into
the class docstring of SBEvent.

o lldb.swig:

Add typemap for SBEvent::SBEvent (uint32_t event, const char *cstr, uint32_t cstr_len)
so that we can use, in Python, obj2 = lldb.SBEvent(0, "abc") to create an SBEvent.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134766 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
a0d0a7cbd773ded4ced8d5065f993b6e0feb8dfe 01-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add docstrings for some API classes and auto-generates docstrings for the methods of them.
A few of the auto-generated method docstrings don't look right, and may need to be fixed
by either overwriting the auto-gened docstrings or some post-processing steps.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134246 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
b6613ea43190bdb8c4b5b3df668d8e66082c7a78 30-Jun-2011 Johnny Chen <johnny.chen@apple.com> Add module docstring to the auto-generated lldb.py file.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134192 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
b344843f75ef893762c93fd0a22d2d45712ce74d 24-Mar-2011 Greg Clayton <gclayton@apple.com> Fixed the LLDB build so that we can have private types, private enums and
public types and public enums. This was done to keep the SWIG stuff from
parsing all sorts of enums and types that weren't needed, and allows us to
abstract our API better.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128239 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
562ed0ed62eb88f18511deb2d1ade5afdaa72d6d 23-Mar-2011 Johnny Chen <johnny.chen@apple.com> Fix compile warnings wrt LLDBWrapPython.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128124 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
e86cbb9ef128db87cf904e330b2edfc15566bacd 22-Mar-2011 Greg Clayton <gclayton@apple.com> Abtracted the innards of lldb-core away from the SB interface. There was some
overlap in the SWIG integration which has now been fixed by introducing
callbacks for initializing SWIG for each language (python only right now).
There was also a breakpoint command callback that called into SWIG which has
been abtracted into a callback to avoid cross over as well.

Added a new binary: lldb-platform

This will be the start of the remote platform that will use as much of the
Host functionality to do its job so it should just work on all platforms.
It is pretty hollowed out for now, but soon it will implement a platform
using the GDB remote packets as the transport.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128053 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
e59b8693e11b00d28445d41158dd936dacd2d7ee 09-Mar-2011 Johnny Chen <johnny.chen@apple.com> There's no sense checking for < 0 with a return type of size_t:

size_t
SBProcess::ReadMemory (addr_t addr, void *buf, size_t size, lldb::SBError &error);


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@127292 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
586a3e6ad55b210791d451d1b5bb024d2a29091b 07-Mar-2011 Johnny Chen <johnny.chen@apple.com> Add TestThreadAPI.py file to house the Python SBThread API test cases.
Currently it has only test cases for SBThread.GetStopDescription() API.

Also modified lldb.swig to add typemap for (char *dst, size_t dst_len)
which occurs for SBThread::GetStopDescription() C++ API. For Python
scripting:

# Due to the typemap magic (see lldb.swig), we pass in an (int)length to GetStopDescription
# and expect to get a Python string as the result object!
# The 100 is just an arbitrary number specifying the buffer size.
stop_description = thread.GetStopDescription(100)


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@127173 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
36a0f749d744c7922d95e24393822afa1a8d49d7 01-Mar-2011 Johnny Chen <johnny.chen@apple.com> Add TestProcessAPI.py which exercises some Python SBProcess API. In particular, this tests
the SBProcess.ReadMemory() API, which, due to SWIG typemap'ing, expects 3 arguments (the location
to read from, the size in bytes to read, and an SBError object), and returns the result as a
Python string object.

On SnowLeopard where this has been tested, the SWIG script needs to be pampered (use the exact
same parameter names as in SBProcess.h) in order for this to work.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@126736 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
0d62dfd4974eb23f550f992e594894b96c5696d1 14-Jan-2011 Greg Clayton <gclayton@apple.com> Fixed an error in the type map for "char **" that was a bad memory smasher.
Anytime we had a valid python list that was trying to go from Python down into
our C++ API, it was allocating too little memory and it ended up smashing
whatever was next to the allocated memory.

Added typemap conversions for "void *, size_t" so we can get
SBProcess::ReadMemory() working. Also added a typemap for "const void *, size_t"
so we can get SBProcess::WriteMemory() to work.

Fixed an issue in the DWARF parser where we weren't correctly calculating the
DeclContext for all types and classes. We now should be a lot more accurate.
Fixes include: enums should now be setting their parent decl context correctly.
We saw a lot of examples where enums in classes were not being properly
namespace scoped. Also, classes within classes now get properly scoped.

Fixed the objective C runtime pointer checkers to let "nil" pointers through
since these are accepted by compiled code. We also now don't call "abort()"
when a pointer doesn't validate correctly since this was wreaking havoc on
the process due to the way abort() works. We now just dereference memory
which should give us an exception from which we can easily and reliably
recover.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123428 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
0aa2e55f0e9422405ad33675adc1e35044537adb 14-Jan-2011 Caroline Tice <ctice@apple.com> Split up the Python script interpreter code to allow multiple script interpreter objects to
exist within the same process (one script interpreter object per debugger object). The
python script interpreter objects are all using the same global Python script interpreter;
they use separate dictionaries to keep their data separate, and mutex's to prevent any object
attempting to use the global Python interpreter when another object is already using it.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123415 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
c1955f211a6061ec5ddceba1c97b4107fa2b4a1b 16-Dec-2010 Johnny Chen <johnny.chen@apple.com> Patch by Stephen Wilson to make Swig happy building on linux.
Pass the test suite on Mac OS X Snow Leopard.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121924 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
5144f389f9417e106364d7fdbf5631de19ed4fe8 07-Oct-2010 Greg Clayton <gclayton@apple.com> More SWIG cleanup. Moved the breakpoint callback function back to the
ScriptInterpreterPython class and made a simple callback function that
ScriptInterpreterPython::BreakpointCallbackFunction() now calls so we don't
include any internal API stuff into the cpp file that is generated by SWIG.

Fixed a few build warnings in debugserver.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115926 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
d8c625380b56759fc3fef8b9cf0389ae1a07f44d 07-Oct-2010 Greg Clayton <gclayton@apple.com> Cleaned up the SWIG stuff so all includes happen as they should, no pulling
tricks to get types to resolve. I did this by correctly including the correct
files: stdint.h and all lldb-*.h files first before including the API files.
This allowed me to remove all of the hacks that were in the lldb.swig file
and it also allows all of the #defines in lldb-defines.h and enumerations
in lldb-enumerations.h to appear in the lldb.py module. This will make the
python script code a lot more readable.

Cleaned up the "process launch" command to not execute a "process continue"
command, it now just does what it should have with the internal API calls
instead of executing another command line command.

Made the lldb_private::Process set the state to launching and attaching if
WillLaunch/WillAttach return no error respectively.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115902 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
e47649c441e7abe1dc5158ec36bba1bb66fcbb08 07-Oct-2010 Johnny Chen <johnny.chen@apple.com> o SBtarget.cpp/.h:

Temporarily commenting out the deprecated LaunchProcess() method.
SWIG is not able to handle the overloaded functions.

o dotest.py/lldbtest.py:

Add an '-w' option to insert some wait time between consecutive test cases.

o TestClassTypes.py:

Make the breakpoint_creation_by_filespec_python() test method more robust and
more descriptive by printing out a more insightful assert message.

o lldb.swig: Coaches swig to treat StateType as an int type, instead of a C++ class.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115899 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
5c4c746a3a83c1aad411c6cdc5f9525a4fc2d17e 06-Oct-2010 Greg Clayton <gclayton@apple.com> Added the ability to get the disassembly instructions from the function and
symbol.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115734 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
59c5d5dbe1b565bca389c9547377a2dd17b9e956 27-Sep-2010 Caroline Tice <ctice@apple.com> Automatically wrap *all* Python code entered for a breakpoint command inside
an auto-generated Python function, and pass the stoppoint context frame and
breakpoint location as parameters to the function (named 'frame' and 'bp_loc'),
to be used inside the breakpoint command Python code, if desired.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114849 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
e49ec18f1868168c8927ae30a379db176ca8cce3 23-Sep-2010 Caroline Tice <ctice@apple.com> Remove all the __repr__ methods from the API/*.h files, and put them
into python-extensions.swig, which gets included into lldb.swig, and
adds them back into the classes when swig generates it's C++ file. This
keeps the Python stuff out of the general API classes.

Also fixed a small bug in the copy constructor for SBSymbolContext.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
1ca48b0529de3d8efc05037649fe178e90e36bb7 22-Sep-2010 Caroline Tice <ctice@apple.com> Remove SBCommandContext which was not needed or doing anything.

Add SBValueList.h & SBStream.h to build-swig-Python.sh; add SBValueList.h to lldb.swig



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114549 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
98f930f429160f9777f626c3ac6aa609f4e965d2 20-Sep-2010 Caroline Tice <ctice@apple.com> Add GetDescription() and __repr__ () methods to most API classes, to allow
"print" from inside Python to print out the objects in a more useful
manner.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114321 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
dfc91c368886f961b5cac95efc9adfe9be05cf73 15-Sep-2010 Caroline Tice <ctice@apple.com> Remove unnecessary/inappropriate output-printing functions from
the API.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113993 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
4ead2e9a5a74f465d00b0301c165fbebf4ee4ff3 28-Aug-2010 Johnny Chen <johnny.chen@apple.com> o Exposed SBFileSpec to the Python APIs in lldb.py.

o Fixed a crasher when getting it via SBTarget.GetExecutable().

>>> filespec = target.GetExecutable()
Segmentation fault

o And renamed SBFileSpec::GetFileName() to GetFilename() to be consistent with FileSpec::GetFilename().



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112308 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
b4d1ffffde48b4b250886df30c12480f034142e4 26-Aug-2010 Johnny Chen <johnny.chen@apple.com> o Added a test case for array_types which uses the Python APIs from lldb.py,
with the only exception of launching the process from SBTarget which is under
investigation.

o build-swig-Python.sh should also checks the timestamp of ${swig_input_file}
for update eligibility. Also, once an update is in order, there's no need
to check the remaining header files for timestamps.

o Coaches swig to treat StopReason as an int type, instead of a C++ class.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
558be58c085ed1d3e33c01f5ea3bf0eff63ab827 30-Jun-2010 Caroline Tice <ctice@apple.com> Add a unique ID to each debugger instance.
Add functions to look up debugger by id
Add global variable to lldb python module, to hold debugger id
Modify embedded Python interpreter to update the global variable with the
id of its current debugger.
Modify the char ** typemap definition in lldb.swig to accept 'None' (for NULL)
as a valid value.

The point of all this is so that, when you drop into the embedded interpreter
from the command interpreter (or when doing Python-based breakpoint commands),
there is a way for the Python side to find/get the correct debugger
instance ( by checking debugger_unique_id, then calling
SBDebugger::FindDebuggerWithID on it).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107287 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
461a43763c82a82a432c86cd14fd13b41a20cbce 12-Jun-2010 Greg Clayton <gclayton@apple.com> Patched in Pawel Wodnicki's lldb.swig changes for linux compatability.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105884 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig
24943d2ee8bfaa7cf5893e4709143924157a5c1e 08-Jun-2010 Chris Lattner <sabre@nondot.org> Initial checkin of lldb code from internal Apple repo.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105619 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/lldb.swig