History log of /external/lldb/source/Expression/ClangPersistentVariables.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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/Expression/ClangPersistentVariables.cpp
2431244f929e269c6ecd51aa3eb606b6a2474f19 23-Aug-2011 Sean Callanan <scallanan@apple.com> Added support for persistent types to the
expression parser. You can use a persistent
type like this:

(lldb) expr struct $foo { int a; int b; };
(lldb) struct $foo i; i.a = 2; i.b = 3; i
($foo) $0 = {
(int) a = 2
(int) b = 3
}

typedefs work similarly.

This patch affects the following files:

test/expression_command/persistent_types/*
A test case for persistent types,
in particular structs and typedefs.

ClangForward.h
Added TypeDecl, needed to declare some
functions in ASTResultSynthesizer.h

ClangPersistentVariables.[h,cpp]
Added a list of persistent types to the
persistent variable store.

ASTResultSynthesizer.[h,cpp]
Made the AST result synthesizer iterate
across TypeDecls in the expression, and
record any persistent types found. Also
made a minor documentation fix.

ClangUserExpression.[h,cpp]
Extended the user expression class to
keep the state needed to report the
persistent variable store for the target
to the AST result synthesizers.

Also introduced a new error code for
expressions that executed normally but
did not return a result.

CommandObjectExpression.cpp
Improved output for expressions (like
declarations of new persistent types) that
don't return a result. This is no longer
treated as an error.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@138383 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/ClangPersistentVariables.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/Expression/ClangPersistentVariables.cpp
ff7c3e965dea6b70e05faa985de1e6f6efe0ce40 20-Dec-2010 Johnny Chen <johnny.chen@apple.com> Patch from Stephen Wilson:

Provide full qualification for #include's.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@122274 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/ClangPersistentVariables.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/Expression/ClangPersistentVariables.cpp
8de27c761a22187ef63fb60000894be163e7285f 16-Oct-2010 Greg Clayton <gclayton@apple.com> Made many ConstString functions inlined in the header file.

Changed all of our synthesized "___clang" functions, types and variables
that get used in expressions over to have a prefix of "$_lldb". Now when we
do name lookups we can easily switch off of the first '$' character to know
if we should look through only our internal (when first char is '$') stuff,
or when we should look through program variables, functions and types.

Converted all of the clang expression code over to using "const ConstString&"
values for names instead of "const char *" since there were many places that
were converting the "const char *" names into ConstString names and them
throwing them away. We now avoid making a lot of ConstString conversions and
benefit from the quick comparisons in a few extra spots.

Converted a lot of code from LLVM coding conventions into LLDB coding
conventions.



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

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

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




git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115578 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/ClangPersistentVariables.cpp
a6223431cf44c6c1e885d2f04cc78cb4155375e5 20-Aug-2010 Sean Callanan <scallanan@apple.com> First step of refactoring variable handling in the
expression parser. There shouldn't be four separate
classes encapsulating a variable.

ClangExpressionVariable is now meant to be the
container for all variable information. It has
several optional components that hold data for
different subsystems.

ClangPersistentVariable has been removed; we now
use ClangExpressionVariable instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@111600 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/ClangPersistentVariables.cpp
82b74c85f719be67b78f9284a6a1341d47f7ac9c 12-Aug-2010 Sean Callanan <scallanan@apple.com> Added automatically generated result variables for each
expression. It is now possible to do things like this:

(lldb) expr int $i = 5; $i + 1
$0 = (int) 6
(lldb) expr $i + 3
$1 = (int) 8
(lldb) expr $1 + $0
$2 = (int) 14

As a bonus, this allowed us to move printing of
expression results into the ClangPersistentVariable
class. This code needs a bit of refactoring -- in
particular, ClangExpressionDeclMap has eaten one too
many bacteria and needs to undergo mitosis -- but the
infrastructure appears to be holding up nicely.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@110896 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/ClangPersistentVariables.cpp
a48fe1637ec6a381e500633c087f76662e364c20 11-Aug-2010 Sean Callanan <scallanan@apple.com> Added support for persistent variables to the
expression parser. It is now possible to type:

(lldb) expr int $i = 5; $i + 1
(int) 6
(lldb) expr $i + 2
(int) 7

The skeleton for automatic result variables is
also implemented. The changes affect:

- the process, which now contains a
ClangPersistentVariables object that holds
persistent variables associated with it
- the expression parser, which now uses
the persistent variables during variable
lookup
- TaggedASTType, where I loaded some commonly
used tags into a header so that they are
interchangeable between different clients of
the class


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@110777 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/ClangPersistentVariables.cpp