History log of /external/lldb/source/Core/ValueObject.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
52f792329be5db8e38961350589e97e8f2823acd 12-Jul-2013 Greg Clayton <gclayton@apple.com> Huge change to clean up types.

A long time ago we start with clang types that were created by the symbol files and there were many functions in lldb_private::ClangASTContext that helped. Later we create ClangASTType which contains a clang::ASTContext and an opauque QualType, but we didn't switch over to fully using it. There were a lot of places where we would pass around a raw clang_type_t and also pass along a clang::ASTContext separately. This left room for error.

This checkin change all type code over to use ClangASTType everywhere and I cleaned up the interfaces quite a bit. Any code that was in ClangASTContext that was type related, was moved over into ClangASTType. All code that used these types was switched over to use all of the new goodness.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186130 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
73cfdbc9c81c5eb24c5dcd34afba8e2b441cb720 21-Jun-2013 Enrico Granata <egranata@apple.com> Adding two new markers to the ${var..} specifier
- %N = show the name of the variable
- %> = show the expression path of the variable



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@184502 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
b267bbd4df154a360bdb5ac0aedc5d2503740f9d 19-Jun-2013 Enrico Granata <egranata@apple.com> <rdar://problem/14194140>

Adding support for correctly extracting children out of vector types for data formatter purposes



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@184262 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
7ef39ca9e4e94b96fb20fc17200d6492639f0cac 31-May-2013 Enrico Granata <egranata@apple.com> <rdar://problem/14035604>

Fixing an issue where formats would not propagate from parents to children in all cases
Details follow:
an SBValue has children and those are fetched along with their values
Now, one calls SBValue::SetFormat() on the parent
Technically, the format choices should propagate onto the children (see ValueObject::GetFormat())
But if the children values are already fetched, they won't notice the format change and won't update themselves
This commit fixes that by making ValueObject::GetValueAsCString() check if any format change intervened from the previous call to the current one
A test case is also added



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183030 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
f0e769c7f32a6568c10ef10befaf6a682136cabb 31-May-2013 Enrico Granata <egranata@apple.com> Small code cleanups

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183024 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
10dc2a161c5a3c939a54ba0f4b98e797c5a29b56 30-Apr-2013 Enrico Granata <egranata@apple.com> <rdar://problem/13695846>

Enabling LLDB to write to variables that are stored in registers
Previously, this would not work since the Value's Context loses the notion of the data being in a register
We now store an "original" context that comes out of DWARF parsing, and use that context's data when attempting a write



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180803 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
c5e313844a41c9b22d2b0767f6310344ff550eab 25-Apr-2013 Greg Clayton <gclayton@apple.com> Don't print the type if there is none and don't print "<invalid type>". ValueObjects can be register sets and register groups and dumping those with:

(lldb) script print frame.GetRegisters()



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180236 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
2c810873d43f228341a272000349b2a6f4dcfb5a 19-Apr-2013 Sean Callanan <scallanan@apple.com> Fixed two problems when reading constant/register
variables in the ValueObject code:

- Report an error if the variable does not have
a valid address.

- Return the contents of the data to GetData(),
even if the value is constant.

<rdar://problem/13690855>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179876 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
ab8e00e51475b9148626bfdf99549b7ffc3d046d 13-Apr-2013 Sean Callanan <scallanan@apple.com> Added a SetData() method to ValueObject. This
lets a ValueObject's contents be set from raw
data. This has certain limitations (notably,
registers can only be set to data that is as
large as the register) but will be useful for
the new Materializer.

I also exposed this interface through SBValue.
I have added a testcase that exercises various
special cases of SBValue::SetData().


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179437 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
3b83055d13d30e8b10a15d04cd0619265e029158 12-Apr-2013 Enrico Granata <egranata@apple.com> <rdar://problem/13623698>

This patch fixes the issue that we were using the C stack as a measure of depth of ValueObject hierarchies, in the sense that we were assuming that recursive ValueObject operations would never be deeper than the stack allows.
This assumption is easy to prove wrong, however.
For instance, after ~10k runs through this loop:
struct node
{
int value;
node* child;
node (int x)
{
value = x;
child = nullptr;
}
};

int main ()
{
node root(1);
node* ptr = &root;
int j = 2;
while (1)
{
ptr->child = new node(j++);
ptr = ptr->child;
}
return 0;
}

the deepmost child object will be deeper than the stack on most architectures, and we would be unable to display it

This checkin fixes the issue by introducing a notion of root of ValueObject hierarchies.
In a couple cases, we have to use an iterative algorithm instead of going to the root because we want to allow deeper customizations (e.g. formats, dynamic values).
While the patch passes our test suite without regressions, it is a good idea to keep eyes open for any unexpected behavior (recursion can be subtle..)
Also, I am hesitant to introduce a test case since failing at this will not just be marked as an "F", but most definitely crash LLDB.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179330 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
952e9dc874944fcdbbb224f3ec4fc2c859376f64 28-Mar-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13521159>

LLDB is crashing when logging is enabled from lldb-perf-clang. This has to do with the global destructor chain as the process and its threads are being torn down.

All logging channels now make one and only one instance that is kept in a global pointer which is never freed. This guarantees that logging can correctly continue as the process tears itself down.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178191 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
0c074cb9aa11e9da82058f4412281ddac706226f 25-Mar-2013 Enrico Granata <egranata@apple.com> <rdar://problem/13365424>

Ensure that option -Y also works for expression as it does for frame variable
Also, if the user passes an explicit format specifier when printing a variable, override the summary's decision to hide the value.

This is required for scenarios like this to work:
(lldb) p/x c
(Class) $0 = 0x0000000100adb7f8 NSObject

Previously this would say:
(lldb) p/x c
(Class) $0 = NSObject

ignoring the explicit format specifier



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177893 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
dcb6c43aab268e9a5196cf0be239f1946d968680 23-Mar-2013 Enrico Granata <egranata@apple.com> And then again only compute the more expensive piece of data if need be :-)

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177812 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
6aac8440da7f1548de96ea897ba9b7fe38268f3f 23-Mar-2013 Enrico Granata <egranata@apple.com> Invert two condition checks to evaluate them in cheapest-to-more-expensive order

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177810 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
60dd5277eb7fee611f3e411a68eb2303c9ad9dfe 23-Mar-2013 Enrico Granata <egranata@apple.com> <rdar://problem/13315663>
commands of the form
frame variable -f c-string foo
where foo is an arbitrary pointer (e.g. void*) now do the right thing, i.e. they deref the pointer and try to get a c-string at the pointed address instead of dumping the pointer bytes as a string. the old behavior is used as a fallback if things don’t go well

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177799 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
a924b19df4a1b41206839e275383c0f43a4c5940 16-Mar-2013 Enrico Granata <egranata@apple.com> Performance improvements to the IsObjCNil () - we only try to resolve the value if the variable under consideration truly is an “Objective-C thing”
This also changes the ClangASTContext to make sure that id is correctly marked as being such an ObjC thing

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177203 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
fe6dc6e241c52822710380cec0931351a1d7b2d3 14-Mar-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13421412>

Many "byte size" members and variables were using a mixture of uint32_t and size_t. Switching over to using uint64_t everywhere.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177091 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
7314746d35625ae4371291fb2eb8a55494cd3fb5 13-Mar-2013 Jim Ingham <jingham@apple.com> Remove an unused #include.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176920 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
15905ae1ddfed87b9ab62f8e10c1e1f919bbf0e3 28-Feb-2013 Enrico Granata <egranata@apple.com> Use the Error parameter in ValueObject::ReadPointedString to actually report common errors



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176302 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
32d7ee3d2969211e104a27fcfcd636f249b26559 21-Feb-2013 Enrico Granata <egranata@apple.com> <rdar://problem/4529976>

Adding data formatters for iterators for std::map and std::vector (both libc++ and libstdcpp)
This does not include reverse iterators since they are both trickier (due to requirements the standard imposes on them) and much less useful



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@175787 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
940ca9447d84a08883d2ce77a765475f09243fc5 08-Feb-2013 Greg Clayton <gclayton@apple.com> Fixed 2 more issues found by the address sanitizer:

1 - A store off the end of a buffer in ValueObject.cpp
2 - DataExtractor had cases where bad offsets could cause invalid memory to be accessed.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@174757 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
4ad049061813fdd19164cdc1bae552eb1a59200b 29-Jan-2013 Enrico Granata <egranata@apple.com> <rdar://problem/12890171>

Providing a compact display mode for "po" to use where the convenience variable name and the pointer value are both hidden.
This is for convenience when dealing with ObjC instances where the description often gets it right and the debugger-provided information is not useful to most people.
If you need either of these, "expr" will still show them.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@173748 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
f509c5ec066599a3399fced39ea36996184939e8 29-Jan-2013 Enrico Granata <egranata@apple.com> <rdar://problem/12978143>

Data formatters now cache themselves.
This commit provides a new formatter cache mechanism. Upon resolving a formatter (summary or synthetic), LLDB remembers the resolution for later faster retrieval.
Also moved the data formatters subsystem from the core to its own group and folder for easier management, and done some code reorganization.
The ObjC runtime v1 now returns a class name if asked for the dynamic type of an object. This is required for formatters caching to work with the v1 runtime.
Lastly, this commit disposes of the old hack where ValueObjects had to remember whether they were queried for formatters with their static or dynamic type.
Now the ValueObjectDynamicValue class works well enough that we can use its dynamic value setting for the same purpose.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@173728 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
36da2aa6dc5ad9994b638ed09eb81c44cc05540b 25-Jan-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/13069948>

Major fixed to allow reading files that are over 4GB. The main problems were that the DataExtractor was using 32 bit offsets as a data cursor, and since we mmap all of our object files we could run into cases where if we had a very large core file that was over 4GB, we were running into the 4GB boundary.

So I defined a new "lldb::offset_t" which should be used for all file offsets.

After making this change, I enabled warnings for data loss and for enexpected implicit conversions temporarily and found a ton of things that I fixed.

Any functions that take an index internally, should use "size_t" for any indexes and also should return "size_t" for any sizes of collections.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@173463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
1a469c75c0597abc2a9abdf86b624b2e71ea8650 23-Jan-2013 Enrico Granata <egranata@apple.com> <rdar://problem/12711206>

Extending ValueObjectDynamicValue so that it stores a TypeAndOrName instead of a TypeSP.
This change allows us to reflect the notion that a ValueObject can have a dynamic type for which we have no debug information.
Previously, we would coalesce that to the static type of the object, potentially losing relevant information or even getting it wrong.
This fix ensures we can correctly report the class name for Cocoa objects whose types are hidden classes that we know nothing about (e.g. __NSArrayI for immutable arrays).
As a side effect, our --show-types argument to frame variable no longer needs to append custom dynamic type information.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@173216 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
b6985793ce97364e6fa86643b942326b218dcb3d 12-Jan-2013 Enrico Granata <egranata@apple.com> <rdar://problem/12239827>

Providing a data formatter for libc++ std::wstring
In the process, refactoring the std::string data formatter to be written in C++ so that commonalities between the two can be exploited
Also, providing a new API on the ValueObject to navigate a hierarchy by index-path
Lastly, an appropriate test case is included



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@172282 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
3ce94041919b44e247c134663281acf3f696b094 14-Dec-2012 Enrico Granata <egranata@apple.com> <rdar://problem/11689939>

Supporting a compact display syntax for ObjC pointers where 0x00.....0 is replaced by a much more legible "nil"
e.g. this would show:
(NSArray *) $2 = nil
instead of:
(NSArray *) $2 = 0x0000000000000000 <nil>



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@170161 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
4f5b299c1f5daf4cce9aad01471a6b558e5b13d2 11-Dec-2012 Enrico Granata <egranata@apple.com> <rdar://problem/12639506>

Make sure that the user's choice of a format for dumping aggregate types is persisted to child members



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169809 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
b9db9d5bb01963774f28540dbe2c5a11f586ff29 07-Dec-2012 Daniel Malea <daniel.malea@intel.com> Fix a few more clang (3.2) warnings on Linux:
- remove unused members
- add NO_PEDANTIC to selected Makefiles
- fix return values (removed NULL as needed)
- disable warning about four-char-constants
- remove unneeded const from operator*() declaration
- add missing lambda function return types
- fix printf() with no format string
- change sizeof to use a type name instead of variable name
- fix Linux ProcessMonitor.cpp to be 32/64 bit friendly
- disable warnings emitted by swig-generated C++ code

Patch by Matt Kopec!



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169645 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
d35b7b3bfd21f4fd6b048693563eef1b772ae197 07-Dec-2012 Daniel Malea <daniel.malea@intel.com> More Linux warnings fixes (remove default labels as needed):
- as per http://llvm.org/docs/CodingStandards.html#don-t-use-default-labels-in-fully-covered-switches-over-enumerations

Patch by Matt Kopec!




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169633 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
b912457e1eb6f97d3ee3adc74d1e0f6393e35d3c 06-Dec-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12560257>

Fixed zero sized arrays to work correctly. This will only happen once we get a clang that emits correct debug info for zero sized arrays. For now I have marked the TestStructTypes.py as an expected failure.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169465 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
d891f9b872103235cfd2ed452c6f14a4394d9b3a 05-Dec-2012 Daniel Malea <daniel.malea@intel.com> Fix Linux build warnings due to redefinition of macros:
- add new header lldb-python.h to be included before other system headers
- short term fix (eventually python dependencies must be cleaned up)

Patch by Matt Kopec!




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169341 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
7c5e22f2edf0a0ef17e3a401c814a873399d108a 30-Oct-2012 Greg Clayton <gclayton@apple.com> Path from Ashok Thirumurthi:

The attached patch adds eValueTypeVector to lldb_private::Value. The nested struct Vector is patterned after RegisterValue::m_data.buffer. This change to Value allows ClangExpressionDeclMap::LookupDecl to return vector register data for consumption by InterpreterStackFrame::ResolveValue. Note that ResolveValue was tweaked slightly to allocate enough memory for vector registers.

An immediate result of this patch is that "expr $xmm0" generates the same results on Linux as on the Mac, which is good enough for TestRegisters.py. In addition, the log of m_memory.PrintData(data_region.m_base, data_region.m_extent) shows that the register content has been resolved successfully. On the other hand, the output is glaringly empty:
runCmd: expr $xmm0
output: (unsigned char __attribute__((ext_vector_type(16)))) $0 = {}
Expecting sub string: vector_type
Matched



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@167033 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
89fda00f52b06b1cfe994c0320a04562b8cc1144 27-Oct-2012 Enrico Granata <egranata@apple.com> Moving ValueObjectCast over to its own .h/.cpp files instead of sharing ValueObjectDynamic.h/.cpp
Removing the IsDynamic() and GetStaticValue() calls, so that they will default to the base class behavior:
- non-dynamic
- itself as the static value
This is in contrast with the previous behavior which could be confusing and could potentially cause issues when using those objects



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166857 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
4a0a1252629a807d37ac252b0239f10204eddedc 24-Oct-2012 Enrico Granata <egranata@apple.com> Reimplementing SBValue/ValueObject.GetValueAsUnsigned() in terms of appropriate calls in Scalar - Making sure Scalar does the right thing when casting signed values to unsigned ones.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166618 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
b8080cb01bb09038eaab15b34be058611c3e7885 23-Oct-2012 Enrico Granata <egranata@apple.com> Fixing a compiler warning about has_children being used before being initialized

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166462 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
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/source/Core/ValueObject.cpp
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/source/Core/ValueObject.cpp
7b6950331083ad156a433bdcc0a6d015e1491714 18-Oct-2012 Enrico Granata <egranata@apple.com> Improvements to the data formatters logging - plus, new log messages when our dynamic type changes

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166133 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
0b2be9dd62618a8e0fd88599b5e081a9c3c47e7e 17-Oct-2012 Enrico Granata <egranata@apple.com> <rdar://problem/12503640> Fixing an issue where the dynamic type of an Objective-C pointer changed but we still reported the one-true-definition for the previous type. This was causing issues where a variable could be reported as being of an entirely different type after an assignment

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166119 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
a510437e795477e5f629263d3d191d982c991733 11-Oct-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12331741>

Dynamic type code must be efficient and fast. Now it is.

Added ObjC v1 support for getting the complete list of ISA values.

The main flow of the AppleObjCRuntime subclasses is now they must override "virtual bool UpdateISAToDescriptorMap_Impl();". This function will update the complete list of ISA values and create ClassDescriptorSP objects for each one. Now we have the complete list of valid ISA values which we can use for verification when doing dynamic typing.

Refactored a bunch of stuff so that the AppleObjCRuntime subclasses don't have to implement as many functions as they used to.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165730 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
f91e78f58692785db4daecf8461481b95827dcf2 13-Sep-2012 Enrico Granata <egranata@apple.com> <rdar://problem/11086338> Implementing support for synthetic children generated by running C++ code instead of Python scripts ; Adding a bunch of value-generating APIs to our private code layer ; Providing synthetic children for NSArray

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163818 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
9b90e87380cfafd7e746252588c314bcfefa4fe4 31-Aug-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12202862>

Added a fix for incorrect dynamic typing. Before when asking if a C++ class could be dynamic, we would answer yes for incomplete C++ classes. This turned out to have issues where if a class was not virtual, yet had its first ivar be an instance of a virtual class, we would incorrectly say that a class was virtual and we would downcast it to be a pointer to the first ivar. We now ask the class to complete itself prior to answering the question. We need to test the effects on memory of this change prior to submission. It is the safest and best fix, but it does have a potential downside of higher memory consumption.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163014 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
49ce8969d3154e1560106cfe530444c09410f217 29-Aug-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11757916>

Make breakpoint setting by file and line much more efficient by only looking for inlined breakpoint locations if we are setting a breakpoint in anything but a source implementation file. Implementing this complex for a many reasons. Turns out that parsing compile units lazily had some issues with respect to how we need to do things with DWARF in .o files. So the fixes in the checkin for this makes these changes:
- Add a new setting called "target.inline-breakpoint-strategy" which can be set to "never", "always", or "headers". "never" will never try and set any inlined breakpoints (fastest). "always" always looks for inlined breakpoint locations (slowest, but most accurate). "headers", which is the default setting, will only look for inlined breakpoint locations if the breakpoint is set in what are consudered to be header files, which is realy defined as "not in an implementation source file".
- modify the breakpoint setting by file and line to check the current "target.inline-breakpoint-strategy" setting and act accordingly
- Modify compile units to be able to get their language and other info lazily. This allows us to create compile units from the debug map and not have to fill all of the details in, and then lazily discover this information as we go on debuggging. This is needed to avoid parsing all .o files when setting breakpoints in implementation only files (no inlines). Otherwise we would need to parse the .o file, the object file (mach-o in our case) and the symbol file (DWARF in the object file) just to see what the compile unit was.
- modify the "SymbolFileDWARFDebugMap" to subclass lldb_private::Module so that the virtual "GetObjectFile()" and "GetSymbolVendor()" functions can be intercepted when the .o file contenst are later lazilly needed. Prior to this fix, when we first instantiated the "SymbolFileDWARFDebugMap" class, we would also make modules, object files and symbol files for every .o file in the debug map because we needed to fix up the sections in the .o files with information that is in the executable debug map. Now we lazily do this in the DebugMapModule::GetObjectFile()

Cleaned up header includes a bit as well.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162860 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
535543d6104ee45b4503db6bb6c175e66d0e093b 09-Aug-2012 Enrico Granata <egranata@apple.com> <rdar://problem/10449092> Adding a new uppercase hex format specifier. This commit also changes the short names for formats so that uppercase hex can be 'X', which was previously assigned to hex float. hex float now has no short name.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161606 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
12213586035d4af8f200e5c8ab4642728f8c5f30 09-Aug-2012 Enrico Granata <egranata@apple.com> <rdar://problem/11505459> Stripping off the object's type from the output of the 'po' command

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161592 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
f4b54c8cd1523da2fa70d7397b2bb93a49421a34 07-Aug-2012 Enrico Granata <egranata@apple.com> Fixing an issue where ValueObject::GetPointeeData() would not work correctly for file addresses when fetching items other than the 0-th

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161384 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
b87efc9a5a9e3c6716f20da8669a6931a7662732 02-Aug-2012 Enrico Granata <egranata@apple.com> <rdar://problem/11846023> Fixing a bug where malformed DWARF could lead to an endless recursion with synthetic children

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161185 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
4a379b1194f3e6b308cd6e80b45d6ca5dd0aafd7 17-Jul-2012 Greg Clayton <gclayton@apple.com> Ran the static analyzer on the codebase and found a few things.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160338 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
e4b5ec026712d56f3cc259900f13158c47cb4d73 05-Jun-2012 Johnny Chen <johnny.chen@apple.com> rdar://problem/11597911

Fix confusing error message about "expression did not evaluate to an address" when doing 'watchpoint set expression".
Instead of using 0 as the fail_value when invoking ValueObject::GetValueAsUnsigned(), modify the API to take an addition
bool pointer (defaults to NULL) to indicate success/failure of value conversion.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@158016 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
6b1763b5ab8f182029807293d74a66e1e1c6bafd 21-May-2012 Enrico Granata <egranata@apple.com> <rdar://problem/11355592> Fixing a bug where we would incorrectly try and determine a dynamic type for a variable of a pointer type that is not a valid generic type for dynamic pointers.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157190 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
45c47aabcb6b1b3861fd15e8cbe2fc7d7d44a71f 16-May-2012 Jason Molenda <jmolenda@apple.com> Add LLDB_DISABLE_PYTHON around newly added methods in
DataVisualization.h / DataVisualization.cpp / ValueObject.cpp
and
FormatManager.h / FormatManager.cpp


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156886 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
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/source/Core/ValueObject.cpp
4758a3ced524198d2cf9c50bab9b088adcbda9cb 08-May-2012 Enrico Granata <egranata@apple.com> First part of a fix to make GetNonSyntheticValue() work correctly

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156397 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
4d609c92183905881daf1a601474a20e6949cc9a 25-Apr-2012 Enrico Granata <egranata@apple.com> Fixing an issue where the expression parser was not correctly freeze-drying bitfields - This patch ensures that (a) freeze-drying bitfields works correctly and (b) that we actually access bitfields through IR instead of the 'frame var en lieu of expr' shortcut, for added safety in corner cases that may arise

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@155494 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
63aa63418b3444bf7dd6e32e8320533390124402 04-Apr-2012 Enrico Granata <egranata@apple.com> Attempt at fixing a crasher where summary strings where looping endlessly.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154028 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
940dd18789f83f28a618a9b588376c8bae557347 30-Mar-2012 Sean Callanan <scallanan@apple.com> Be more careful when overriding the type for a
ValueObject, and make sure that ValueObjects that
have null type names (because they have null types)
also have null qualified type names. This avoids
some potential crashes if
ValueObject::GetQualifiedTypeName tries to get the
name of their type by calling GetClangTypeImpl().


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153718 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
80731ec9368b8e1cbfe093fb9ec257457ef29133 29-Mar-2012 Enrico Granata <egranata@apple.com> Fixing an issue where Unicode characters in an NSString were printed as escape sequences by the summary provider shipping with LLDB - Added relevant test case code. Bonus points for identifying the source of the quotes :-)

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153624 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
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/source/Core/ValueObject.cpp
dc0a38c5a727cae5362b218a3180d0f4265a619d 27-Mar-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11113279>

Fixed type lookups to "do the right thing". Prior to this fix, looking up a type using "foo::bar" would result in a type list that contains all types that had "bar" as a basename unless the symbol file was able to match fully qualified names (which our DWARF parser does not).

This fix will allow type matches to be made based on the basename and then have the types that don't match filtered out. Types by name can be fully qualified, or partially qualified with the new "bool exact_match" parameter to the Module::FindTypes() method.

This fixes some issue that we discovered with dynamic type resolution as well as improves the overall type lookups in LLDB.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153482 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
2aaf59d0bae48c120b0b04028c2a6d125777a708 22-Mar-2012 Greg Clayton <gclayton@apple.com> Added the ability to log a value object just as a value would be display
when using the "frame variable" or "target variable" commands.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153266 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
cf09f885c201becf51acc4a5cfac00b3df53f2a8 19-Mar-2012 Enrico Granata <egranata@apple.com> Massive enumeration name changes: a number of enums in ValueObject were not following the naming pattern
Changes to synthetic children:
- the update(self): function can now (optionally) return a value - if it returns boolean value True, ValueObjectSyntheticFilter will not clear its caches across stop-points
this should allow better performance for Python-based synthetic children when one can be sure that the child ValueObjects have not changed
- making a difference between a synthetic VO and a VO with a synthetic value: now a ValueObjectSyntheticFilter will not return itself as its own synthetic value, but will (correctly)
claim to itself be synthetic
- cleared up the internal synthetic children architecture to make a more consistent use of pointers and references instead of shared pointers when possible
- major cleanup of unnecessary #include, data and functions in ValueObjectSyntheticFilter itself
- removed the SyntheticValueType enum and replaced it with a plain boolean (to which it was equivalent in the first place)
Some clean ups to the summary generation code
Centralized the code that clears out user-visible strings and data in ValueObject
More efficient summaries for libc++ containers


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153061 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
21c8dcfccb1dfe5584ccbe50fb09a44e1994dede 09-Mar-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11016922>

Don't show variable values in Xcode when they are out of scope. This allows Xcode to step a lot faster when there are many variables in the variables view.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152380 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
06cdb8d50b916a0ef1b8d65e3cfd48a26e3d7541 09-Mar-2012 Enrico Granata <egranata@apple.com> Changed ValueObject to use a dedicated ChildrenManager class to store its children, instead of an std::vector
This solves an issue where a ValueObject was getting a wrong children count (usually, a huge value) and trying to resize the vector of children to fit that many ValueObject*

Added a loop detection algorithm to the synthetic children provider for std::list

Added a few more checks to the synthetic children provider for std::vector

Both std::list and std::vector's synthetic children providers now cache the count of children instead of recomputing it every time
std::map has a field that stores the count, so there is little need to cache it on our side


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152371 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
80e7b0f178413d7bbb5affd532feee2106b7000f 07-Mar-2012 Enrico Granata <egranata@apple.com> Fixing an issue where a ValueObject had changed its value but the 'value changed' flag was not being set. This was breaking one of our test cases

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152161 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
de3b25b645e4b4d97a87ebf059056a6c696d4e9c 03-Mar-2012 Enrico Granata <egranata@apple.com> added a new formatter for CF(Mutable)BitVector
fixed a few potential NULL-pointer derefs in ValueObject
we have a way to provide docstrings for properties we add to the SWIG layer - a few of these properties have a docstring already, more will come in future commits
added a new bunch of properties to SBData to make it more natural and Python-like to access the data they contain

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151962 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
3069c62fc7d3c0b857cd1e9269ff22011ed418fb 01-Mar-2012 Enrico Granata <egranata@apple.com> 1) solving a bug where, after Jim's fixes to stack frames, synthetic children were not recalculated when necessary, causing them to get out of sync with live data
2) providing an updated list of tagged pointers values for the objc_runtime module - hopefully this one is final
3) changing ValueObject::DumpValueObject to use an Options class instead of providing a bulky list of parameters to pass around
this change had been laid out previously, but some clients of DumpValueObject() were still using the old prototype and some arguments
were treated in a special way and passed in directly instead of through the Options class
4) providing new GetSummaryAsCString() and GetValueAsCString() calls in ValueObject that are passed a formatter object and a destination string
and fill the string by formatting themselves using the formatter argument instead of the default for the current ValueObject
5) removing the option to have formats and summaries stick to a variable for the current stoppoint
after some debate, we are going with non-sticky: if you say frame variable --format hex foo, the hex format will only be applied to the current command execution and not stick when redisplaying foo
the other option would be full stickiness, which means that foo would be formatted as hex for its whole lifetime
we are open to suggestions on what feels "natural" in this regard


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151801 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
1328b1410eb0f5e03c3b3ee302e9adca3e1b0361 29-Feb-2012 Enrico Granata <egranata@apple.com> This commit:
a) adds a Python summary provider for NSDate
b) changes the initialization for ScriptInterpreter so that we are not passing a bulk of Python-specific function pointers around
c) provides a new ScriptInterpreterObject class that allows for ref-count safe wrapping of scripting objects on the C++ side
d) contains much needed performance improvements:
1) the pointer to the Python function generating a scripted summary is now cached instead of looked up every time
2) redundant memory reads in the Python ObjC runtime wrapper are eliminated
3) summaries now use the m_summary_str in ValueObject to store their data instead of passing around ( == copying) an std::string object
e) contains other minor fixes, such as adding descriptive error messages for some cases of summary generation failure


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151703 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
4dd3d902cb865a4d16d8b2799b6b60324e7f08ea 28-Feb-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/10017623>

Fixed an error where if we tried to format a ValueObject using a format
that was incorrect for a variable, then it would set ValueObject::m_error
to an error state and stop the value from being able to be updated. We now
leave m_error alone and only let the update value code change that. Any errors
in formatting will return a valid value as C string that contains an error
string. This lets us then modify the format and redisplay without any issues.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151581 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
3508c387c3f0c9ecc439d98048fd7694d41bab1b 24-Feb-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/10103468>

I started work on being able to add symbol files after a debug session
had started with a new "target symfile add" command and quickly ran into
problems with stale Address objects in breakpoint locations that had
lldb_private::Section pointers into modules that had been removed or
replaced. This also let to grabbing stale modules from those sections.
So I needed to thread harded the Address, Section and related objects.

To do this I modified the ModuleChild class to now require a ModuleSP
on initialization so that a weak reference can created. I also changed
all places that were handing out "Section *" to have them hand out SectionSP.
All ObjectFile, SymbolFile and SymbolVendors were inheriting from ModuleChild
so all of the find plug-in, static creation function and constructors now
require ModuleSP references instead of Module *.

Address objects now have weak references to their sections which can
safely go stale when a module gets destructed.

This checkin doesn't complete the "target symfile add" command, but it
does get us a lot clioser to being able to do such things without a high
risk of crashing or memory corruption.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151336 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
931acecd4e3af534028936431dc0f75a9fd6eb02 23-Feb-2012 Sean Callanan <scallanan@apple.com> Added support for looking up the complete type for
Objective-C classes. This allows LLDB to find
ivars declared in class extensions in modules other
than where the debugger is currently stopped (we
already supported this when the debugger was
stopped in the same module as the definition).

This involved the following main changes:

- The ObjCLanguageRuntime now knows how to hunt
for the authoritative version of an Objective-C
type. It looks for the symbol indicating a
definition, and then gets the type from the
module containing that symbol.

- ValueObjects now report their type with a
potential override, and the override is set if
the type of the ValueObject is an Objective-C
class or pointer type that is defined somewhere
other than the original reported type. This
means that "frame variable" will always use the
complete type if one is available.

- The ClangASTSource now looks for the complete
type when looking for ivars. This means that
"expr" will always use the complete type if one
is available.

- I added a testcase that verifies that both
"frame variable" and "expr" work.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151214 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
b4d7fc0c466d446876e5f2d701f0e574dd0be8e7 17-Feb-2012 Greg Clayton <gclayton@apple.com> This checking is part one of trying to add some threading safety to our
internals. The first part of this is to use a new class:

lldb_private::ExecutionContextRef

This class holds onto weak pointers to the target, process, thread and frame
and it also contains the thread ID and frame Stack ID in case the thread and
frame objects go away and come back as new objects that represent the same
logical thread/frame.

ExecutionContextRef objcets have accessors to access shared pointers for
the target, process, thread and frame which might return NULL if the backing
object is no longer available. This allows for references to persistent program
state without needing to hold a shared pointer to each object and potentially
keeping that object around for longer than it needs to be.

You can also "Lock" and ExecutionContextRef (which contains weak pointers)
object into an ExecutionContext (which contains strong, or shared pointers)
with code like

ExecutionContext exe_ctx (my_obj->GetExectionContextRef().Lock());



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150801 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
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/source/Core/ValueObject.cpp
0a19a1b9c25117854f226256805239d95153ed2d 04-Feb-2012 Greg Clayton <gclayton@apple.com> Convert all python objects in our API to use overload the __str__ method
instead of the __repr__. __repr__ is a function that should return an
expression that can be used to recreate an python object and we were using
it to just return a human readable string.

Fixed a crasher when using the new implementation of SBValue::Cast(SBType).

Thread hardened lldb::SBValue and lldb::SBWatchpoint and did other general
improvements to the API.

Fixed a crasher in lldb::SBValue::GetChildMemberWithName() where we didn't
correctly handle not having a target.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149743 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
4e6640ee7975a9b9b0854aaa1f4d2d0f08702110 03-Feb-2012 Greg Clayton <gclayton@apple.com> Fixed casting in the lldb::SBValue::Cast(SBType) function.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149673 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
13d24fb1817faa7ccc4cfd799113ba1a2b8968eb 29-Jan-2012 Greg Clayton <gclayton@apple.com> Switching back to using std::tr1::shared_ptr. We originally switched away
due to RTTI worries since llvm and clang don't use RTTI, but I was able to
switch back with no issues as far as I can tell. Once the RTTI issue wasn't
an issue, we were looking for a way to properly track weak pointers to objects
to solve some of the threading issues we have been running into which naturally
led us back to std::tr1::weak_ptr. We also wanted the ability to make a shared
pointer from just a pointer, which is also easily solved using the
std::tr1::enable_shared_from_this class.

The main reason for this move back is so we can start properly having weak
references to objects. Currently a lldb_private::Thread class has a refrence
to its parent lldb_private::Process. This doesn't work well when we now hand
out a SBThread object that contains a shared pointer to a lldb_private::Thread
as this SBThread can be held onto by external clients and if they end up
using one of these objects we can easily crash.

So the next task is to start adopting std::tr1::weak_ptr where ever it makes
sense which we can do with lldb_private::Debugger, lldb_private::Target,
lldb_private::Process, lldb_private::Thread, lldb_private::StackFrame, and
many more objects now that they are no longer using intrusive ref counted
pointer objects (you can't do std::tr1::weak_ptr functionality with intrusive
pointers).



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149207 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
ccf4450f17759b2e6f15eb12134f88a0128dfde7 26-Jan-2012 Greg Clayton <gclayton@apple.com> Fixed formats being able to be applied recursively when using:
target variable -f <format> [args]
frame variable -f <format> [args]
expression -f <format> -- expr



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149080 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
7f86483a19735d0aae876e70445e071bbaa69637 19-Jan-2012 Jim Ingham <jingham@apple.com> ValueObjectRegister type value objects should obey the format in ValueAsCString.
<rdar://problem/10719481>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@148494 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
9175f662273509b1260cff1e077a3a398ccc07d5 12-Jan-2012 Jim Ingham <jingham@apple.com> Fix a comment typo.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@148057 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
ae4ca1b4c35673322847856952579b5ebc9b8a57 07-Jan-2012 Greg Clayton <gclayton@apple.com> Recursive calls to ValueObject::GetSummaryAsCString() are causing crashes.
The previous approach to controlling the recursion was doing it from
outside the function which is not reliable. Now it is being done inside
the function. This might not solve all of the crashes that we were seeing
since there are other functions that clear the bit that indicates that
the summary is in the process of being generated, but it might solve some.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147741 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
1716ad73618aab3cff4d82c3adc11a88ef76273d 29-Dec-2011 Greg Clayton <gclayton@apple.com> <rdar://problem/10546739>

Fixed SBValue::GetValueAsUnsigned() and SBValue::GetValueAsSigned() calls to
work for bitfields.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147332 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
1586d9720002e407a3a097baf302de5fa4ca9c1b 17-Dec-2011 Jim Ingham <jingham@apple.com> Add the ability to capture the return value in a thread's stop info, and print it
as part of the thread format output.
Currently this is only done for the ThreadPlanStepOut.
Add a convenience API ABI::GetReturnValueObject.
Change the ValueObject::EvaluationPoint to BE an ExecutionContextScope, rather than
trying to hand out one of its subsidiary object's pointers. That way this will always
be good.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146806 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
7c53768e700f9181082072017976472e3ad9cc37 10-Dec-2011 Jim Ingham <jingham@apple.com> Don't try to cache the ExecutionContextScope in the ValueObject::EvaluationPoint, it is too
hard to ensure it doesn't get invalidated out from under us. Instead look it up from the ThreadID
and StackID when asked for it.
<rdar://problem/10554409>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146309 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
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/source/Core/ValueObject.cpp
dd6698d7f70feb9a246000eb0fdfae5afe5b2904 02-Dec-2011 Greg Clayton <gclayton@apple.com> <rdar://problem/10410131>

Fixed an issue that could cause an infinite recursion when using "type filter".



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145720 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
97c8957257a3e0b3ce6f46f8e5a28c965e30f357 31-Oct-2011 Daniel Dunbar <daniel@zuster.org> warnings: Fix a bunch of -Wreorder problems.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@143381 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
24a6bd9835ed1655984397b0cdf35127e47681e9 27-Oct-2011 Greg Clayton <gclayton@apple.com> Added support for the new ".apple_objc" accelerator tables. These tables are
in the same hashed format as the ".apple_names", but they map objective C
class names to all of the methods and class functions. We need to do this
because in the DWARF the methods for Objective C are never contained in the
class definition, they are scattered about at the translation unit level and
they don't even have attributes that say the are contained within the class
itself.

Added 3 new formats which can be used to display data:

eFormatAddressInfo
eFormatHexFloat
eFormatInstruction

eFormatAddressInfo describes an address such as function+offset and file+line,
or symbol + offset, or constant data (c string, 2, 4, 8, or 16 byte constants).
The format character for this is "A", the long format is "address".

eFormatHexFloat will print out the hex float format that compilers tend to use.
The format character for this is "X", the long format is "hex float".

eFormatInstruction will print out disassembly with bytes and it will use the
current target's architecture. The format character for this is "i" (which
used to be being used for the integer format, but the integer format also has
"d", so we gave the "i" format to disassembly), the long format is
"instruction".

Mate the lldb::FormatterChoiceCriterion enumeration private as it should have
been from the start. It is very specialized and doesn't belong in the public
API.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@143114 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
103780899f5d73dc11d9c4371f5f355b67b3910d 06-Oct-2011 Greg Clayton <gclayton@apple.com> Stop empty C strings in summaries from showing "<data not available>" when a
"const char *" is NULL. Also cleaned up the display of strings when you have
an array of chars that are all NULL. Previously we were showing: ""...
We now show: ""




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141223 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
567e7f3ba16eb48cb9fd6a2f26f2f7269eb6983c 22-Sep-2011 Greg Clayton <gclayton@apple.com> Converted the lldb_private::Process over to use the intrusive
shared pointers.

Changed the ExecutionContext over to use shared pointers for
the target, process, thread and frame since these objects can
easily go away at any time and any object that was holding onto
an ExecutionContext was running the risk of using a bad object.

Now that the shared pointers for target, process, thread and
frame are just a single pointer (they all use the instrusive
shared pointers) the execution context is much safer and still
the same size.

Made the shared pointers in the the ExecutionContext class protected
and made accessors for all of the various ways to get at the pointers,
references, and shared pointers.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
95b7b4362ca7135be088e4fbf04c2bd15767a104 20-Sep-2011 Jason Molenda <jmolenda@apple.com> Change Error::SetErrorStringWithFormat() prototype to use an
__attribute__ format so the compiler knows that this method takes
printf style formatter arguments and checks that it's being used
correctly. Fix a couple dozen incorrect SetErrorStringWithFormat()
calls throughout the sources.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140115 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
3b23d2097b526c6326b7b7c56d5fc84884d4e08b 10-Sep-2011 Enrico Granata <granata.enrico@gmail.com> Renaming a bulk of method calls from Get() to something more descriptive

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139435 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
716a6286f8fd6d5d0e5da218c34317a16f5baa50 07-Sep-2011 Enrico Granata <granata.enrico@gmail.com> Refactoring of Get() methods in FormatManager/FormatCategory to have explicative names and return shared-pointers instead of bools
Reduced the amount of memory required to avoid loops in DumpPrintableRepresentation() from 32 bits down to 1 bit
- Additionally, disallowed creating summary strings of the form ${var%S} which did nothing but cause endless loops by definition


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139201 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
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/source/Core/ValueObject.cpp
5c3861df62fde02d610a5ed92927a2d89333358b 02-Sep-2011 Greg Clayton <gclayton@apple.com> Added the ability for DWARF locations to use the ABI plug-ins to resolve
register names when dumping variable locations and location lists. Also did
some cleanup where "int" types were being used for "lldb::RegisterKind"
values.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138988 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
ef1923d722126810ef879edb959eed8c85a0742f 23-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Improved the user-friendliness of errors shown by the summary feature in certain areas
Renamed format "signed decimal" to be "decimal". "unsigned decimal" remains unchanged:
- the name "signed decimal" was interfering with symbol %S (use summary) in summary strings.
because of the way summary strings are implemented, this did not really lead to a bug, but
simply to performing more steps than necessary to display a summary. this is fixed.
Documentation improvements (more on synthetic children, some information on filters). This is still a WIP.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138384 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
0be2e9be82cb20dbf03dac41dd48e376e8fee4cb 23-Aug-2011 Enrico Granata <granata.enrico@gmail.com> More cleanups ; Separated implementation of FormatManager from class DataVisualization as a front-end by using separate .h/.cpp files - Final aim is to break up FormatManager.h/cpp into several separate files

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138279 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
37f962e785be99dc4f0c5e9d02416992ff03bbd0 22-Aug-2011 Greg Clayton <gclayton@apple.com> Added a new plug-in type: lldb_private::OperatingSystem. The operating system
plug-ins are add on plug-ins for the lldb_private::Process class that can add
thread contexts that are read from memory. It is common in kernels to have
a lot of threads that are not currently executing on any cores (JTAG debugging
also follows this sort of thing) and are context switched out whose state is
stored in memory data structures. Clients can now subclass the OperatingSystem
plug-ins and then make sure their Create functions correcltly only enable
themselves when the right binary/target triple are being debugged. The
operating system plug-ins get a chance to attach themselves to processes just
after launching or attaching and are given a lldb_private::Process object
pointer which can be inspected to see if the main executable, target triple,
or any shared libraries match a case where the OS plug-in should be used.
Currently the OS plug-ins can create new threads, define the register contexts
for these threads (which can all be different if desired), and populate and
manage the thread info (stop reason, registers in the register context) as
the debug session goes on.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138228 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
6f30287bdc836c715fcac75b06ec58d13b79e715 19-Aug-2011 Enrico Granata <granata.enrico@gmail.com> - Now using ${var} as the summary for an aggregate type will produce "name-of-type @ object-location" instead of giving an error
e.g. you may get "foo_class @ 0x123456" when typing "type summary add -f ${var} foo_class"
- Added a new special formatting token %T for summaries. This shows the type of the object.
Using it, the new "type @ location" summary could be manually generated by writing ${var%T} @ ${var%L}
- Bits and pieces required to support "frame variable array[n-m]"
The feature is not enabled yet because some additional design and support code is required, but the basics
are getting there
- Fixed a potential issue where a ValueObjectSyntheticFilter was not holding on to its SyntheticChildrenSP
Because of the way VOSF are being built now, this has never been an actual issue, but it is still sensible for
a VOSF to hold on to the SyntheticChildrenSP as well as to its FrontEnd


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138080 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
1c61743af946076e988d88baf725382e99d905de 18-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Second round of code cleanups:
- reorganizing classes layout to have public part first
Typedefs that we want to keep private, but must be defined for some public code to work correctly are an exception
- avoiding methods in the form T foo() { code; } all on one-line
- moving method implementations from .h to .cpp whenever feasible
Templatized code is an exception and so are very small methods
- generally, adhering to coding conventions followed project-wide
Functional changes:
- fixed an issue where using ${var} in a summary for an aggregate, and then displaying a pointer-to-aggregate would lead to no summary being displayed
The issue was not a major one because all ${var} was meant to do in that context was display an error for invalid use of pointer
Accordingly fixed test cases and added a new test case


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137944 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
f501c5913d5daaf45a906477bdf466bb74ed10fb 18-Aug-2011 Enrico Granata <granata.enrico@gmail.com> First round of code cleanups:
- all instances of "vobj" have been renamed to "valobj"
- class Debugger::Formatting has been renamed to DataVisualization (defined in FormatManager.h/cpp)
The interface to this class has not changed
- FormatCategory now uses ConstString's as keys to the navigators instead of repeatedly casting
from ConstString to const char* and back all the time
Next step is making the same happen for categories themselves
- category gnu-libstdc++ is defined in the constructor for a FormatManager
The source code for it is defined in gnu_libstdcpp.py, drawn from examples/synthetic at compile time
All references to previous 'osxcpp' name have been removed from both code and file names
Functional changes:
- the name of the option to use a summary string for 'type summary add' has changed from the previous --format-string
to the new --summary-string. It is expected that the short option will change from -f to -s, and -s for --python-script
will become -o


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137886 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
574c3d63822cc7fd52bf6f6a94b6882fec4c8ce9 13-Aug-2011 Jim Ingham <jingham@apple.com> Make ValueObject::SetValueFromCString work correctly.
Also change the SourceInitFile to look for .lldb-<APPNAME> and source that
preferentially if it exists.
Also made the breakpoint site report its address as well as its breakpoint number
when it gets hit and can't find any the associated locations (usually because the
breakpoint got disabled or deleted programmatically between the time it was hit
and reported.)
Changed ThreadPlanCallFunction to initialize the ivar m_func in the initializers of the
constructor, rather than waiting to initialize till later on in the function.
Fixed a bug where if you make an SBError and the ask it Success, it returns false.
Fixed ValueObject::ResolveValue so that it resolves a temporary value, rather than
overwriting the one in the value object.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
c51ffbf896e398ada5f7e89b2fa5aec6f2224f09 12-Aug-2011 Greg Clayton <gclayton@apple.com> We were leaking a stack frame in StackFrameList in Thread.cpp which could
cause extra shared pointer references to one or more modules to be leaked.
This would cause many object files to stay around the life of LLDB, so after
a recompile and rexecution, we would keep adding more and more memory. After
fixing the leak, we found many cases where leaked stack frames were still
being used and causing crashes in the test suite. These are now all resolved.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137516 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
06f0db61da5e218e298ef6db0c4775e3daffc2c8 12-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Added an error message when the user tries to add a filter when a synthetic provider for the same type is already defined in the same category
The converse is also true: an error is shown when the user tries to add a synthetic provider to a category that already has a filter for the same type


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137493 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
db64d95b32062acbf961019aa6c1025237d3145c 12-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Giving a warning to the user the first time children are truncated by the new cap setting

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137462 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
018921dd162d818e71cf1ac86d03422e88f0a674 12-Aug-2011 Enrico Granata <granata.enrico@gmail.com> *Some more optimizations in usage of ConstString
*New setting target.max-children-count gives an upper-bound to the number of child objects that will be displayed at each depth-level
This might be a breaking change in some scenarios. To override the new limit you can use the --show-all-children (-A) option
to frame variable or increase the limit in your lldbinit file
*Command "type synthetic" has been split in two:
- "type synthetic" now only handles Python synthetic children providers
- the new command "type filter" handles filters
Because filters and synthetic providers are both ways to replace the children of a ValueObject, only one can be effective at any given time.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137416 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
9c57fc067307ebb1abe50de6ff704d4b2ae9b9d4 11-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Fixed an issue where a pointer's address was being logged instead of its value
Access to synthetic children by name:
if your object has a synthetic child named foo you can now type
frame variable object.foo (or ->foo if you have a pointer)
and that will print the value of the synthetic child
(if your object has an actual child named foo, the actual child prevails!)
this behavior should also work in summaries, and you should be able to use
${var.foo} and ${svar.foo} interchangeably
(but using svar.foo will mask an actual child named foo)


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137314 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
21f37ad875d4f50d1b4b3d307e120f6d27103730 09-Aug-2011 Jim Ingham <jingham@apple.com> Move the handling of breakpoint conditions from the Private event loop to the StopInfoBreakpoint::DoActions, which happens as the
event is removed. Also use the return value of asynchronous breakpoint callbacks, they get checked before, and override the
breakpoint conditions.

Added ProcessModInfo class, to unify "stop_id generation" and "memory modification generation", and use where needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137102 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
f669850b51f3898020cbae8fdfd17faf4f18ba02 09-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Basic support for reading synthetic children by index:
if your datatype provides synthetic children, "frame variable object[index]" should now do the right thing
in cases where the above syntax would have been rejected before, i.e.
object is not a pointer nor an array (frame variable ignores potential overload of [])
object is a pointer to an Objective-C class (which cannot be dereferenced)
expression will still run operator[] if available and complain if it cannot do so
synthetic children by name do not work yet


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137097 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
80b01e59bda7984c1f4315f544a1e635de3bbd05 05-Aug-2011 Enrico Granata <granata.enrico@gmail.com> fixed a potential memory leak ; small improvement in the formatters lookup algorithm

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
4e5397c1127d698c61df295f30909e573a1c9876 04-Aug-2011 Enrico Granata <granata.enrico@gmail.com> New formatting symbol %# can be used in summary strings to get the "count of children" of a variable
- accordingly, the test cases for the synthetic providers for the std:: containers have been edited to use
${svar%#} instead of ${svar.len} to print out the count of elements ; the .len synthetic child has been
removed from the synthetic providers
The synthetic children providers for the std:: containers now return None when asked for children indexes >= num_children()
Basic code to support filter names based on regular expressions (WIP)


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136862 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
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/source/Core/ValueObject.cpp
441f08ca9d17fad237b93a71aeab9dad74ea1258 03-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Fixed an issue where the KVO swizzled type would be returned as the dynamic type instead of the actual user-level type
- see the test case in lang/objc/objc-dynamic-value for an example
Objective-C dynamic type lookup now works for every Objective-C type
- previously, true dynamic lookup was only performed for type id


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136763 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
7dfb1bb0c83c8472e6736c380e816158c4916acd 03-Aug-2011 Enrico Granata <granata.enrico@gmail.com> bug fix in SBValue::CreateValueFromAddress() where using the resulting VO as a pointer would crash LLDB ; minor improvements in dynamic formatters lookup

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136743 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
afb7c85df796f74262917e44dd68f668dade3911 02-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Fixed a bug where a variable could not be formatted in a summary if its datatype already had a custom format
Fixed a bug where Objective-C variables coming out of the expression parser could crash the Python synthetic providers:
- expression parser output has a "frozen data" component, which is a byte-exact copy of the value (in host memory),
if trying to read into memory based on the host address, LLDB would crash. we are now passing the correct (target)
pointer to the Python code
Objective-C "id" variables are now formatted according to their dynamic type, if the -d option to frame variable is used:
- Code based on the Objective-C 2.0 runtime is used to obtain this information without running code on the target


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136695 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
62fcf03cee420445b28fa79623075bb5ba379a9a 30-Jul-2011 Greg Clayton <gclayton@apple.com> Moved some functionality from ValueObject to ClangASTType.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136536 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
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/source/Core/ValueObject.cpp
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/source/Core/ValueObject.cpp
de4059f2f6a864f5af102a59b56602183b9239bd 22-Jul-2011 Enrico Granata <granata.enrico@gmail.com> some editing of data visualization error messages to make them more meaningful
debugging printfs() for data visualization turned into a meaningful log:
- introduced a new log category `types' in channel `lldb'


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135773 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
e4e3e2c0448bb0c77f8f8a3bbb47b951a481d3d8 22-Jul-2011 Enrico Granata <granata.enrico@gmail.com> when typing a summary string you can use the %S symbol to explicitly indicate that you want the summary to be used to print the target object
(e.g. ${var%S}). this might already be the default if your variable is of an aggregate type
new feature: synthetic filters. you can restrict the number of children for your variables to only a meaningful subset
- the restricted list of children obeys the typical rules (e.g. summaries prevail over children)
- one-line summaries show only the filtered (synthetic) children, if you type an expanded summary string, or you use Python scripts, all the real children are accessible
- to provide a synthetic children list use the "type synth add" command, as in:
type synth add foo_type --child varA --child varB[0] --child varC->packet->flags[1-4]
(you can use ., ->, single-item array operator [N] and bitfield operator [N-M]; array slice access is not supported, giving simplified names to expression paths is not supported)
- a new -S option to frame variable and target variable lets you override synthetic children and instead show real ones

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135731 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
23ba377314a2836f491c650c86e50766e741dcf2 19-Jul-2011 Enrico Granata <granata.enrico@gmail.com> Applied Matt Johnson patch to ValueObject and FormatManager

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135523 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
2bc9eb3ba78efc64a273729b480bafc3bbaa433a 19-Jul-2011 Johnny Chen <johnny.chen@apple.com> Patch by Matt Johnson to silence G++ warnings!
Used hand merge to apply the diffs. I did not apply the diffs for FormatManager.h and
the diffs for memberwise initialization for ValueObject.cpp because they changed since.
I will ask my colleague to apply them later.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135508 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
8a717e596312951672ecd8c54df2d255e6da20ba 19-Jul-2011 Enrico Granata <granata.enrico@gmail.com> Fixed a bug where deleting a regex summary would not immediately reflect in the variables display
The "systemwide summaries" feature has been removed and replaced with a more general and
powerful mechanism.
Categories:
- summaries can now be grouped into buckets, called "categories" (it is expected that categories
correspond to libraries and/or runtime environments)
- to add a summary to a category, you can use the -w option to type summary add and give
a category name (e.g. type summary add -f "foo" foo_t -w foo_category)
- categories are by default disabled, which means LLDB will not look into them for summaries,
to enable a category use "type category enable". once a category is enabled, LLDB will
look into that category for summaries. the rules are quite trivial: every enabled category
is searched for an exact match. if an exact match is nowhere to be found, any match is
searched for in every enabled category (whether it involves cascading, going to base classes,
...). categories are searched into the order in which they were enabled (the most recently
enabled category first, then the second most and so on..)
- by default, most commands that deal with summaries, use a category named "default" if no
explicit -w parameter is given (the observable behavior of LLDB should not change when
categories are not explicitly used)
- the systemwide summaries are now part of a "system" category

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135463 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
7f163b363aeccffeec8eda23bd31e4965abc7226 16-Jul-2011 Enrico Granata <granata.enrico@gmail.com> Some descriptive text for the Python script feature:
- help type summary add now gives some hints on how to use it
frame variable and target variable now have a --no-summary-depth (-Y) option:
- simply using -Y without an argument will skip one level of summaries, i.e.
your aggregate types will expand their children and display no summary, even
if they have one. children will behave normally
- using -Y<int>, as in -Y4, -Y7, ..., will skip as many levels of summaries as
given by the <int> parameter (obviously, -Y and -Y1 are the same thing). children
beneath the given depth level will behave normally
-Y0 is the same as omitting the --no-summary-depth parameter entirely
This option replaces the defined-but-unimplemented --no-summary

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135336 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
90d207ede88604e278f68ee1b02600a35e56dd14 16-Jul-2011 Enrico Granata <granata.enrico@gmail.com> System-wide summaries:
- Summaries for char*, const char* and char[] are loaded at startup as
system-wide summaries. This means you cannot delete them unless you use
the -a option to type summary delete/clear
- You can add your own system-wide summaries by using the -w option to type
summary add
Several code improvements for the Python summaries feature

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135326 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
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/source/Core/ValueObject.cpp
86e7c3ecb82655e77581ec042aa6b31753a42afc 13-Jul-2011 Enrico Granata <granata.enrico@gmail.com> smarter summary strings:
- formats %s %char[] %c and %a now work to print 0-terminated c-strings if they are applied to a char* or char[] even without the [] operator (e.g. ${var%s})
- array formats (char[], intN[], ..) now work when applied to an array of a scalar type even without the [] operator (e.g. ${var%int32_t[]})
LLDB will not crash because of endless loop when trying to obtain a summary for an object that has no value and references itself in its summary string
In many cases, a wrong summary string will now display an "<error>" message instead of giving out an empty string

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135007 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
1a102087f54079c25c8827afac6153a44ca535da 12-Jul-2011 Enrico Granata <granata.enrico@gmail.com> named summaries:
- a new --name option for "type summary add" lets you give a name to a summary
- a new --summary option for "frame variable" lets you bind a named summary to one or more variables
${var%s} now works for printing the value of 0-terminated CStrings
type format test case now tests for cascading
- this is disabled on GCC because GCC may end up stripping typedef chains, basically breaking cascading
new design for the FormatNavigator class
new template class CleanUp2 meant to support cleanup routines with 1 additional parameter beyond resource handle

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134943 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
fb81642e03567a3413d94cdb632b6005a0ad4273 10-Jul-2011 Greg Clayton <gclayton@apple.com> Allow the built in ValueObject summary providers for C strings
use lldb_private::Target::ReadMemory(...) to allow constant strings
to be displayed in global variables prior on in between process
execution.

Centralized the variable declaration dumping into:

bool
Variable::DumpDeclaration (Stream *s, bool show_fullpaths, bool show_module);

Fixed an issue if you used "target variable --regex <regex>" where the
variable name would not be displayed, but the regular expression would.

Fixed an issue when viewing global variables through "target variable"
might not display correctly when doing DWARF in object files.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
24b03108fe8d672bf96b2cfd491e99e601f03218 09-Jul-2011 Greg Clayton <gclayton@apple.com> Fixed the global and static variables to always be in scope.

Made it so that you can create synthetic children of array
value objects. This is for creating array members when the
array index is out of range. This comes in handy when you have
a structure definition like:

struct Collection
{
uint32_t count;
Item array[0];
};
"array" has 1 item, but many times in practice there are more
items in "item_array".

This allows you to do:

(lldb) target variable g_collection.array[3]

To implement this, the get child at index has been modified
to have a "ignore_array_bounds" boolean that can be set to true.





git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134846 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
9f6c6e918c2f8631a02662625a6a72262516670b 09-Jul-2011 Greg Clayton <gclayton@apple.com> Limit the character array summary to 512 bytes.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134827 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
ff78238a2ebc66a683dded02c2f99fba85077d05 08-Jul-2011 Enrico Granata <granata.enrico@gmail.com> final fix for the global constructors issue
new GetValueForExpressionPath() method in ValueObject to navigate expression paths in a more bitfield vs slices aware way
changes to the varformats.html document (WIP)

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134679 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
801417e453f8531ac176cd952200587bf15d9ccf 07-Jul-2011 Greg Clayton <gclayton@apple.com> Added "target variable" command that allows introspection of global
variables prior to running your binary. Zero filled sections now get
section data correctly filled with zeroes when Target::ReadMemory
reads from the object file section data.

Added new option groups and option values for file lists. I still need
to hook up all of the options to "target variable" to allow more complete
introspection by file and shlib.

Added the ability for ValueObjectVariable objects to be created with
only the target as the execution context. This allows them to be read
from the object files through Target::ReadMemory(...).

Added a "virtual Module * GetModule()" function to the ValueObject
class. By default it will look to the parent variable object and
return its module. The module is needed when we have global variables
that have file addresses (virtual addresses that are specific to
module object files) and in turn allows global variables to be displayed
prior to running.

Removed all of the unused proxy object support that bit rotted in
lldb_private::Value.

Replaced a lot of places that used "FileSpec::Compare (lhs, rhs) == 0" code
with the more efficient "FileSpec::Equal (lhs, rhs)".

Improved logging in GDB remote plug-in.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134579 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
91635093b0282d888fcde84a276ae518643c7fca 06-Jul-2011 Jim Ingham <jingham@apple.com> Set the EvaluationPoint's m_thread_id to the RIGHT invalid define...

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134505 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
bafc86e11a23ad23112f67a99e42aac7b0f207d7 06-Jul-2011 Greg Clayton <gclayton@apple.com> Made the string representation for a SBValue return what "frame variable"
would return instead of a less than helpful "name: '%s'" description.

Make sure that when we ask for the error from a ValueObject object we
first update the value if needed.

Cleaned up some SB functions to use internal functions and not re-call
through the public API when possible.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134497 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
9762e10787a7efc2f0d822590cab42ca23d5e4f9 06-Jul-2011 Enrico Granata <granata.enrico@gmail.com> new syntax for summary strings:
- ${*expr} now simply means to dereference expr before actually using it
- bitfields, array ranges and pointer ranges now work in a (hopefully) more natural and language-compliant way
a new class TypeHierarchyNavigator replicates the behavior of the FormatManager in going through type hierarchies
when one-lining summary strings, children's summaries can be used as well as values

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134458 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
886bc3e5cb48e9660692609a7be69ec15b898bd7 02-Jul-2011 Enrico Granata <granata.enrico@gmail.com> several improvements to "type summary":
- type names can now be regular expressions (exact matching is done first, and is faster)
- integral (and floating) types can be printed as bitfields, i.e. ${var[low-high]} will extract bits low thru high of the value and print them
- array subscripts are supported, both for arrays and for pointers. the syntax is ${*var[low-high]}, or ${*var[]} to print the whole array (the latter only works for statically sized arrays)
- summary is now printed by default when a summary string references a variable. if that variable's type has no summary, value is printed instead. to force value, you can use %V as a format specifier
- basic support for ObjectiveC:
- ObjectiveC inheritance chains are now walked through
- %@ can be specified as a summary format, to print the ObjectiveC runtime description for an object
- some bug fixes

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134293 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
1391a391072a4b25c21b7198733ef7aa47a616c7 30-Jun-2011 Enrico Granata <granata.enrico@gmail.com> This commit adds a new top subcommand "summary" to command type named "type". Currently this command
implements three commands:

type summary add <format> <typename1> [<typename2> ...]
type summary delete <typename1> [<typename2> ...]
type summary list [<typename1> [<typename2>] ...]
type summary clear

This allows you to specify the default format that will be used to display
summaries for variables, shown when you use "frame variable" or "expression", or the SBValue classes.

Examples:
type summary add "x = ${var.x}" Point

type summary list

type summary add --one-liner SimpleType

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134108 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
917c000e77fcf657099f59085d6436d179a39ea4 30-Jun-2011 Greg Clayton <gclayton@apple.com> Added support for finding and global variables in the SBTarget and SBModule
level in the public API.

Also modified the ValueObject values to be able to display global variables
without having a valid running process. The globals will read themselves from
the object file section data if there is no process, and from the process if
there is one.

Also fixed an issue where modifications for dynamic types could cause child
values of ValueObjects to not show up if the value was unable to evaluate
itself (children of NULL pointer objects).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134102 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
58513667f6765aa8db13cdc4abd500340c1cac80 25-Jun-2011 Jim Ingham <jingham@apple.com> Add support for looking up ivar offset from the ObjC runtime.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133831 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
3182effd150f2e0381d7c6867236737ac69ad846 23-Jun-2011 Greg Clayton <gclayton@apple.com> Centralized all of the format to c-string and to format character code inside
the FormatManager class. Modified the format arguments in any commands to be
able to use a single character format, or a full format name, or a partial
format name if no full format names match.

Modified any code that was displaying formats to use the new FormatManager
calls so that our help text and errors never get out of date.

Modified the display of the "type format list" command to be a bit more
human readable by showing the format as a format string rather than the single
character format char.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133765 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
ff0c5dfc88c4ece84f8c2a13f0db45f79e12ba65 23-Jun-2011 Greg Clayton <gclayton@apple.com> Another patch from Enrico Granata.

Added a fix for where you might have already displayed something with a given
type, then did a "type format add ...", then you display the type again. This
patch will figure out that the format changed and allow us to display the
type with the correct new format.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133743 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
307fa07606d519d427c812802aff5f9727e7047c 18-Jun-2011 Greg Clayton <gclayton@apple.com> Added a new format for displaying an array of characters: eFormatCharArray
This us useful because sometomes you have to show a single character as: 'a'
(using eFormatChar) and other times you might have an array of single
charcters for display as: 'a' 'b' 'c', and other times you might want to
show the contents of buffer of characters that can contain non printable
chars: "\0\x22\n123".

This also fixes an issue that currently happens when you have a single character
C string (const char *a = "a"; or char b[1] = { 'b' };) that was being output
as "'a'" incorrectly due to the way the eFormatChar format output worked.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133316 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
82f0746880b4a6b18bcf8666670140f5b4a56791 30-May-2011 Greg Clayton <gclayton@apple.com> lldb-59.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@132304 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
bba1d8aa03489141fbd06c6bcea8706ef5fac1e8 07-May-2011 Jim Ingham <jingham@apple.com> Fix an unitialized pointer in ValueObject::CreateChildAtIndex.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131039 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
0039e68f8b6f7f15011f58a36621bec046ef5244 06-May-2011 Greg Clayton <gclayton@apple.com> Added the ability to cast pointer types to another type, no matter what the
ValueObject is, as long as the ValueObject that is being asked to be casted
is a pointer itself.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130966 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
10de7d1db3ec782ea2ccda1f39c0a40b9c301594 04-May-2011 Jim Ingham <jingham@apple.com> Change "frame var" over to using OptionGroups (and thus the OptionGroupVariableObjectDisplay).
Change the boolean "use_dynamic" over to a tri-state, no-dynamic, dynamic-w/o running target,
and dynamic with running target.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130832 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
ef80aabe53b7fdf61309ba6d3d6865c94c681345 02-May-2011 Jim Ingham <jingham@apple.com> Adding support for fetching the Dynamic Value for ObjC Objects.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130701 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
56bbdaf817cb19a2f133e8501473f499be447c2d 28-Apr-2011 Greg Clayton <gclayton@apple.com> Added the ability to specify dumping options (show types, show location,
depth control, pointer depth, and more) when dumping memory and viewing as
a type.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130436 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
47da810225d8674eb9158bcf5f1f5b847cbaeedf 23-Apr-2011 Jim Ingham <jingham@apple.com> Fix up how the ValueObjects manage their life cycle so that you can hand out a shared
pointer to a ValueObject or any of its dependent ValueObjects, and the whole cluster will
stay around as long as that shared pointer stays around.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@130035 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
e41494a9092e15192012a5e0a8a1ffd66c70b8bb 16-Apr-2011 Jim Ingham <jingham@apple.com> Add support for "dynamic values" for C++ classes. This currently only works for "frame var" and for the
expressions that are simple enough to get passed to the "frame var" underpinnings. The parser code will
have to be changed to also query for the dynamic types & offsets as it is looking up variables.

The behavior of "frame var" is controlled in two ways. You can pass "-d {true/false} to the frame var
command to get the dynamic or static value of the variables you are printing.

There's also a general setting:

target.prefer-dynamic-value (boolean) = 'true'

which is consulted if you call "frame var" without supplying a value for the -d option.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129623 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
dbeb3e1e038a75f00fd565203839020e1d00a7c6 11-Apr-2011 Stephen Wilson <wilsons@start.ca> Order of initialization lists.

This patch fixes all of the warnings due to unordered initialization lists.

Patch by Marco Minutoli.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129290 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
0de37195f17fefb536157b3296a18999116b8125 01-Apr-2011 Jim Ingham <jingham@apple.com> Remove unneeded ExecutionContextScope variables.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128685 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
fa3a16a2ea380ef38388ebe323817bd1b32c20cd 31-Mar-2011 Jim Ingham <jingham@apple.com> Convert ValueObject to explicitly maintain the Execution Context in which they were created, and then use that when they update themselves. That means all the ValueObject evaluate me type functions that used to require a Frame object now do not. I didn't remove the SBValue API's that take this now useless frame, but I added ones that don't require the frame, and marked the SBFrame taking ones as deprecated.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@128593 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
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/source/Core/ValueObject.cpp
70c55622e15857e232cf4777a502fa5fe40e785b 18-Mar-2011 Jim Ingham <jingham@apple.com> Relax the constraint on the types of ValueObjects that we'll by default try the
ObjC runtime for print object to Pointer AND Integer (from just pointer.)


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@127841 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
cd548034fa23113e995b8463d14f910ba2f7298c 01-Feb-2011 Greg Clayton <gclayton@apple.com> Endian patch from Kirk Beitz that allows better cross platform building.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124643 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
00c3ae7dac4cf9654d1569735c41e58fb2fd8969 21-Jan-2011 Greg Clayton <gclayton@apple.com> Fixed up the SBValue::GetExpressionPath() to be more correct under more
circumstances.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123957 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
5c9721abf957d95d3ccdb01596bbac42c112f863 17-Jan-2011 Greg Clayton <gclayton@apple.com> Fixed the C string summary formatter to not get into an infinite loop for
long strings in "char *" (with any combo if qualifiers).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123616 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
b01000fd063629facd45044f137446fb748ee179 17-Jan-2011 Greg Clayton <gclayton@apple.com> A few of the issue I have been trying to track down and fix have been due to
the way LLDB lazily gets complete definitions for types within the debug info.
When we run across a class/struct/union definition in the DWARF, we will only
parse the full definition if we need to. This works fine for top level types
that are assigned directly to variables and arguments, but when we have a
variable with a class, lets say "A" for this example, that has a member:
"B *m_b". Initially we don't need to hunt down a definition for this class
unless we are ever asked to do something with it ("expr m_b->getDecl()" for
example). With my previous approach to lazy type completion, we would be able
to take a "A *a" and get a complete type for it, but we wouldn't be able to
then do an "a->m_b->getDecl()" unless we always expanded all types within a
class prior to handing out the type. Expanding everything is very costly and
it would be great if there were a better way.

A few months ago I worked with the llvm/clang folks to have the
ExternalASTSource class be able to complete classes if there weren't completed
yet:

class ExternalASTSource {
....

virtual void
CompleteType (clang::TagDecl *Tag);

virtual void
CompleteType (clang::ObjCInterfaceDecl *Class);
};

This was great, because we can now have the class that is producing the AST
(SymbolFileDWARF and SymbolFileDWARFDebugMap) sign up as external AST sources
and the object that creates the forward declaration types can now also
complete them anywhere within the clang type system.

This patch makes a few major changes:
- lldb_private::Module classes now own the AST context. Previously the TypeList
objects did.
- The DWARF parsers now sign up as an external AST sources so they can complete
types.
- All of the pure clang type system wrapper code we have in LLDB (ClangASTContext,
ClangASTType, and more) can now be iterating through children of any type,
and if a class/union/struct type (clang::RecordType or ObjC interface)
is found that is incomplete, we can ask the AST to get the definition.
- The SymbolFileDWARFDebugMap class now will create and use a single AST that
all child SymbolFileDWARF classes will share (much like what happens when
we have a complete linked DWARF for an executable).

We will need to modify some of the ClangUserExpression code to take more
advantage of this completion ability in the near future. Meanwhile we should
be better off now that we can be accessing any children of variables through
pointers and always be able to resolve the clang type if needed.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123613 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
6a92553d2cc2b7a3b853fcb6da101583435c2dc0 13-Jan-2011 Sean Callanan <scallanan@apple.com> Implemented a major overhaul of the way variables are handled
by LLDB. Instead of being materialized into the input structure
passed to the expression, variables are left in place and pointers
to them are materialzied into the structure. Variables not resident
in memory (notably, registers) get temporary memory regions allocated
for them.

Persistent variables are the most complex part of this, because they
are made in various ways and there are different expectations about
their lifetime. Persistent variables now have flags indicating their
status and what the expectations for longevity are. They can be
marked as residing in target memory permanently -- this is the
default for result variables from expressions entered on the command
line and for explicitly declared persistent variables (but more on
that below). Other result variables have their memory freed.

Some major improvements resulting from this include being able to
properly take the address of variables, better and cleaner support
for functions that return references, and cleaner C++ support in
general. One problem that remains is the problem of explicitly
declared persistent variables; I have not yet implemented the code
that makes references to them into indirect references, so currently
materialization and dematerialization of these variables is broken.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123371 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
a875b64ab8d258b28959d05eea37cb5dfdd72730 09-Jan-2011 Greg Clayton <gclayton@apple.com> Put more smarts into the RegisterContext base class. Now the base class has
a method:

void RegisterContext::InvalidateIfNeeded (bool force);

Each time this function is called, when "force" is false, it will only call
the pure virtual "virtual void RegisterContext::InvalideAllRegisters()" if
the register context's stop ID doesn't match that of the process. When the
stop ID doesn't match, or "force" is true, the base class will clear its
cached registers and the RegisterContext will update its stop ID to match
that of the process. This helps make it easier to correctly flush the register
context (possibly from multiple locations depending on when and where new
registers are availabe) without inadvertently clearing the register cache
when it doesn't need to be.

Modified the ProcessGDBRemote plug-in to be much more efficient when it comes
to:
- caching the expedited registers in the stop reply packets (we were ignoring
these before and it was causing us to read at least three registers every
time we stopped that were already supplied in the stop reply packet).
- When a thread has no stop reason, don't keep asking for the thread stopped
info. Prior to this fix we would continually send a qThreadStopInfo packet
over and over when any thread stop info was requested. We now note the stop
ID that the stop info was requested for and avoid multiple requests.

Cleaned up some of the expression code to not look for ClangExpressionVariable
objects up by name since they are now shared pointers and we can just look for
the exact pointer match and avoid possible errors.

Fixed an bug in the ValueObject code that would cause children to not be
displayed.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123127 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
9db023bd392ede8fc4c92d7dfee64382e08bbd78 08-Jan-2011 Greg Clayton <gclayton@apple.com> Make sure we don't assert if we have a child with zero byte size. Also
we now say that "void *" value objects don't have children.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123092 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
5d187e5495ee17f6763337a6ae28c2a7b07e4945 08-Jan-2011 Greg Clayton <gclayton@apple.com> Spelling changes applied from lldb_spelling.diffs from Bruce Mitchener.

Thanks Bruce!



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123083 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
0e660f59b93339fed530f1a5fd556e6944cc3d82 23-Dec-2010 Jim Ingham <jingham@apple.com> For the language check in GetObjectDescription, if we can't find a language runtime for the value we're looking at, BUT it IS at least a pointer, try the ObjCRuntime language. That's currently the only language runtime that has an object description method anyway...

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@122465 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
bdcda468276dc9ab6bf648fc8cc07f3faad91526 20-Dec-2010 Greg Clayton <gclayton@apple.com> The LLDB API (lldb::SB*) is now thread safe!



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@122262 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
c3b61d239a53271d013b82ffaba6ab4e92b7fcc1 15-Dec-2010 Greg Clayton <gclayton@apple.com> Fixed the "expression" command object to use the StackFrame::GetValueForExpressionPath()
function and also hooked up better error reporting for when things fail.

Fixed issues with trying to display children of pointers when none are
supposed to be shown (no children for function pointers, and more like this).
This was causing child value objects to be made that were correctly firing
an assertion.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121841 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
427f290ff96f3ab9f2cf3a1af7001d2c560424c7 14-Dec-2010 Greg Clayton <gclayton@apple.com> Modified LLDB expressions to not have to JIT and run code just to see variable
values or persistent expression variables. Now if an expression consists of
a value that is a child of a variable, or of a persistent variable only, we
will create a value object for it and make a ValueObjectConstResult from it to
freeze the value (for program variables only, not persistent variables) and
avoid running JITed code. For everything else we still parse up and JIT code
and run it in the inferior.

There was also a lot of clean up in the expression code. I made the
ClangExpressionVariables be stored in collections of shared pointers instead
of in collections of objects. This will help stop a lot of copy constructors on
these large objects and also cleans up the code considerably. The persistent
clang expression variables were moved over to the Target to ensure they persist
across process executions.

Added the ability for lldb_private::Target objects to evaluate expressions.
We want to evaluate expressions at the target level in case we aren't running
yet, or we have just completed running. We still want to be able to access the
persistent expression variables between runs, and also evaluate constant
expressions.

Added extra logging to the dynamic loader plug-in for MacOSX. ModuleList objects
can now dump their contents with the UUID, arch and full paths being logged with
appropriate prefix values.

Thread hardened the Communication class a bit by making the connection auto_ptr
member into a shared pointer member and then making a local copy of the shared
pointer in each method that uses it to make sure another thread can't nuke the
connection object while it is being used by another thread.

Added a new file to the lldb/test/load_unload test that causes the test a.out file
to link to the libd.dylib file all the time. This will allow us to test using
the DYLD_LIBRARY_PATH environment variable after moving libd.dylib somewhere else.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121745 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
6916e358c9725b75ed91f31236c147f26c9af10e 13-Nov-2010 Greg Clayton <gclayton@apple.com> Modified the lldb_private::Type clang type resolving code to handle three
cases when getting the clang type:
- need only a forward declaration
- need a clang type that can be used for layout (members and args/return types)
- need a full clang type

This allows us to partially parse the clang types and be as lazy as possible.
The first case is when we just need to declare a type and we will complete it
later. The forward declaration happens only for class/union/structs and enums.
The layout type allows us to resolve the full clang type _except_ if we have
any modifiers on a pointer or reference (both R and L value). In this case
when we are adding members or function args or return types, we only need to
know how the type will be laid out and we can defer completing the pointee
type until we later need it. The last type means we need a full definition for
the clang type.

Did some renaming of some enumerations to get rid of the old "DC" prefix (which
stands for DebugCore which is no longer around).

Modified the clang namespace support to be almost ready to be fed to the
expression parser. I made a new ClangNamespaceDecl class that can carry around
the AST and the namespace decl so we can copy it into the expression AST. I
modified the symbol vendor and symbol file plug-ins to use this new class.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118976 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
0baa394cd55c6dfb7a6259d215d0dea2b708067b 04-Nov-2010 Greg Clayton <gclayton@apple.com> Added support for loading and unloading shared libraries. This was done by
adding support into lldb_private::Process:

virtual uint32_t
lldb_private::Process::LoadImage (const FileSpec &image_spec,
Error &error);

virtual Error
lldb_private::Process::UnloadImage (uint32_t image_token);

There is a default implementation that should work for both linux and MacOSX.
This ability has also been exported through the SBProcess API:

uint32_t
lldb::SBProcess::LoadImage (lldb::SBFileSpec &image_spec,
lldb::SBError &error);

lldb::SBError
lldb::SBProcess::UnloadImage (uint32_t image_token);

Modified the DynamicLoader plug-in interface to require it to be able to
tell us if it is currently possible to load/unload a shared library:

virtual lldb_private::Error
DynamicLoader::CanLoadImage () = 0;

This way the dynamic loader plug-ins are allows to veto whether we can
currently load a shared library since the dynamic loader might know if it is
currenlty loading/unloading shared libraries. It might also know about the
current host system and know where to check to make sure runtime or malloc
locks are currently being held.

Modified the expression parser to have ClangUserExpression::Evaluate() be
the one that causes the dynamic checkers to be loaded instead of other code
that shouldn't have to worry about it.






git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118227 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
a564ec6ffca0561d6a68d331985b5e7a4b46e793 02-Nov-2010 Greg Clayton <gclayton@apple.com> Print better error messages when memory reads fail when displaying variable
values.

Always show the variable types for the top level items when dumping program
variables.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117999 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
3f5ee7fd6991891f0892bd71537763d9b59acd12 29-Oct-2010 Greg Clayton <gclayton@apple.com> Modified the lldb_private::TypeList to use a std::multimap for quicker lookup
by type ID (the most common type of type lookup).

Changed the API logging a bit to always show the objects in the OBJECT(POINTER)
format so it will be easy to locate all instances of an object or references
to it when looking at logs.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117641 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
f3d0b0c8081691128626eb496fdfcbf8ae54c1de 27-Oct-2010 Greg Clayton <gclayton@apple.com> Updated the lldb_private::Flags class to have better method names and made
all of the calls inlined in the header file for better performance.

Fixed the summary for C string types (array of chars (with any combo if
modifiers), and pointers to chars) work in all cases.

Fixed an issue where a forward declaration to a clang type could cause itself
to resolve itself more than once if, during the resolving of the type itself
it caused something to try and resolve itself again. We now remove the clang
type from the forward declaration map in the DWARF parser when we start to
resolve it and avoid this additional call. This should stop any duplicate
members from appearing and throwing all the alignment of structs, unions and
classes.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117437 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
e67bf037a79f9d89d1b06b4990eee9642698d37b 23-Oct-2010 Sean Callanan <scallanan@apple.com> Fixed value objects so that they return an
informative message when they have no description.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117190 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
713308ef75824b7c9f546a588fa9e87463afee95 22-Oct-2010 Greg Clayton <gclayton@apple.com> Fixed a error formatting output issue when dumping variables where the error had no space before it and was missing a newline.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117086 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
bf8e42b9da0e1c6349a727d644ad37610b00d556 15-Oct-2010 Greg Clayton <gclayton@apple.com> Fixed an expression parsing issue where if you were stopped somewhere without
debug information and you evaluated an expression, a crash would occur as a
result of an unchecked pointer.

Added the ability to get the expression path for a ValueObject. For a rectangle
point child "x" the expression path would be something like: "rect.top_left.x".
This will allow GUI and command lines to get ahold of the expression path for
a value object without having to explicitly know about the hierarchy. This
means the ValueObject base class now has a "ValueObject *m_parent;" member.
All ValueObject subclasses now correctly track their lineage and are able
to provide value expression paths as well.

Added a new "--flat" option to the "frame variable" to allow for flat variable
output. An example of the current and new outputs:

(lldb) frame variable
argc = 1
argv = 0x00007fff5fbffe80
pt = {
x = 2
y = 3
}
rect = {
bottom_left = {
x = 1
y = 2
}
top_right = {
x = 3
y = 4
}
}
(lldb) frame variable --flat
argc = 1
argv = 0x00007fff5fbffe80
pt.x = 2
pt.y = 3
rect.bottom_left.x = 1
rect.bottom_left.y = 2
rect.top_right.x = 3
rect.top_right.y = 4


As you can see when there is a lot of hierarchy it can help flatten things out.
Also if you want to use a member in an expression, you can copy the text from
the "--flat" output and not have to piece it together manually. This can help
when you want to use parts of the STL in expressions:

(lldb) frame variable --flat
argc = 1
argv = 0x00007fff5fbffea8
hello_world._M_dataplus._M_p = 0x0000000000000000
(lldb) expr hello_world._M_dataplus._M_p[0] == '\0'




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116532 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
11730f38ab136f60497beb2ef15feb98a6c33a50 06-Oct-2010 Greg Clayton <gclayton@apple.com> Restored the ability to set the format for expressions after changing the expression results over to ValueObjectSP objects.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115733 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
d171972ecc7788bdb02d3e81420a24841e09a2bf 05-Oct-2010 Greg Clayton <gclayton@apple.com> Added the notion that a value object can be constant by adding:
bool ValueObject::GetIsConstant() const;
void ValueObject::SetIsConstant();

This will stop anything from being re-evaluated within the value object so
that constant result value objects can maintain their frozen values without
anything being updated or changed within the value object.

Made it so the ValueObjectConstResult can be constructed with an
lldb_private::Error object to allow for expression results to have errors.

Since ValueObject objects contain error objects, I changed the expression
evaluation in ClangUserExpression from

static Error
ClangUserExpression::Evaluate (ExecutionContext &exe_ctx,
const char *expr_cstr,
lldb::ValueObjectSP &result_valobj_sp);

to:

static lldb::ValueObjectSP
Evaluate (ExecutionContext &exe_ctx, const char *expr_cstr);

Even though expression parsing is borked right now (pending fixes coming from
Sean Callanan), I filled in the implementation for:

SBValue SBFrame::EvaluateExpression (const char *expr);

Modified all expression code to deal with the above changes.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115589 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
66ed2fbeaf588fe4105a1305f7e956dcf9fbe299 05-Oct-2010 Greg Clayton <gclayton@apple.com> Added a new ValueObject type that will be used to freeze dry expression
results. The clang opaque type for the expression result will be added to the
Target's ASTContext, and the bytes will be stored in a DataBuffer inside
the new object. The class is named: ValueObjectConstResult

Now after an expression is evaluated, we can get a ValueObjectSP back that
contains a ValueObjectConstResult object.

Relocated the value object dumping code into a static function within
the ValueObject class instead of being in the CommandObjectFrame.cpp file
which is what contained the code to dump variables ("frame variables").




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115578 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
462d4147f3bb9141bf62d904f58a623db00669df 29-Sep-2010 Greg Clayton <gclayton@apple.com> Fixed the forward declaration issue that was present in the DWARF parser after
adding methods to C++ and objective C classes. In order to make methods, we
need the function prototype which means we need the arguments. Parsing these
could cause a circular reference that caused an assertion.

Added a new typedef for the clang opaque types which are just void pointers:
lldb::clang_type_t. This appears in lldb-types.h.

This was fixed by enabling struct, union, class, and enum types to only get
a forward declaration when we make the clang opaque qual type for these
types. When they need to actually be resolved, lldb_private::Type will call
a new function in the SymbolFile protocol to resolve a clang type when it is
not fully defined (clang::TagDecl::getDefinition() returns NULL). This allows
us to be a lot more lazy when parsing clang types and keeps down the amount
of data that gets parsed into the ASTContext for each module.

Getting the clang type from a "lldb_private::Type" object now takes a boolean
that indicates if a forward declaration is ok:

clang_type_t lldb_private::Type::GetClangType (bool forward_decl_is_ok);

So function prototypes that define parameters that are "const T&" can now just
parse the forward declaration for type 'T' and we avoid circular references in
the type system.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115012 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
974fddb5c78e9a754f0894c99a70ed777a8548c3 28-Sep-2010 Johnny Chen <johnny.chen@apple.com> Fix from Jean-Daniel. Thanks.

Error in object runtime language detection code (spurious '; ')
Also replace false by NULL in a place where the compiler expects a pointer instead of a bool.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114957 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
b66cd074ec097b5b0a6f2ce292f5072aa1217ca6 28-Sep-2010 Jim Ingham <jingham@apple.com> Replace the vestigial Value::GetOpaqueCLangQualType with the more correct Value::GetValueOpaqueClangQualType.

But mostly, move the ObjC Trampoline handling code from the MacOSX dyld plugin to the AppleObjCRuntime classes.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114935 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
642036f22366d47ea8e6f8498bedb92b88f7f79f 23-Sep-2010 Jim Ingham <jingham@apple.com> Committing the skeleton of Language runtime plugin classes.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114620 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
fe424a92fc6fd92f810d243912461fe028a2b63c 18-Sep-2010 Greg Clayton <gclayton@apple.com> General command line help cleanup:
- All single character options will now be printed together
- Changed all options that contains underscores to contain '-' instead
- Made the help come out a little flatter by showing the long and short
option on the same line.
- Modified the short character for "--ignore-count" options to "-i"



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114265 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
eea264007bc5fb42c8f3239726a9d28ae42e1b7b 15-Sep-2010 Greg Clayton <gclayton@apple.com> Moved the section load list up into the target so we can use the target
to symbolicate things without the need for a valid process subclass.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113895 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
03e0f97cfa469792dd69b36f782d33a014225788 13-Sep-2010 Greg Clayton <gclayton@apple.com> Added the summary values for function pointers so we can show where they
point to.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113735 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
4ae519666628cca07c194bf677163009cc2e5a8b 11-Sep-2010 Jim Ingham <jingham@apple.com> Move the "Object Description" into the ValueObject, and the add an API to
SBValue to access it. For now this is just the result of ObjC NSPrintForDebugger,
but could be extended. Also store the results of the ObjC Object Printer in a
Stream, not a ConstString.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113660 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
17dae081d7b88d24a7af6b07c10fc5981f81e2a9 02-Sep-2010 Greg Clayton <gclayton@apple.com> StackFrame objects now own ValueObjects for any frame variables (locals, args,
function statics, file globals and static variables) that a frame contains.
The StackFrame objects can give out ValueObjects instances for
each variable which allows us to track when a variable changes and doesn't
depend on variable names when getting value objects.

StackFrame::GetVariableList now takes a boolean to indicate if we want to
get the frame compile unit globals and static variables.

The value objects in the stack frames can now correctly track when they have
been modified. There are a few more tweaks needed to complete this work. The
biggest issue is when stepping creates partial stacks (just frame zero usually)
and causes previous stack frames not to match up with the current stack frames
because the previous frames only has frame zero. We don't really want to
require that all previous frames be complete since stepping often must check
stack frames to complete their jobs. I will fix this issue tomorrow.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112800 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
ca499a544ff3c331099a90402489c92ca0999d54 28-Aug-2010 Greg Clayton <gclayton@apple.com> Detect when ValueObject values change each time they are evaluated.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112331 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
1674b12bbc3dae7b9543b8c5f958e90ddc767fa4 22-Jul-2010 Greg Clayton <gclayton@apple.com> Change over to using the definitions for mach-o types and defines to the
defines that are in "llvm/Support/MachO.h". This should allow ObjectFileMachO
and ObjectContainerUniversalMachO to be able to be cross compiled in Linux.

Also did some cleanup on the ASTType by renaming it to ClangASTType and
renaming the header file. Moved a lot of "AST * + opaque clang type *"
functionality from lldb_private::Type over into ClangASTType.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109046 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
53d68e749f0715691a95f23e9490d97e484b15da 21-Jul-2010 Greg Clayton <gclayton@apple.com> Remove use of STL collection class use of the "data()" method since it isn't
part of C++'98. Most of these were "std::vector<T>::data()" and
"std::string::data()".



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@108957 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
bef1583b89e73de77c8b0897fcf42b5b1fcabe4c 14-Jul-2010 Greg Clayton <gclayton@apple.com> I enabled some extra warnings for hidden local variables and for hidden
virtual functions and caught some things and did some general code cleanup.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@108299 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
54e7afa84d945f9137f9372ecde432f9e1a702fc 09-Jul-2010 Greg Clayton <gclayton@apple.com> Merged Eli Friedman's linux build changes where he added Makefile files that
enabled LLVM make style building and made this compile LLDB on Mac OS X. We
can now iterate on this to make the build work on both linux and macosx.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@108009 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
a408326b499c3ffdfed2378738598c4ad0cf745f 09-Jun-2010 Eli Friedman <eli.friedman@gmail.com> Add missing includes.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@105712 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Core/ValueObject.cpp
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/source/Core/ValueObject.cpp