History log of /external/lldb/source/Symbol/ClangASTType.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/Symbol/ClangASTType.cpp
77e67a51acb825d79d25be687c085833713d5205 19-Jun-2013 Greg Clayton <gclayton@apple.com> Implemented a types.py module that allows types to be inspected for padding.

The script was able to point out and save 40 bytes in each lldb_private::Section by being very careful where we need to have virtual destructors and also by re-ordering members.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@184364 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
b6a4c565732b3a7b546ba2aa0e7aec3a4bb359a4 18-Jun-2013 Enrico Granata <egranata@apple.com> <rdar://problem/12717717>

Modifying our data formatters matching algorithm to ensure that "const X*" is treated as equivalent to "X*"
Also, a couple improvements to the "lldb types" logging



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@184215 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
946618a80e17d210e6592e94d10a15ad592572ba 15-May-2013 Greg Clayton <gclayton@apple.com> A first pass at auto completion for variables and their children. This is currently hooked up for "frame variable" only. With a little work we can also enable it for the "expression" command and also for other things.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@181850 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
efc7e55e58ee54ffda4b8d95add7918291236e80 02-May-2013 Enrico Granata <egranata@apple.com> <rdar://problem/13338477>

clang sugarcoats expressions of the sort *(int (*)[3])foo where foo is an int* saying that their type class is Paren
This checkin updates our lookup tables to properly desugar Paren into the actual type of interest



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180938 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
f95fc9e09fa0a32de0a3904a1517266df37e8bff 06-Apr-2013 Greg Clayton <gclayton@apple.com> Added support "__attribute__((__vector_size__(B)))" and "__attribute__((ext_vector_type(N)))".

Now we can:
1 - see the return value for functions that return types that use the "ext_vector_size"
2 - dump values that use the vector attributes ("expr $ymm0")
3 - modified the DWARF parser to correctly parse GNU vector types from the DWARF by turning them into clang::Type::ExtVector types instead of just standard arrays



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178924 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
017c16aa483e6edabdbbee1bdcd1ce3f8e8a12d1 27-Mar-2013 Greg Clayton <gclayton@apple.com> Don't use a "uintptr_t" for the metadata key, use a "void *". This removes all of the casts that were being used and cleans the code up a bit. Also added the ability to dump the metadata.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178113 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
133214fe6ebe3cf7f509047a3d297fca1f4b09ee 26-Mar-2013 Greg Clayton <gclayton@apple.com> Add a way to dump a ClangASTType to stdout for debugging purposes.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178071 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.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/Symbol/ClangASTType.cpp
d8d97f556ab58fae76d5c677d43a2d621bf039be 06-Mar-2013 Greg Clayton <gclayton@apple.com> Fixed enum printing for negative enums. There previously was no testing to validate that enum values were being displayed correctly.

Also added C++11 enum test cases to cover enums as int8_t, int16_t int32_t, int64_t, uint8_t, uint16_t, uint32_t, and uint64_t both for DWARF and dSYM cases. The DWARF being emitted by clang is missing the enum integer type, but the code is now ready to accept and deal with the integral type if it is supplied.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176548 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
72374e3009feb87332542f60d72b92343c9b35fa 04-Mar-2013 Enrico Granata <egranata@apple.com> <rdar://problem/12897838>

Making sure we do not try to copy memory at address 0 - that would make us crash



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@176438 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
c113056f1c3cd889d772231aabd10fa99b6d4754 13-Feb-2013 Greg Clayton <gclayton@apple.com> Quiet "the missing case in switch statement" warnings from newer clang builds.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@175061 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.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/Symbol/ClangASTType.cpp
d0250856d5e33dcb5c60f8dcd3a5b88860608b50 01-Feb-2013 Greg Clayton <gclayton@apple.com> Get rid for switch statement warning for unhandled cases.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@174128 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.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/Symbol/ClangASTType.cpp
63d67ed225f948484a73db65c3c2512211515f06 10-Jan-2013 Enrico Granata <egranata@apple.com> <rdar://problem/11146929>

Enabling support for the wchar_t type.
Without the proper language option setup, clang's ASTContexts will be configured to have wchar_t == int
This patch enables the correct options to make sure that we report wchar_t as itself
Added a test case to make sure we do not regress

Adding files missing from the previous commit



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@172039 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
19b646725e7d6bebda787fa3cb55ff223a00d907 04-Jan-2013 Greg Clayton <gclayton@apple.com> <rdar://problem/12928282>

Added SBTarget::EvaluateExpression() so expressions can be evaluated without needing a process.

Also fixed many functions that deal with clang AST types to be able to properly handle the clang::Type::Elaborated types ("struct foo", "class bar").



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@171476 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
ca8fb173fa66d9c93e02c4abfd4627c143795653 21-Dec-2012 Sean Callanan <scallanan@apple.com> Made LLDB compile with LLVM top-of-tree again.
The results from Clang name lookups changed to
be ArrayRefs, so I had to change the way we
check for the presence of a result and the way
we iterate across results.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@170927 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.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/Symbol/ClangASTType.cpp
0b93a7546473b15fb14dbc129f1fe5ed6ee14976 05-Dec-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12749733>

Always allows getting builtin types by name even if there is no backing debug information.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169424 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.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/Symbol/ClangASTType.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/Symbol/ClangASTType.cpp
88db4597c7567be050b7a729f7306832f28428bb 02-Nov-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/12585314>

LLDB now provides base class offsets (virtual and non virtual) to Clang's record layout. We previously were told this wasn't necessary, but it is when pragma pack gets involved.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@167262 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
85d58703f6cdfdfb935aad0a3ba42718b44607ee 03-Oct-2012 Sean Callanan <scallanan@apple.com> An API in Clang got renamed; fixing LLDB to match.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165144 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
06dc17f8eb821d7256fd42e56f85c2779a29f689 25-Sep-2012 Sean Callanan <scallanan@apple.com> Brought LLDB top-of-tree into sync with LLVM/Clang
top-of-tree. Removed all local patches and llvm.zip.

The intent is that fron now on top-of-tree will
always build against LLVM/Clang top-of-tree, and
that problems building will be resolved as they
occur. Stable release branches of LLDB can be
constructed as needed and linked to specific release
branches of LLVM/Clang.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164563 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
bf346eb7d6ed91a1696d5659dec1bf16302a89ce 21-Sep-2012 Sean Callanan <scallanan@apple.com> Fixed a problem where persistent variables did
not correctly store the contents of Objective-C
classes. This was due to a combination of
factors:

1) Types were only being completed if we were
looking inside them for specific ivars
(using FindExternalVisibleDeclsByName).
We now look the complete type up at every
FindExternalLexicalDecls.

2) Even if the types were completed properly,
ValueObjectConstResult overrode the type
of every ValueObject using the complete type
for its class from the debug information.
Superclasses of complete classes are not
guaranteed to be complete. Although "frame
variable" uses the debug information,
the expression parser does now piece together
complete types at every level (as described
in Bullet 1), so I provided a way for the
expression parser to prevent overriding.

3) Type sizes were being miscomputed by
ClangASTContext. It ignored the ISA pointer
and only counted fields. We now correctly
count the ISA in the size of an object.

<rdar://problem/12315386>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164333 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.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/Symbol/ClangASTType.cpp
f0613186450f74cf056b86d486b97b5bdd928e5f 16-May-2012 Sean Callanan <scallanan@apple.com> Enabled C++11 in the expression parser. auto and
various other syntactic sugar work. Lambdas do
not due to some problems relocating code containing
lambdas. Rvalue references work when returned from
expressions, but need more testing.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@156948 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
b4b0b252e6184eb7380fbc08928c95ba421c68c2 11-Apr-2012 Greg Clayton <gclayton@apple.com> Fixed an issue that would cause a crash when dumping fully qualified types.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@154503 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
3356d4f89e85301e5ddec2301c75b0626d50703f 30-Mar-2012 Greg Clayton <gclayton@apple.com> <rdar://problem/11082392>

Fixed an issue that could cause circular type parsing that will assert and kill LLDB.

Prior to this fix the DWARF parser would always create class types and not start their definitions (for both C++ and ObjC classes) until we were asked to complete the class later. When we had cases like:

class A
{
class B
{
};
};

We would alway try to complete A before specifying "A" as the decl context for B. Turns out we can just start the definition and still not complete the class since we can check the TagDecl::isCompleteDefinition() function. This only works for C++ types. This means we will not be pulling in the full definition of parent classes all the time and should help with our memory consumption and also reduce the amount of debug info we have to parse.

I also reduced redundant code that was checking in a lldb::clang_type_t was a possible C++ dynamic type since it was still completing the type, just to see if it was dynamic. This was fixed in another function that was checking for a type being dynamic as an ObjC or a C++ type, but there was dedicated fucntion for C++ that we missed.




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@153713 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.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/Symbol/ClangASTType.cpp
0e408c440004be4224f15d7538c41e752b050a0c 06-Mar-2012 Enrico Granata <egranata@apple.com> Fixing a crasher bug where we were not checking for NULL before trying to retrieve the format for a type

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152087 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
142f94c8a1498c5269a9f878ed92adf0ffc71215 01-Mar-2012 Sean Callanan <scallanan@apple.com> Updated LLVM to take a new MC JIT that supports
allocations by section. We install these sections
in the target process and inform the JIT of their
new locations.

Also removed some unused variable warnings.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151789 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
8f2e392e8937aaf66f91201dc5f4190d61902c67 04-Feb-2012 Sean Callanan <scallanan@apple.com> I have brought LLDB up-to-date with top of tree
LLVM/Clang. This brings in several fixes, including:

- Improvements in the Just-In-Time compiler's
allocation of memory: the JIT now allocates
memory in chunks of sections, improving its
ability to generate relocations. I have
revamped the RecordingMemoryManager to reflect
these changes, as well as to get the memory
allocation and data copying out fo the
ClangExpressionParser code. Jim Grosbach wrote
the updates to the JIT on the LLVM side.

- A new ExternalASTSource interface to allow LLDB to
report accurate structure layout information to
Clang. Previously we could only report the sizes
of fields, not their offsets. This meant that if
data structures included field alignment
directives, we could not communicate the necessary
alignment to Clang and accesses to the data would
fail. Now we can (and I have update the relevant
test case). Thanks to Doug Gregor for implementing
the Clang side of this fix.

- The way Objective-C interfaces are completed by
Clang has been made consistent with RecordDecls;
with help from Doug Gregor and Greg Clayton I have
ensured that this still works.

- I have eliminated all local LLVM and Clang patches,
committing the ones that are still relevant to LLVM
and Clang as needed.

I have tested the changes extensively locally, but
please let me know if they cause any trouble for you.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149775 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.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/Symbol/ClangASTType.cpp
009a430d4d65984e0d33850686dd7b7a7a4a35bd 06-Dec-2011 Sean Callanan <scallanan@apple.com> Set a flag on the AST type dump to see Objective-C
methods. The Clang dump is now much more verbose,
but when somebody types "target modules lookup -t"
that is typically what they're looking for.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145892 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.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/Symbol/ClangASTType.cpp
32e2564f9af50147044dcdc0c9677bba0fcb4287 09-Nov-2011 Greg Clayton <gclayton@apple.com> Cleanup some warnings.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144200 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
3e4238d47a6d1a3106f357d2e7b495870721c7ae 04-Nov-2011 Greg Clayton <gclayton@apple.com> Fixed the Xcode project building of LLVM to be a bit more user friendly:

- If you download and build the sources in the Xcode project, x86_64 builds
by default using the "llvm.zip" checkpointed LLVM.
- If you delete the "lldb/llvm.zip" and the "lldb/llvm" folder, and build the
Xcode project will download the right LLVM sources and build them from
scratch
- If you have a "lldb/llvm" folder already that contains a "lldb/llvm/lib"
directory, we will use the sources you have placed in the LLDB directory.

Python can now be disabled for platforms that don't support it.

Changed the way the libllvmclang.a files get used. They now all get built into
arch specific directories and never get merged into universal binaries as this
was causing issues where you would have to go and delete the file if you wanted
to build an extra architecture slice.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@143678 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
28ebe88ad7fdaf6756c140ceabb7098a0325c87c 02-Nov-2011 Sean Callanan <scallanan@apple.com> Updated LLVM/Clang to pull in an MCJIT fix that
allows us to set __attribute__ ((used)) on expressions
that masquerade as methods. When we are stopped in
classes in anonymous namespaces, this fix (and enabling
__attribute__ ((used)) on the method) will allow
expressions to run.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@143560 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.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/Symbol/ClangASTType.cpp
f6a5bd78aaef0e4d477208289ace03cfa7f60649 22-Oct-2011 Greg Clayton <gclayton@apple.com> Added template support when parsing DWARF into types. We can now use STL
classes in the expression parser.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142717 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
bc36a861b8e0b2f2dde34f27c9fa9629a357d598 08-Oct-2011 Greg Clayton <gclayton@apple.com> Added more functionality to Range template classes in RangeMap.h and converted remaining DWARF areas that were using ranges over to this class. Also converted lldb_private::Block to use it.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141460 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
c1535187de67e4ce48053a7677c76825adcdda44 08-Oct-2011 Sean Callanan <scallanan@apple.com> Updated LLVM/Clang to pull in the latest ARM disassembler.
This involved minor changes to the way we report Objective-C
methods, as well as cosmetic changes and added parameters
for a variety of Clang APIs.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141437 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.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/Symbol/ClangASTType.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/Symbol/ClangASTType.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/Symbol/ClangASTType.cpp
cebe96537a98c95f375cf81ac1c37dd082b4520b 12-Aug-2011 Johnny Chen <johnny.chen@apple.com> Silence the static analyzer.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137387 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
8818ae7107acc87abf4e61d4008307b99f5fe796 10-Aug-2011 Sean Callanan <scallanan@apple.com> Fixed the type code to print "<invalid>" for NULL
types instead of letting Clang crash.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137167 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.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/Symbol/ClangASTType.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/Symbol/ClangASTType.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/Symbol/ClangASTType.cpp
9b6898f3ec1dedbe1dfc8bd7cd1d82a5b10e1bb0 30-Jul-2011 Sean Callanan <scallanan@apple.com> This change brings in the latest LLVM/Clang, and
completes the support in the LLDB expression parser
for incomplete types. Clang now imports types
lazily, and we complete those types as necessary.

Changes include:

- ClangASTSource now supports three APIs which it
passes to ClangExpressionDeclMap. CompleteType
completes a TagDecl or an ObjCInterfaceDecl when
needed; FindExternalVisibleDecls finds named
entities that are visible in the expression's
scope; and FindExternalLexicalDecls performs a
(potentially restricted) search for entities
inside a lexical scope like a namespace. These
changes mean that entities in namespaces should
work normally.

- The SymbolFileDWARF code for searching a context
for a specific name is now more general, and can
search arbitrary contexts.

- We are continuing to adapt our calls into LLVM
from interfaces that take start and end iterators
when accepting multiple items to interfaces that
use ArrayRef.

- I have cleaned up some code, especially our use
of namespaces.

This change is neutral for our testsuite and greatly
improves correctness for large programs (like Clang)
with complicated type systems. It should also lay
the groundwork for improving the expression parser's
performance as we are lazier and lazier about
providing type information.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136555 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
dcc59f079edcd40cfba46eec1cd323341261a5e2 30-Jul-2011 Greg Clayton <gclayton@apple.com> Fixed a compile error.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136551 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
bfc06133b152a3391c3d5ceeb2d481f1d2e43000 30-Jul-2011 Enrico Granata <granata.enrico@gmail.com> changes in the new GetMinimumLanguages() ; robustness improvements in the CFStringSynthProvider object ; made a CFString_SummaryProvider function you can use if all you care about is the summary string for your NSString objects

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136544 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.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/Symbol/ClangASTType.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/Symbol/ClangASTType.cpp
11d72f2a91de21d90fdd6ba2b3fa336166d1fd1a 26-Jul-2011 Enrico Granata <granata.enrico@gmail.com> bug fix in ClangASTType when trying to get size of a non-complete type

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135989 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
b302b2f50e079b11a12ebafc29104c198f4f15e4 30-Jun-2011 Greg Clayton <gclayton@apple.com> Centralize all of the type name code so that we always strip the leading
"struct ", "class ", and "union " from the start of any type names that are
extracted from clang QualType objects. I had to fix test suite cases that
were expecting the struct/union/class prefix to be there.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134132 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.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/Symbol/ClangASTType.cpp
921fac021ef9f7e5d32de359e67d5ad28fcccc65 23-Jun-2011 Peter Collingbourne <peter@pcc.me.uk> Fix header paths

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133755 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
5c28dd1daf8de701ce1eeb8f9b8d3e3b5e39ad50 23-Jun-2011 Greg Clayton <gclayton@apple.com> Committing type format code for Enrico Granata.

This commit adds a new top level command named "type". Currently this command
implements three commands:

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

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

Examples:

// Format uint*_t as hex
type format add x uint16_t uint32_t uint64_t

// Format intptr_t as a pointer
type format add p intptr_t

The format characters are the same as "printf" for the most part with many
additions. These format character specifiers are also used in many other
commands ("frame variable" for one). The current list of format characters
include:

a - char buffer
b - binary
B - boolean
c - char
C - printable char
d - signed decimal
e - float
f - float
g - float
i - signed decimal
I - complex integer
o - octal
O - OSType
p - pointer
s - c-string
u - unsigned decimal
x - hex
X - complex float
y - bytes
Y - bytes with ASCII




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133728 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.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/Symbol/ClangASTType.cpp
c8bc1c318cfed0e3fe22731d808ddac1b32bb26e 16-May-2011 Greg Clayton <gclayton@apple.com> Fixed an issue where large memory writes might not get chunked up into smaller
packets in GDB remote.

Also fixed a compiler warning for an unhandled case for a switch.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131397 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
0de254aaec7d6766379191e5397ec2294042c5d7 16-May-2011 Sean Callanan <scallanan@apple.com> Updated to use the latest LLVM/Clang, to pick up JIT
changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131391 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
abe0fed36d83e1c37af9dae90c2d25db742b4515 18-Apr-2011 Greg Clayton <gclayton@apple.com> Centralized a lot of the status information for processes,
threads, and stack frame down in the lldb_private::Process,
lldb_private::Thread, lldb_private::StackFrameList and the
lldb_private::StackFrame classes. We had some command line
commands that had duplicate versions of the process status
output ("thread list" and "process status" for example).

Removed the "file" command and placed it where it should
have been: "target create". Made an alias for "file" to
"target create" so we stay compatible with GDB commands.

We can now have multple usable targets in lldb at the
same time. This is nice for comparing two runs of a program
or debugging more than one binary at the same time. The
new command is "target select <target-idx>" and also to see
a list of the current targets you can use the new "target list"
command. The flow in a debug session can be:

(lldb) target create /path/to/exe/a.out
(lldb) breakpoint set --name main
(lldb) run
... hit breakpoint
(lldb) target create /bin/ls
(lldb) run /tmp
Process 36001 exited with status = 0 (0x00000000)
(lldb) target list
Current targets:
target #0: /tmp/args/a.out ( arch=x86_64-apple-darwin, platform=localhost, pid=35999, state=stopped )
* target #1: /bin/ls ( arch=x86_64-apple-darwin, platform=localhost, pid=36001, state=exited )
(lldb) target select 0
Current targets:
* target #0: /tmp/args/a.out ( arch=x86_64-apple-darwin, platform=localhost, pid=35999, state=stopped )
target #1: /bin/ls ( arch=x86_64-apple-darwin, platform=localhost, pid=36001, state=exited )
(lldb) bt
* thread #1: tid = 0x2d03, 0x0000000100000b9a a.out`main + 42 at main.c:16, stop reason = breakpoint 1.1
frame #0: 0x0000000100000b9a a.out`main + 42 at main.c:16
frame #1: 0x0000000100000b64 a.out`start + 52

Above we created a target for "a.out" and ran and hit a
breakpoint at "main". Then we created a new target for /bin/ls
and ran it. Then we listed the targest and selected our original
"a.out" program, so we showed two concurent debug sessions
going on at the same time.




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129695 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.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/Symbol/ClangASTType.cpp
279584cdea3dfda933480ed0fe948df2697ab512 15-Mar-2011 Sean Callanan <scallanan@apple.com> Updated to LLVM/Clang revision 127600.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@127634 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
d5b3c351ea23e8e36d47056e50b1df773ae9050a 27-Jan-2011 Sean Callanan <scallanan@apple.com> Updated Clang to a version that supports propagating
the "virtual" flag when importing a C++ function
declaration. Made changes to LLDB to support other
changes in Clang.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124355 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
bdcb6abaa287df2c5f312c51d993c1d0b0cb120c 26-Jan-2011 Greg Clayton <gclayton@apple.com> Enabled extra warnings and fixed a bunch of small issues.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124250 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
a4881d04b4f367c67e34e8040e1257fc222a8b41 22-Jan-2011 Greg Clayton <gclayton@apple.com> Sped up the shutdown time on MacOSX by quite a bit by making sure any
threads that we spawn let us know when they are going away and that we
don't timeout waiting for a message from threads that have gone away.
We also now don't expect the "k" packet (kill) to send a response. This
greatly speeds up debugger shutdown performance. The test suite now runs
quite a bit faster.

Added a fix to the variable display code that fixes the display of
base classes. We were assuming the virtual or normal base class offsets
were being given in bit sizes, but they were being given as character
sizes, so we needed to multiply the offset by 8. This wasn't affecting
the expression parser, but it was affecting the correct display of C++
class base classes and all of their children.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124024 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
ad29309ac7a29db2cc363bd4ace20fbf862a42d3 19-Jan-2011 Sean Callanan <scallanan@apple.com> Updated to revision 123723 of LLVM, to bring in
support for minimal type import functionality.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123787 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.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/Symbol/ClangASTType.cpp
e52f37baba95cc60d2fc78d9f8726dff5c3f3720 15-Jan-2011 Greg Clayton <gclayton@apple.com> Added complete complex support for displaying and parsing complex types.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123509 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.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/Symbol/ClangASTType.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/Symbol/ClangASTType.cpp
3aa7da5cb3327792415de44405e0896c6bdc305b 13-Dec-2010 Sean Callanan <scallanan@apple.com> Added support for generating expressions that have
access to the members of the Objective-C self object.

The approach we take is to generate the method as a
@category on top of the self object, and to pass the
"self" pointer to it. (_cmd is currently NULL.)

Most changes are in ClangExpressionDeclMap, but the
change that adds support to the ABIs to pass _cmd
touches a fair amount of code.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121722 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
9e7958e3d89fbcb8128bd224161cdccd3bf4ad9d 13-Dec-2010 Sean Callanan <scallanan@apple.com> Updated to latest Clang revision. This involved
very minor changes, changing how we get the target
type from a TypedefType, adding a parameter to
EnumDecl::Create(), and other minor tweaks.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121663 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
b9f09a6188dc2b48bf7f5677bc1eef9a73c3fa25 06-Dec-2010 Sean Callanan <scallanan@apple.com> Fixed a bug in which the SEL type was being resolved
wrongly as the target of a pointer rather than the
SEL pointer itself. This caused incorrect behavior
when dealing with Objective-C selector variables.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121048 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
e8e5557af333aba8183ce6e9fed9996221eb1547 01-Dec-2010 Sean Callanan <scallanan@apple.com> Fixed ClangUserExpression's wrapping of expressions
in C++ methods. There were two fixes involved:

- For an object whose contents are not known, the
expression should be treated as a non-member, and
"this" should have no meaning.

- For a const object, the method should be declared
const as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@120606 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
8a3b0a85dd512824f528cfa55d93f530ebe38be8 18-Nov-2010 Sean Callanan <scallanan@apple.com> Updated to the LLVM/Clang of 2010-11-17 at 3:30pm.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@119677 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
306edcaab871503192162272c147aef89d0ee719 11-Oct-2010 Greg Clayton <gclayton@apple.com> Fixed an issue where objc types weren't ever getting fully resolved (beyond
forward declarations).



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@116181 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
b433a3d8b910d571c0bcdcd5018778ac3763e703 01-Oct-2010 Greg Clayton <gclayton@apple.com> Fixed an issue where if a method funciton was asked to be parsed before
its containing class was parsed, we would crash.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115343 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
4a19f588474a658b18338eff7ba665ca9766e1c7 01-Oct-2010 Sean Callanan <scallanan@apple.com> Fixed handling of signed short types in expressions.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115267 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.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/Symbol/ClangASTType.cpp
f353183c6e6136e38a06dac082f3611030b7523f 24-Sep-2010 Johnny Chen <johnny.chen@apple.com> Made 'frame variable' printing of unsigned types more readable, like gdb.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114739 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
47a5c4c01066ece2d41cba56c3a065eeca12d47c 23-Sep-2010 Sean Callanan <scallanan@apple.com> Updated to latest LLVM. Major LLVM changes:

- Sema is now exported (and there was much rejoicing.)

- Storage classes are now centrally defined.

Also fixed some bugs that the new LLVM picked up.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114622 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
585660cc442f7faf8d2cbd936e4c92ac689c30e5 05-Aug-2010 Greg Clayton <gclayton@apple.com> More missing files from my previous checkin.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@110299 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
960d6a40711f05effe6fcc5b66f0952450f79ea2 03-Aug-2010 Greg Clayton <gclayton@apple.com> Added support for objective C built-in types: id, Class, and SEL. This
involved watching for the objective C built-in types in DWARF and making sure
when we convert the DWARF types into clang types that we use the appropriate
ASTContext types.

Added a way to find and dump types in lldb (something equivalent to gdb's
"ptype" command):

image lookup --type <TYPENAME>

This only works for looking up types by name and won't work with variables.
It also currently dumps out verbose internal information. I will modify it
to dump more appropriate user level info in my next submission.

Hookup up the "FindTypes()" functions in the SymbolFile and SymbolVendor so
we can lookup types by name in one or more images.

Fixed "image lookup --address <ADDRESS>" to be able to correctly show all
symbol context information, but it will only show this extra information when
the new "--verbose" flag is used.

Updated to latest LLVM to get a few needed fixes.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@110089 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Symbol/ClangASTType.cpp
9488b7423b556c7c777b721d2094fd5ec4a47578 28-Jul-2010 Greg Clayton <gclayton@apple.com> Created lldb::LanguageType by moving an enumeration from the
lldb_private::Language class into the enumerations header so it can be freely
used by other interfaces.

Added correct objective C class support to the DWARF symbol parser. Prior to
this fix we were parsing objective C classes as C++ classes and now that the
expression parser is ready to call functions we need to make sure the objective
C classes have correct AST types.



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