summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression/ClangExpressionDeclMap.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Added automatically generated result variables for eachSean Callanan2010-08-121-35/+56
| | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 110896
* Added support for persistent variables to theSean Callanan2010-08-111-26/+122
| | | | | | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 110777
* Removed the -i option from the expr command, andSean Callanan2010-08-061-1/+3
| | | | | | | | | | | | made IR-based expression evaluation the default. Also added a new class to hold persistent variables. The class is empty as yet while I write up a design document for what it will do. Also the place where it is currently created (by the Expression command) is certainly wrong. llvm-svn: 110415
* Added support for accessing members of C++ objects,Sean Callanan2010-08-041-0/+19
| | | | | | | | | | | | | including superclass members. This involved ensuring that access control was ignored, and ensuring that the operands of BitCasts were properly scanned for variables that needed importing. Also laid the groundwork for declaring objects of custom types; however, this functionality is disabled for now because of a potential loop in ASTImporter. llvm-svn: 110174
* Added support for objective C built-in types: id, Class, and SEL. This Greg Clayton2010-08-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 110089
* Added support for rewriting objc_msgSend so we canSean Callanan2010-07-311-3/+36
| | | | | | | | | | | call Objective-C methods from expressions. Also added some more logging to the function-calling thread plan so that we can see the registers when a function finishes. Also documented things maybe a bit better. llvm-svn: 109938
* Added support for calling functions from expressions.Sean Callanan2010-07-271-4/+10
| | | | | | | | | Right now we mock up the function as a variadic function when generating the IR for the call; we need to eventually make the function be the right type if the type is available. llvm-svn: 109543
* Added support for locating a function that isSean Callanan2010-07-271-0/+18
| | | | | | | referenced in the IR. We don't yet support updating the call to that function. llvm-svn: 109483
* Changed SymbolContext so when you search for functionsSean Callanan2010-07-271-26/+60
| | | | | | | | | | | | | | | | | | it returns a list of functions as a SymbolContextList. Rewrote the clients of SymbolContext to use this SymbolContextList. Rewrote some of the providers of the data to SymbolContext to make them respect preferences as to whether the list should be cleared first; propagated that change out. ClangExpressionDeclMap and ClangASTSource use this new function list to properly generate function definitions - even for functions that don't have a prototype in the debug information. llvm-svn: 109476
* Updated the IR converter for the target to eliminateSean Callanan2010-07-241-0/+6
| | | | | | | | | | | | spurious guard variables on expression statics. Updated the AST result synthesizer to eliminate the unneeded result pointer. Very rudimentary expressions now evaluate correctly in the target using the new JIT-based mechanism. llvm-svn: 109317
* Added logging:Sean Callanan2010-07-231-0/+65
| | | | | | | | | | - When we JIT an expression, we print the disassembly of the generated code - When we put the structure into the target, we print the individual entries in the structure byte for byte. llvm-svn: 109278
* Modified TaggedASTType to inherit from ClangASTTypeSean Callanan2010-07-231-11/+8
| | | | | | | | | | | | | and moved it to its own header file for cleanliness. Added more logging to ClangFunction so that we can diagnose crashes in the executing expression. Added code to extract the result of the expression from the struct that is passed to the JIT-compiled code. llvm-svn: 109199
* Change over to using the definitions for mach-o types and defines to theGreg Clayton2010-07-211-6/+13
| | | | | | | | | | | 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. llvm-svn: 109046
* Added functionality to dematerialize values that wereSean Callanan2010-07-201-126/+187
| | | | | | | | | | | | | | used by the JIT compiled expression, including the result of the expression. Also added a new class, ASTType, which encapsulates an opaque Clang type and its associated AST context. Refactored ClangExpressionDeclMap to use ASTTypes, significantly reducing the possibility of mixups of types from different AST contexts. llvm-svn: 108965
* Added the necessary code to copy variables used bySean Callanan2010-07-171-87/+197
| | | | | | | an expression into the struct prepared for the JIT compiled code to use. llvm-svn: 108596
* Wrote the code that looks at a context to seeSean Callanan2010-07-161-23/+175
| | | | | | | if the variables in that context allow a particular JIT compiled expression to run in that context. llvm-svn: 108485
* "expr -i" now performs the required transforms toSean Callanan2010-07-131-1/+101
| | | | | | | | prepare the IR for JIT compilation. We still need to do the JIT compilation and move the arguments in/out of target memory. llvm-svn: 108279
* Updated the expression parser to use proper logging when Sean Callanan2010-06-231-18/+22
| | | | | | | looking for external variables. Also cleaned up the log messages coming from the DWARF interpreter. llvm-svn: 106613
* Added support to the expression parser for locatingSean Callanan2010-06-221-5/+54
| | | | | | externally-defined functions. llvm-svn: 106606
* Initial checkin of lldb code from internal Apple repo.Chris Lattner2010-06-081-0/+246
llvm-svn: 105619
OpenPOWER on IntegriCloud