History log of /external/lldb/scripts/Python/interface/SBValue.i
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
847a0ad45234f216384c3d994ef6d0bc3f14c2ca 13-Apr-2013 Sean Callanan <scallanan@apple.com> Make sure we expose SetData() through the Python
interface.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179439 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/Python/interface/SBValue.i
54037b1488e3344575714d8358728e042fa801c7 23-Oct-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12493007>

Added a new API call to help efficiently determine if a SBValue could have children:

bool
SBValue::MightHaveChildren ();

This is inteneded to be used bui GUI programs that need to show if a SBValue needs a disclosure triangle when displaying a hierarchical type in a tree view without having to complete the type (by calling SBValue::GetNumChildren()) as completing the type is expensive.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166460 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/Python/interface/SBValue.i
3d656c729a1ed0abad4e5a2d76f6e8a6904f66aa 22-Oct-2012 Enrico Granata <egranata@apple.com> <rdar://problem/12437442>
Given our implementation of ValueObjects we could have a scenario where a ValueObject has a dynamic type of Foo* at one point, and then its dynamic type changes to Bar*
If Bar* has synthetic children enabled, by the time we figure that out, our public API is already vending SBValues wrapping a DynamicVO, instead of a SyntheticVO and there was
no trivial way for us to change the SP inside an SBValue on the fly
This checkin reimplements SBValue in terms of a wrapper, ValueImpl, that allows this substitutions on-the-fly by overriding GetSP() to do The Right Thing (TM)
As an additional bonus, GetNonSyntheticValue() now works, and we can get rid of the ForceDisableSyntheticChildren idiom in ScriptInterpreterPython
Lastly, this checkin makes sure the synthetic VOs get the correct m_value and m_data from their parents (prevented summaries from working in some cases)



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166426 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/Python/interface/SBValue.i
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/Python/interface/SBValue.i
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/Python/interface/SBValue.i
2a94be1aa46c90d6749d8c96ed396d5ebde452cd 30-Jun-2012 Greg Clayton <gclayton@apple.com> Added documentation for many of our python properties and also made the property help show up by declaring the properties correctly. We previosly declared properties into a local "x" variable, what I didn't realize is that the help will use this as the property name for the help output.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@159468 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/Python/interface/SBValue.i
3f883496e92fce5011f6bf585af3ac6d1cddb64f 05-Jun-2012 Johnny Chen <johnny.chen@apple.com> rdar://problem/11584012

Refactorings of watchpoint creation APIs so that SBTarget::WatchAddress(), SBValue::Watch(), and SBValue::WatchPointee()
now take an additional 'SBError &error' parameter (at the end) to contain the reason if there is some failure in the
operation. Update 'watchpoint set variable/expression' commands to take advantage of that.

Update existing test cases to reflect the API change and add test cases to verify that the SBError mechanism works for
SBTarget::WatchAddress() by passing an invalid watch_size.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157964 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/Python/interface/SBValue.i
651cbe2e3f6efb8bd579a5007c2d2f90f0ab7633 08-May-2012 Enrico Granata <egranata@apple.com> <rdar://problem/11239650> Fixing a bug where the SetValueFromCString() method failed to operate on dynamic values. The fix consists in making the set operation fall through to the parent. We only actually allow this if the dynamic value is at a 0-offset from the parent, or the new value is 0. Other scenarios would need agreement on the actual meaning of the set operation (do we keep offsetting? do we just assume the user knows what they are doing?) so we prevent them, and let the expression parser deal with the complexity

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156422 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/Python/interface/SBValue.i
d41abdc25bee7dd73b482d65c391255f55c1df0d 11-Apr-2012 Greg Clayton <gclayton@apple.com> Added a property to get the dynamic type which uses the most permissive way to get a dynamic type.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154502 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/Python/interface/SBValue.i
dba1de8d585f27601162f674d30ab71d9c83ccde 27-Mar-2012 Enrico Granata <egranata@apple.com> Synthetic values are now automatically enabled and active by default. SBValue is set up to always wrap a synthetic value when one is available.
A new setting enable-synthetic-value is provided on the target to disable this behavior.
There also is a new GetNonSyntheticValue() API call on SBValue to go back from synthetic to non-synthetic. There is no call to go from non-synthetic to synthetic.
The test suite has been changed accordingly.
Fallout from changes to type searching: an hack has to be played to make it possible to use maps that contain std::string due to the special name replacement operated by clang
Fixing a test case that was using libstdcpp instead of libc++ - caught as a consequence of said changes to type searching


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153495 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/Python/interface/SBValue.i
d760907c1d42726fa0c8c48efa28385ed339bb94 17-Feb-2012 Enrico Granata <granata.enrico@gmail.com> Adding formatters for several useful Objective-C/Cocoa data types. The new categories are not enabled at startup, but can be manually activated if desired.
Adding new API calls to SBValue to be able to retrieve the associated formatters
Some refactoring to FormatNavigator::Get() in order to shrink its size down to more manageable terms (a future, massive, refactoring effort will still be needed)
Test cases added for the above


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150784 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/Python/interface/SBValue.i
d62b9c18f3fc567fa536e04faadd518cd363a22e 03-Feb-2012 Greg Clayton <gclayton@apple.com> Expose more convenience functionality in the python classes.

lldb.SBValueList now exposes the len() method and also allows item access:

lldb.SBValueList[<int>] - where <int> is an integer index into the list, returns a single lldb.SBValue which might be empty if the index is out of range
lldb.SBValueList[<str>] - where <str> is the name to look for, returns a list() of lldb.SBValue objects with any matching values (the list might be empty if nothing matches)
lldb.SBValueList[<re>] - where <re> is a compiles regular expression, returns a list of lldb.SBValue objects for containing any matches or a empty list if nothing matches

lldb.SBFrame now exposes:

lldb.SBFrame.variables => SBValueList of all variables that are in scope
lldb.SBFrame.vars => see lldb.SBFrame.variables
lldb.SBFrame.locals => SBValueList of all variables that are locals in the current frame
lldb.SBFrame.arguments => SBValueList of all variables that are arguments in the current frame
lldb.SBFrame.args => see lldb.SBFrame.arguments
lldb.SBFrame.statics => SBValueList of all static variables
lldb.SBFrame.registers => SBValueList of all registers for the current frame
lldb.SBFrame.regs => see lldb.SBFrame.registers

Combine any of the above properties with the new lldb.SBValueList functionality
and now you can do:

y = lldb.frame.vars['rect.origin.y']

or

vars = lldb.frame.vars
for i in range len(vars):
print vars[i]

Also expose "lldb.SBFrame.var(<str>)" where <str> can be en expression path
for any variable or child within the variable. This makes it easier to get a
value from the current frame like "rect.origin.y". The resulting value is also
not a constant result as expressions will return, but a live value that will
continue to track the current value for the variable expression path.

lldb.SBValue now exposes:

lldb.SBValue.unsigned => unsigned integer for the value
lldb.SBValue.signed => a signed integer for the value




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149684 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/Python/interface/SBValue.i
1b925206e3c4867fea9eb55a4c6460962cf32564 29-Jan-2012 Greg Clayton <gclayton@apple.com> Added the ability to get the target triple, byte order and address byte size
from the SBTarget and SBModule interfaces. Also added many python properties
for easier access to many things from many SB objects.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149191 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/Python/interface/SBValue.i
e0bd571a8050da2b3462c35c9f209cbc9755c750 19-Dec-2011 Jim Ingham <jingham@apple.com> Add needed Clear methods.
<rdar://problem/10596340>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146902 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/Python/interface/SBValue.i
1b42575189379cb0c1441f74a48127e9ab7335e3 08-Dec-2011 Jim Ingham <jingham@apple.com> Add SBValue::GetDynamicValue and SBValue::GetStaticValue API's.
<rdar://problem/10545069>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146173 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/Python/interface/SBValue.i
ecd4feb5111432d2878e95461220c720cb2d24c8 14-Oct-2011 Johnny Chen <johnny.chen@apple.com> SBValue::Watch() and SBValue::WatchPointee() are now the official API for creating
a watchpoint for either the variable encapsulated by SBValue (Watch) or the pointee
encapsulated by SBValue (WatchPointee).

Removed SBFrame::WatchValue() and SBFrame::WatchLocation() API as a result of that.

Modified the watchpoint related test suite to reflect the change.

Plus replacing WatchpointLocation with Watchpoint throughout the code base.

There are still cleanups to be dome. This patch passes the whole test suite.
Check it in so that we aggressively catch regressions.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141925 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/Python/interface/SBValue.i
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/Python/interface/SBValue.i
d68e089f8353eaf845c3559dac6d47b32830974f 10-Sep-2011 Greg Clayton <gclayton@apple.com> Added the ability to introspect types thourgh the public SBType interface.

Fixed up many API calls to not be "const" as const doesn't mean anything to
most of our lldb::SB objects since they contain a shared pointer, auto_ptr, or
pointer to the types which circumvent the constness anyway.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139428 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/Python/interface/SBValue.i
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/Python/interface/SBValue.i
c92eb4004a354b0ea085b610b2ba991e575b1c32 04-Aug-2011 Enrico Granata <granata.enrico@gmail.com> APIs to GetValueAsSigned/Unsigned() in SBValue now also accept an SBError parameter to give more info about any problem
The synthetic children providers now use the new (safer) APIs to get the values of objects
As a side effect, fixed an issue in ValueObject where ResolveValue() was not always updating the value before reading it


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136861 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/Python/interface/SBValue.i
0fb0bcc9d4e951145e1b8c783652224c09b23af4 04-Aug-2011 Greg Clayton <gclayton@apple.com> Cleaned up the SBType.h file to not include internal headers and reorganized
the SBType implementation classes.

Fixed LLDB core and the test suite to not use deprecated SBValue APIs.

Added a few new APIs to SBValue:

int64_t
SBValue::GetValueAsSigned(int64_t fail_value=0);

uint64_t
SBValue::GetValueAsUnsigned(uint64_t fail_value=0)




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136829 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/Python/interface/SBValue.i
979e20d127335143ffc89c2e37ec3a8b717ff22d 29-Jul-2011 Enrico Granata <granata.enrico@gmail.com> Public API changes:
- Completely new implementation of SBType
- Various enhancements in several other classes
Python synthetic children providers for std::vector<T>, std::list<T> and std::map<K,V>:
- these return the actual elements into the container as the children of the container
- basic template name parsing that works (hopefully) on both Clang and GCC
- find them in examples/synthetic and in the test suite in functionalities/data-formatter/data-formatter-python-synth
New summary string token ${svar :
- the syntax is just the same as in ${var but this new token lets you read the values
coming from the synthetic children provider instead of the actual children
- Python providers above provide a synthetic child len that returns the number of elements
into the container
Full bug fix for the issue in which getting byte size for a non-complete type would crash LLDB
Several other fixes, including:
- inverted the order of arguments in the ClangASTType constructor
- EvaluationPoint now only returns SharedPointer's to Target and Process
- the help text for several type subcommands now correctly indicates argument-less options as such


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/Python/interface/SBValue.i
7b9eeac27076d9b8190b1e25ca08d6a3c3e74574 27-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add deprecation docstrings for some APIs which take an SBFrame - SBValues know their own frames.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136194 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/Python/interface/SBValue.i
de856cc86c68a51e93aa72b8a478faf50de663c0 26-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add cross references between the docstrings for regular SBValue iteration:

for child in value:
# do something with the child value

and SBValue.linked_list_iter():

for task in task_head.linked_list_iter('next', eol_test):
# visit each item in the linked list


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136015 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/Python/interface/SBValue.i
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/Python/interface/SBValue.i
7be5a4fbd576ca1aa35f83fa9e696e2f53463847 18-Jul-2011 Johnny Chen <johnny.chen@apple.com> Fix header documentations.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135417 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/scripts/Python/interface/SBValue.i
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/Python/interface/SBValue.i