History log of /external/lldb/source/API/SBValue.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/API/SBValue.cpp
bef2dde1407f2b7b7cf36739d23439c8f1dd0fc4 15-May-2013 Jim Ingham <jingham@apple.com> Change the mechanism around SBValue::GetSP() so that it always requires the target API lock AND the
process StopLocker (if there is a process) before it will hand out SBValues. We were doing this in
an ad hoc fashion previously, and then playing whack-a-mole whenever we found a place where we should
have been doing this but weren't. Really, it doesn't make sense to be poking at SBValues when the target
is running, the dynamic and synthetic values can't really be computed, and the underlying memory may be
incoherent.

<rdar://problem/13819378> Sometimes when stepping fast, my inferior is killed by debugserver


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181863 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.cpp
bf26ea6ffa9426b8f23c78aa8cf18b809beb364c 23-Apr-2013 Enrico Granata <egranata@apple.com> Daniel Malea reported seeing warnings for the use of anonymous namespaces in our public API.
Removing these namespace { ... } declarations (but still keeping the helper *Impl objects outside of namespace lldb proper)

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180067 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.cpp
102b2c2681c9a830afe25bfea35557421905e42c 19-Apr-2013 Greg Clayton <gclayton@apple.com> After discussing with Chris Lattner, we require C++11, so lets get rid of the macros and just use C++11.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179805 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.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/API/SBValue.cpp
03dd6a4202cad821f06911d6b961b21b13a3e449 04-Apr-2013 Jim Ingham <jingham@apple.com> The SBValue impl class's GetSP can now fetch the dynamic type or the synthetic
children - which it may have to compute. Thus it needs to take the API lock.

<rdar://problem/13560869>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178734 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.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/API/SBValue.cpp
fe9d7bf031886309d33a575c67aad2d313bbc60a 28-Feb-2013 Enrico Granata <egranata@apple.com> Fixing the log line for SBValue::MightHaveChildren() to report the correct function name

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176232 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.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/API/SBValue.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/API/SBValue.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/API/SBValue.cpp
5f35a4be95aed0e5b2cb36f7d785bcbfc67284ae 29-Nov-2012 Daniel Malea <daniel.malea@intel.com> Resolve printf formatting warnings on Linux:
- use macros from inttypes.h for format strings instead of OS-specific types

Patch from Matt Kopec!



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@168945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.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/API/SBValue.cpp
0fd6c8dc95068f9c05f4706bc97ff25bf75684a2 24-Oct-2012 Enrico Granata <egranata@apple.com> <rdar://problem/12481949> Fixing SBValue.GetValueAsSigned() to do the right thing when dealing with a 32-bit negative value

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166603 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.cpp
9e376625d6354d77cd6240007f0d42034dd3f1ee 23-Oct-2012 Jim Ingham <jingham@apple.com> Watchpoints remember the type of the expression or variable they were set with, and use
it to print the old and new values.
Temporarily disable the "out of scope" checking since it didn't work correctly, and was
not what people generally expected watchpoints to be doing.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@166472 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.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/API/SBValue.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/API/SBValue.cpp
75a443b04197d18c7034968e11ce831166df3703 17-Oct-2012 Greg Clayton <gclayton@apple.com> API cleanup.



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

<rdar://problem/12457211>


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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165672 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.cpp
851e30ec6a1b1d2c154bb7d69ed0d05b5fd14705 18-Sep-2012 Greg Clayton <gclayton@apple.com> Stop using the "%z" size_t modifier and cast all size_t values to uint64_t. Some platforms don't support this modification.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164148 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.cpp
d27026e46d8430fb451d85ac161a8492e1930245 05-Sep-2012 Enrico Granata <egranata@apple.com> Implementing an Options class for EvaluateExpression() in order to make the signature more compact and make it easy to 'just run an expression'

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@163239 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.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/API/SBValue.cpp
684d401c119c41f36d1bb6d2d0ae733fbfb537f3 21-Aug-2012 Jim Ingham <jingham@apple.com> SBValue::GetTypeName and SBValue::GetByteSize might have to update the dynamic value - which might involve running code. So they need to take the stop lock & target locks.

<rdar://problem/12001204>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@162250 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.cpp
9c4a3442b99aa324f1ee41ecf85a460452b01feb 05-Jun-2012 Johnny Chen <johnny.chen@apple.com> Funnel the old API call SBValue::Watch (bool resolve_location, bool read, bool write) to the one which takes an SBError.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157969 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.cpp
8a5ce77ad5356af485a119186fc2ad536d21149b 05-Jun-2012 Johnny Chen <johnny.chen@apple.com> Cannot break the existing API client of SBValue::Watch(bool resolve_location, bool read, bool write).
Leave this method in the codebase for a while.


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

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

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


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157964 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.cpp
12b7ea35275fe86d7393811080b93cf656805aca 04-Jun-2012 Greg Clayton <gclayton@apple.com> Patch that fixes log messages in SBValue.cpp from Lau Sennels.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@157949 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.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/API/SBValue.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/API/SBValue.cpp
5b4905dbd678c8e96d2b9a760e3d28dc4592221a 13-Apr-2012 Jim Ingham <jingham@apple.com> Couple more places in SBValue where you need to take the run-lock.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154683 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.cpp
9f3c98e1cfdb463848cb13d03312fab8a5ec7f0d 06-Apr-2012 Greg Clayton <gclayton@apple.com> Added logging when API calls try to do something that shouldn't be done when the process is stopped by having logging calls that end with "error: process is running".

Also test for the process to be stopped when many SBValue API calls are made to make sure it is safe to evaluate values, children of values and much more.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154160 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.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/API/SBValue.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/API/SBValue.cpp
598df88bd6fc33c6fb330bc859bdc277795501f3 14-Mar-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/10434005>

Prepare LLDB to be built with C++11 by hiding all accesses to std::tr1 behind
macros that allows us to easily compile for either C++.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152698 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.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/API/SBValue.cpp
c48ca82920bd333c7ccb6ec0e579207add130296 21-Feb-2012 Jason Molenda <jmolenda@apple.com> Patch Enrico's changes from r150558 on 2012-02-14 to build even if Python
is not available (LLDB_DISABLE_PYTHON is defined).

Change build-swig-Python.sh to emit an empty LLDBPythonWrap.cpp file if
this build is LLDB_DISABLE_PYTHON.

Change the "Copy to Xcode.app" shell script phase in the lldb.xcodeproj
to only do this copying for Mac native builds.


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


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150784 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.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/API/SBValue.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/API/SBValue.cpp
4eb01a76678281b40c0cbe8cc728e2f7c4598710 31-Jan-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/10776614>

Fixed an issue where we can crash if you call cast when the SBValue
doesn't contain a valid value.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149345 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.cpp
334d33a19fd28cf41cba74cc61cf149e7101a603 30-Jan-2012 Greg Clayton <gclayton@apple.com> SBFrame is now threadsafe using some extra tricks. One issue is that stack
frames might go away (the object itself, not the actual logical frame) when
we are single stepping due to the way we currently sometimes end up flushing
frames when stepping in/out/over. They later will come back to life
represented by another object yet they have the same StackID. Now when you get
a lldb::SBFrame object, it will track the frame it is initialized with until
the thread goes away or the StackID no longer exists in the stack for the
thread it was created on. It uses a weak_ptr to both the frame and thread and
also stores the StackID. These three items allow us to determine when the
stack frame object has gone away (the weak_ptr will be NULL) and allows us to
find the correct frame again. In our test suite we had such cases where we
were just getting lucky when something like this happened:

1 - stop at breakpoint
2 - get first frame in thread where we stopped
3 - run an expression that causes the program to JIT and run code
4 - run more expressions on the frame from step 2 which was very very luckily
still around inside a shared pointer, yet, not part of the current
thread (a new stack frame object had appeared with the same stack ID and
depth).

We now avoid all such issues and properly keep up to date, or we start
returning errors when the frame doesn't exist and always responds with
invalid answers.

Also fixed the UserSettingsController (not going to rewrite this just yet)
so that it doesn't crash on shutdown. Using weak_ptr's came in real handy to
track when the master controller has already gone away and this allowed me to
pull out the previous NotifyOwnerIsShuttingDown() patch as it is no longer
needed.




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

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

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

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

And now this happens:

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

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

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

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

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



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149218 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.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/API/SBValue.cpp
daa6efe771f5f068e29328a774fa5bf2358ce14a 21-Dec-2011 Sean Callanan <scallanan@apple.com> The "desired result type" code in the expression
parser has hitherto been an implementation waiting
for a use. I have now tied the '-o' option for
the expression command -- which indicates that the
result is an Objective-C object and needs to be
printed -- to the ExpressionParser, which
communicates the desired type to Clang.

Now, if the result of an expression is determined
by an Objective-C method call for which there is
no type information, that result is implicitly
cast to id if and only if the -o option is passed
to the expression command. (Otherwise if there
is no explicit cast Clang will issue an error.
This behavior is identical to what happened before
r146756.)

Also added a testcase for -o enabled and disabled.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147099 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.cpp
9fd2e38a1fa7f5cbbf70de0e2de35f72d77aced5 20-Dec-2011 Johnny Chen <johnny.chen@apple.com> Work in progress for:

rdar://problem/10577182
Audit lldb API impl for places where we need to perform a NULL check

Add a NULL check for SBValue.CreateValueFromExpression().


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


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146902 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.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/API/SBValue.cpp
943485c90bdee0cf29304418b6dd16ee9927633a 15-Dec-2011 Johnny Chen <johnny.chen@apple.com> http://llvm.org/bugs/show_bug.cgi?id=11579
lldb::SBValue::CreateValueFromAddress does not verify SBType::GetPointerType succeeds

SBValue::CreateValueFromAddress() should check the validity of type and its derived pointer type
before using it. Add a test case.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146629 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.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/API/SBValue.cpp
96154be69fa240a662419183ed08e1cfc5418164 13-Nov-2011 Greg Clayton <gclayton@apple.com> <rdar://problem/10126482>

Fixed an issues with the SBType and SBTypeMember classes:
- Fixed SBType to be able to dump itself from python
- Fixed SBType::GetNumberOfFields() to return the correct value for objective C interfaces
- Fixed SBTypeMember to be able to dump itself from python
- Fixed the SBTypeMember ability to get a field offset in bytes (the value
being returned was wrong)
- Added the SBTypeMember ability to get a field offset in bits


Cleaned up a lot of the Stream usage in the SB API files.



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

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

Modified the watchpoint related test suite to reflect the change.

Plus replacing WatchpointLocation with Watchpoint throughout the code base.

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


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



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141876 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.cpp
a8428a458e779a64c8642fef5d29c7f6cc1b95f9 22-Sep-2011 Sean Callanan <scallanan@apple.com> Fixed a problem with the IR interpreter that caused
it to generate result variables that were not bound
to their underlying data. This allowed the SBValue
class to use the interpreter (if possible).

Also made sure that any result variables that point
to stack allocations in the stack frame of the
interpreted expressions do not get live data.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140285 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.cpp
7e5fa7fc1f8efd24c078e063b2c4b5e13ba5be20 20-Sep-2011 Jason Molenda <jmolenda@apple.com> Update declarations for all functions/methods that accept printf-style
stdarg formats to use __attribute__ format so the compiler can flag
incorrect uses. Fix all incorrect uses. Most of these are innocuous,
a few were resulting in crashes.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140185 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.cpp
47dc457387b690c5e4df1c0c7dd8c4337b92e630 15-Sep-2011 Sean Callanan <scallanan@apple.com> This patch modifies the expression parser to allow it
to execute expressions even in the absence of a process.
This allows expressions to run in situations where the
target cannot run -- e.g., to perform calculations based
on type information, or to inspect a binary's static
data.

This modification touches the following files:

lldb-private-enumerations.h
Introduce a new enum specifying the policy for
processing an expression. Some expressions should
always be JITted, for example if they are functions
that will be used over and over again. Some
expressions should always be interpreted, for
example if the target is unsafe to run. For most,
it is acceptable to JIT them, but interpretation
is preferable when possible.

Target.[h,cpp]
Have EvaluateExpression now accept the new enum.

ClangExpressionDeclMap.[cpp,h]
Add support for the IR interpreter and also make
the ClangExpressionDeclMap more robust in the
absence of a process.

ClangFunction.[cpp,h]
Add support for the new enum.

IRInterpreter.[cpp,h]
New implementation.

ClangUserExpression.[cpp,h]
Add support for the new enum, and for running
expressions in the absence of a process.

ClangExpression.h
Remove references to the old DWARF-based method
of evaluating expressions, because it has been
superseded for now.

ClangUtilityFunction.[cpp,h]
Add support for the new enum.

ClangExpressionParser.[cpp,h]
Add support for the new enum, remove references
to DWARF, and add support for checking whether
the expression could be evaluated statically.

IRForTarget.[h,cpp]
Add support for the new enum, and add utility
functions to support the interpreter.

IRToDWARF.cpp
Removed

CommandObjectExpression.cpp
Remove references to the obsolete -i option.

Process.cpp
Modify calls to ClangUserExpression::Evaluate
to pass the correct enum (for dlopen/dlclose)

SBValue.cpp
Add support for the new enum.

SBFrame.cpp
Add support for he new enum.

BreakpointOptions.cpp
Add support for the new enum.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139772 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.cpp
d68e089f8353eaf845c3559dac6d47b32830974f 10-Sep-2011 Greg Clayton <gclayton@apple.com> Added the ability to introspect types thourgh the public SBType interface.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139428 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.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/API/SBValue.cpp
19030d8e5545e0edbd59d8e44a16a11728089afa 15-Aug-2011 Enrico Granata <granata.enrico@gmail.com> Refactoring of ValueObject::DumpValueObject and 'frame variable', 'target variable' commands to use an Options object instead of passing an ever-increasing number of arguments to the DumpValueObject() method, with the ultimate aim of making that call private implementation

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137622 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.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/API/SBValue.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/API/SBValue.cpp
a713b869459b1d4a62c54a68535e6a8fd71c8a62 10-Aug-2011 Johnny Chen <johnny.chen@apple.com> Fix indentation.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137165 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.cpp
c9310303c8d302476f7670d2472a9ba321327f58 04-Aug-2011 Enrico Granata <granata.enrico@gmail.com> more logical behavior for SBValue::CreateValueFromAddress

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136886 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.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/API/SBValue.cpp
0fb0bcc9d4e951145e1b8c783652224c09b23af4 04-Aug-2011 Greg Clayton <gclayton@apple.com> Cleaned up the SBType.h file to not include internal headers and reorganized
the SBType implementation classes.

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

Added a few new APIs to SBValue:

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

uint64_t
SBValue::GetValueAsUnsigned(uint64_t fail_value=0)




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136829 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.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/API/SBValue.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/API/SBValue.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/API/SBValue.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/API/SBValue.cpp
8f64c47120c81728aac0ab0d66097c9a92284f6f 15-Jul-2011 Greg Clayton <gclayton@apple.com> Added the ability to get synthetic child values from SBValue objects that
represent pointers and arrays by adding an extra parameter to the

SBValue
SBValue::GetChildAtIndex (uint32_t idx,
DynamicValueType use_dynamic,
bool can_create_synthetic);

The new "can_create_synthetic" will allow you to create child values that
aren't actually a part of the original type. So if you code like:

int *foo_ptr = ...

And you have a SBValue that contains the value for "foo_ptr":

SBValue foo_value = ...

You can now get the "foo_ptr[12]" item by doing this:

v = foo_value.GetChiltAtIndex (12, lldb.eNoDynamicValues, True);

Normall the "foo_value" would only have one child value (an integer), but
we can create "synthetic" child values by treating the pointer as an array.

Likewise if you have code like:

int array[2];

array_value = ....

v = array_value.GetChiltAtIndex (0); // Success, v will be valid
v = array_value.GetChiltAtIndex (1); // Success, v will be valid
v = array_value.GetChiltAtIndex (2); // Fail, v won't be valid, "2" is not a valid zero based index in "array"

But if you use the ability to create synthetic children:

v = array_value.GetChiltAtIndex (0, lldb.eNoDynamicValues, True); // Success, v will be valid
v = array_value.GetChiltAtIndex (1, lldb.eNoDynamicValues, True); // Success, v will be valid
v = array_value.GetChiltAtIndex (2, lldb.eNoDynamicValues, True); // Success, v will be valid






git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135292 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.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/API/SBValue.cpp
968958c31c42224cfd5eb4ba0cf6fe0157ab375c 07-Jul-2011 Johnny Chen <johnny.chen@apple.com> Add SBValue::GetID() member method call API.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134636 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.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/API/SBValue.cpp
446ccaa81e42b089b6245a950cb4fca05cce12dd 29-Jun-2011 Johnny Chen <johnny.chen@apple.com> Add fuzz calls to SBType, SBValue, and SBValueList.
Fixed crashes for SBValue fuzz calls.
And change 'bool SBType::IsPointerType(void)' to
'bool SBType::IsAPointerType(void)' to avoid name collision with the static 'bool SBType::IsPointerType(void *)'
function, which SWIG cannot handle.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134096 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.cpp
b9dcc51255c70db00c20f0b5e4b0a3e92d398f08 29-Jun-2011 Greg Clayton <gclayton@apple.com> Fixed an issue that was checked in with the dynamic types and update point
changes that caused all SBValue objects to completely ignore the target
lock due to bad C++ scoping of the target Mutex::Locker variables.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134081 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.cpp
fab305b29d6a1cda5b41cd40eb3e11b31ff5f624 21-May-2011 Greg Clayton <gclayton@apple.com> Lock the target API mutex correctly in all cases and make sure m_opaque_sp
contains a valid pointer before trying to access the target.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131771 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.cpp
905acaf31904f352bab9f75fefa380aee297b0cb 21-May-2011 Greg Clayton <gclayton@apple.com> Now that we have dynamic values, we need to protect the GetChildAtIndex()
calls with the target API mutex.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131762 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.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/API/SBValue.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/API/SBValue.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/API/SBValue.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/API/SBValue.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/API/SBValue.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/API/SBValue.cpp
e179a5840a49167964ca768a13c252c58c9cffcc 05-Jan-2011 Greg Clayton <gclayton@apple.com> Added the ability to get an set the desired format for SBValue objects.

Fixed the display of complex numbers in lldb_private::DataExtractor::Dump(...)
and also fixed other edge display cases in lldb_private::ClangASTType::DumpTypeValue(...).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@122895 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.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/API/SBValue.cpp
e005f2ce03c489ebde9110678a29cbfe8488d5b4 06-Nov-2010 Greg Clayton <gclayton@apple.com> Modified all logging calls to hand out shared pointers to make sure we
don't crash if we disable logging when some code already has a copy of the
logger. Prior to this fix, logs were handed out as pointers and if they were
held onto while a log got disabled, then it could cause a crash. Now all logs
are handed out as shared pointers so this problem shouldn't happen anymore.
We are also using our new shared pointers that put the shared pointer count
and the object into the same allocation for a tad better performance.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118319 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.cpp
538eb82a89a68dbc57251915080bd5152b333978 06-Nov-2010 Greg Clayton <gclayton@apple.com> Added copy constructors and assignment operators to all lldb::SB* classes
so we don't end up with weak exports with some compilers.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118312 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.cpp
49ce682dfa7993d31206cea19ce7006cd3f3077e 31-Oct-2010 Greg Clayton <gclayton@apple.com> Cleaned up the API logging a lot more to reduce redundant information and
keep the file size a bit smaller.

Exposed SBValue::GetExpressionPath() so SBValue users can get an expression
path for their values.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117851 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.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/API/SBValue.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/API/SBValue.cpp
61ba7ec20f616f907473dd501341cef5b47fa3f8 27-Oct-2010 Caroline Tice <ctice@apple.com> Clean up the API logging code:
- Try to reduce logging to one line per function call instead of tw
- Put all arguments & their values into log for calls
- Add 'this' parameter information to function call logging, making it show the appropriate
internal pointer (this.obj, this.sp, this.ap...)
- Clean up some return values
- Remove logging of constructors that construct empty objects
- Change '==>' to '=>' for showing result values...
- Fix various minor bugs
- Add some protected 'get' functions to help getting the internal pointers for the 'this' arguments...



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117417 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.cpp
7826c8894803dc729f29789ebc038956a94d3e7a 26-Oct-2010 Caroline Tice <ctice@apple.com> First pass at adding logging capabilities for the API functions. At the moment
it logs the function calls, their arguments and the return values. This is not
complete or polished, but I am committing it now, at the request of someone who
really wants to use it, even though it's not really done. It currently does not
attempt to log all the functions, just the most important ones. I will be
making further adjustments to the API logging code over the next few days/weeks.
(Suggestions for improvements are welcome).


Update the Python build scripts to re-build the swig C++ file whenever
the python-extensions.swig file is modified.

Correct the help for 'log enable' command (give it the correct number & type of
arguments).




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117349 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.cpp
c5f728c81b4896cfbbc87ed1daedf42ba2c0ee63 07-Oct-2010 Greg Clayton <gclayton@apple.com> Expose the error contained within an SBValue.

Move anything that creates a new process into SBTarget. Marked some functions
as deprecated. I will remove them after our new API changes make it through
a build cycle.



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

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



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



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



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113993 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.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/API/SBValue.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/API/SBValue.cpp
c833295baeec641086f536e78050388af36784f8 26-Aug-2010 Jim Ingham <jingham@apple.com> Change "Current" as in GetCurrentThread, GetCurrentStackFrame, etc, to "Selected" i.e. GetSelectedThread. Selected makes more sense, since these are set by some user action (a selection). I didn't change "CurrentProcess" since this is always controlled by the target, and a given target can only have one process, so it really can't be selected.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112221 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.cpp
63094e0bb161580564954dee512955c1c79d3476 23-Jun-2010 Greg Clayton <gclayton@apple.com> Very large changes that were needed in order to allow multiple connections
to the debugger from GUI windows. Previously there was one global debugger
instance that could be accessed that had its own command interpreter and
current state (current target/process/thread/frame). When a GUI debugger
was attached, if it opened more than one window that each had a console
window, there were issues where the last one to setup the global debugger
object won and got control of the debugger.

To avoid this we now create instances of the lldb_private::Debugger that each
has its own state:
- target list for targets the debugger instance owns
- current process/thread/frame
- its own command interpreter
- its own input, output and error file handles to avoid conflicts
- its own input reader stack

So now clients should call:

SBDebugger::Initialize(); // (static function)

SBDebugger debugger (SBDebugger::Create());
// Use which ever file handles you wish
debugger.SetErrorFileHandle (stderr, false);
debugger.SetOutputFileHandle (stdout, false);
debugger.SetInputFileHandle (stdin, true);

// main loop

SBDebugger::Terminate(); // (static function)

SBDebugger::Initialize() and SBDebugger::Terminate() are ref counted to
ensure nothing gets destroyed too early when multiple clients might be
attached.

Cleaned up the command interpreter and the CommandObject and all subclasses
to take more appropriate arguments.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@106615 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/API/SBValue.cpp
7a62c8b129b7e1b5e838b7616a794e01df01818b 09-Jun-2010 Eli Friedman <eli.friedman@gmail.com> And some more include line fixes.



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