History log of /external/lldb/source/Expression/ASTResultSynthesizer.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
edb83a59994efc8fe9f942f976dc355b74178f5a 03-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Fix build.
This should fix the build breakage caused by the api change in 178663.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@178700 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/ASTResultSynthesizer.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/Expression/ASTResultSynthesizer.cpp
9c556ffab46d49ae805e93ea7d3fd217fc166343 18-Dec-2012 Sean Callanan <scallanan@apple.com> Removed a possible use of unchecked NULL from
the AST result synthesizer's logging.

<rdar://problem/12889053>


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@170396 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/ASTResultSynthesizer.cpp
e1f745aa3b8e1ad9c9522b34562a865d6944a2dc 31-Oct-2012 Greg Clayton <gclayton@apple.com> Carlo Kok was compiling with MSVC, caught some more issues.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@167168 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/ASTResultSynthesizer.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/Expression/ASTResultSynthesizer.cpp
e94783960b4d80520b5ce5bb65f45828d84b1d79 15-Mar-2012 Sean Callanan <scallanan@apple.com> Strengthened LLDB's completion of object types.
Now when LLDB reports a variable, it has a
complete type. Similarly, when it reports
members of a struct, it completes their types.
Also, when it creates the result variable for
an expression, it ensures that variable's type
is complete.

This ensures compliance with Clang's
expectations, preventing potential crashes.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152771 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/ASTResultSynthesizer.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/Expression/ASTResultSynthesizer.cpp
21f2e192079b6aa9ddd2d25283e19abdb38eeeb5 14-Dec-2011 Sean Callanan <scallanan@apple.com> This commit is the result of a general audit of
the expression parser to locate instances where
dyn_cast<>() and isa<>() are used on types, and
replace them with getAs<>() as appropriate.

The difference is that dyn_cast<>() and isa<>()
are essentially LLVM/Clang's equivalent of RTTI
-- that is, they try to downcast the object and
return NULL if they cannot -- but getAs<>() can
traverse typedefs to perform a semantic cast.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/ASTResultSynthesizer.cpp
4fdf795b4e9ea643fcafc7fe117a76ad48e021e4 08-Dec-2011 Sean Callanan <scallanan@apple.com> Added the ability to dereference an Objective-C object
pointer to make the result of an expression. LLDB now
dumps the ivars of the Objective-C object and all of
its parents. This just required fixing a bug where we
didn't distinguish between Objective-C object pointers
and regular C-style pointers.

Also added a testcase to verify that this continues to
work.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@146164 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/ASTResultSynthesizer.cpp
e1301a62783cf0d5457350b90830917841cbf6fc 06-Dec-2011 Sean Callanan <scallanan@apple.com> As part of the work to make Objective-C type information
from symbols more accessible, I have added a second
map to the ClangASTImporter: the ObjCInterfaceMetaMap.
This map keeps track of all type definitions found for
a particular Objective-C interface, allowing the
ClangASTSource to refer to all possible sources when
looking for method definitions.

There is a bug in lookup that I still need to figure out,
but after that we should be able to report full method
information for Objective-C classes shown in symbols.

Also fixed some errors I ran into when enabling the maps
for the persistent type store. The persistent type store
previously did not use the ClangASTImporter to import
types, instead using ASTImporters that got allocated each
time a type needed copying. To support the requirements
of the persistent type store -- namely, that types must be
copied, completed, and then completely severed from their
origin in the parser's AST context (which will go away) --
I added a new function called DeportType which severs all
these connections.


git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145914 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/ASTResultSynthesizer.cpp
fecc09c3709262515add87254cb973ce5175f17b 19-Nov-2011 Sean Callanan <scallanan@apple.com> Pulled in a new revision of LLVM/Clang and added
several patches. These patches fix a problem
where templated types were not being completed the
first time they were used, and fix a variety of
minor issues I discovered while fixing that problem.

One of the previous local patches was resolved in
the most recent Clang, so I removed it. The others
will be removed in due course.


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

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@143381 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/ASTResultSynthesizer.cpp
67bbb1103c5a49b7c994750e90ae7ed130daa3ae 14-Oct-2011 Sean Callanan <scallanan@apple.com> Improved expression logging. Now all calls to
FindExternalVisibleDecls and FindExternalLexicalDecls
are marked and given unique IDs, so that all logging
done as part of their execution can be traced back to
the proper call.

Also there was some logging that really wasn't helpful
in most cases so I disabled it unless verbose logging
(log enable -v lldb expr) is enabled.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141987 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/ASTResultSynthesizer.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/Expression/ASTResultSynthesizer.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/ASTResultSynthesizer.cpp
5c9a3c7cce9da84d9eff1eb48ebadab32b1abe54 04-Aug-2011 Sean Callanan <scallanan@apple.com> Fixed a problem that caused LLDB to fail to execute
expressions that used function pointers. The problem
was that IRForTarget previously only scanned the IR
for the expression for call instructions; if a function
was used in another context, it was ignored.

Now LLDB scans the Module for functions that are only
declared (not also defined -- so these are externals);
it then constructs function pointers for these
functions and substitutes them wherever the function
is used.

Also made some changes so that "expr main" works just
as well as "expr &main"; they end up being the same
code, but LLDB was generating the result variable in
different ways.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136928 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/ASTResultSynthesizer.cpp
8cd86700fa9e94e69ad3c436a851fdf51aba79b4 18-Jul-2011 Sean Callanan <scallanan@apple.com> Removed a redundant dyn_cast. Thanks to Felipe
Cabecinhas.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135429 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/ASTResultSynthesizer.cpp
58baaada202ea16e928f0c76e9124d42fd3655cd 08-Jul-2011 Sean Callanan <scallanan@apple.com> Audited the expression parser to find uninitialized
pointers. Some of the spots are obviously initialized
later, but it's better just to NULL the pointers out
at initialization to make the code more robust when
exposed to later changes.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@134670 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/ASTResultSynthesizer.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/Expression/ASTResultSynthesizer.cpp
cf5743434810c099ae2a148a8891a29ec82bda26 22-Feb-2011 Sean Callanan <scallanan@apple.com> Fixed a hang in the expression parser's result synthesizer that occurs when the function generated for the expression is completely empty except for a NULL_STMT. This happens sometimes when the parser returns errors.

git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@126251 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/ASTResultSynthesizer.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/Expression/ASTResultSynthesizer.cpp
bbce7124afdd5fb30742da08a195d33bbbba8fcf 22-Jan-2011 Jim Ingham <jingham@apple.com> Move some of the more noisy "log enable lldb expression" output to the verbose output.

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

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

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


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123371 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/ASTResultSynthesizer.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/Expression/ASTResultSynthesizer.cpp
a91dd997b1e809c67901b7ac481942cacae19150 19-Nov-2010 Sean Callanan <scallanan@apple.com> Added support for indicating to the expression parser
that the result of an expression should be coerced to
a specific type. Also made breakpoint conditions pass
in the bool type for this type.

The expression parser ignores this indication for now.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@119779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/ASTResultSynthesizer.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/Expression/ASTResultSynthesizer.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/ASTResultSynthesizer.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/Expression/ASTResultSynthesizer.cpp
6288a651481eb88104b3952834020a84d6512bf6 22-Sep-2010 Sean Callanan <scallanan@apple.com> Improved the logging for ASTs generated on the
expression parser's behalf so that now we see the
full TranslationUnitDecl instead of just the
FunctionDecl.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114514 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/ASTResultSynthesizer.cpp
e8a59a8ec92e71203e434f28b5bac6606aacaf3c 13-Sep-2010 Sean Callanan <scallanan@apple.com> Bugfixes to the expression parser. Fixes include:

- If you put a semicolon at the end of an expression,
this no longer causes the expression parser to
error out. This was a two-part fix: first,
ClangExpressionDeclMap::Materialize now handles
an empty struct (such as when there is no return
value); second, ASTResultSynthesizer walks backward
from the end of the ASTs until it reaches something
that's not a NullStmt.

- ClangExpressionVariable now properly byte-swaps when
printing itself.

- ClangUtilityFunction now cleans up after itself when
it's done compiling itself.

- Utility functions can now use external functions just
like user expressions.

- If you end your expression with a statement that does
not return a value, the expression now runs correctly
anyway.

Also, added the beginnings of an Objective-C object
validator function, which is neither installed nor used
as yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113789 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/ASTResultSynthesizer.cpp
65dafa8344c8c018e346dd331a7782081a896239 27-Aug-2010 Sean Callanan <scallanan@apple.com> This is a major refactoring of the expression parser.
The goal is to separate the parser's data from the data
belonging to the parser's clients. This allows clients
to use the parser to obtain (for example) a JIT compiled
function or some DWARF code, and then discard the parser
state.

Previously, parser state was held in ClangExpression and
used liberally by ClangFunction, which inherited from
ClangExpression. The main effects of this refactoring
are:

- reducing ClangExpression to an abstract class that
declares methods that any client must expose to the
expression parser,

- moving the code specific to implementing the "expr"
command from ClangExpression and
CommandObjectExpression into ClangUserExpression,
a new class,

- moving the common parser interaction code from
ClangExpression into ClangExpressionParser, a new
class, and

- making ClangFunction rely only on
ClangExpressionParser and not depend on the
internal implementation of ClangExpression.

Side effects include:

- the compiler interaction code has been factored
out of ClangFunction and is now in an AST pass
(ASTStructExtractor),

- the header file for ClangFunction is now fully
documented,

- several bugs that only popped up when Clang was
deallocated (which never happened, since the
lifetime of the compiler was essentially infinite)
are now fixed, and

- the developer-only "call" command has been
disabled.

I have tested the expr command and the Objective-C
step-into code, which use ClangUserExpression and
ClangFunction, respectively, and verified that they
work. Please let me know if you encounter bugs or
poor documentation.


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