summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression
Commit message (Collapse)AuthorAgeFilesLines
...
* Import the builtin type prefix before we import the user expression prefix ↵Greg Clayton2013-07-031-4/+4
| | | | | | so that the user expression prefix can use the uint, int, size_t, and other types without having to define them. llvm-svn: 185488
* Missed a place where we have to pass the source location twice to ↵Jim Ingham2013-06-281-0/+1
| | | | | | FunctionDecl::Create. llvm-svn: 185233
* Hitherto the IRForTarget infrastructure has mainlySean Callanan2013-06-281-178/+252
| | | | | | | | | | | | | | | | | | | | | been suitable for preparing a single IR function for operation in the target. However, using blocks and lambdas creates other IR functions that also need to be processed. I have audited IRForTarget to make it process multiple functions. Where IRForTarget would add new instructions at the beginning of the main expression function, it now adds them on-demand in the function where they are needed. This is enabled by a system of FunctionValueCaches, which invoke a lambda to create or derive the values as needed, or report the result of that lambda if it has already been called for the given function. <rdar://problem/14180236> llvm-svn: 185224
* Default parameters are evil and should not be used. Case and point this ↵Greg Clayton2013-06-281-5/+8
| | | | | | checkin that fixes implicit conversions that were happening. llvm-svn: 185217
* Cleanup of IRForTarget. Removed some relics ofSean Callanan2013-06-271-80/+0
| | | | | | | the time when the IRInterpreter ran inside IRForTarget. llvm-svn: 185088
* Fixed the IRInterpreter to reject any code thatSean Callanan2013-06-271-0/+14
| | | | | | | | | | | has more than one function with a body. This prevents declarations e.g. of blocks from being passed to the IRInterpreter; they must pass through to the JIT. <rdar://problem/14180236> llvm-svn: 185057
* Fixed IRExecutionUnit so that it looks up addressesSean Callanan2013-06-271-2/+17
| | | | | | | | | | | correctly. We have been getting lucky since most expressions generate only one section (or the first code section contains all the code), but sometimes it actually matters. <rdar://problem/14180236> llvm-svn: 185054
* Remove the process's reservation cache and don'tSean Callanan2013-06-271-24/+2
| | | | | | | | | | | | | | | | | | | | | | bother checking if a region is safe to use. In cases where regions need to be synthesized rather than properly allocated, the memory reads required to determine whether the area is used are - insufficient, because intermediate locations could be in use, and - unsafe, because on some platforms reading from memory can trigger events. All this only makes a difference on platforms where memory allocation in the target is impossible. Behavior on platforms where it is possible should stay the same. <rdar://problem/14023970> llvm-svn: 185046
* Remove unused include.Rafael Espindola2013-06-261-1/+0
| | | | llvm-svn: 184954
* Fix the lldb build.Rafael Espindola2013-06-261-12/+10
| | | | llvm-svn: 184948
* Fixed a bug in ClangASTSource where we would returnSean Callanan2013-06-251-9/+9
| | | | | | the target of a typedef when asked for a typedef. llvm-svn: 184886
* Fixed a problem with materialization andSean Callanan2013-06-201-1/+6
| | | | | | | | | | dematerialization of registers that caused conditional breakpoint expressions not to work properly. Also added a testcase. <rdar://problem/14129252> llvm-svn: 184451
* Sort out a number of mismatched integer types in order to cut down the ↵Andy Gibbs2013-06-192-3/+3
| | | | | | number of compiler warnings. llvm-svn: 184333
* Fixed a problem in the expression parser thatSean Callanan2013-06-171-4/+4
| | | | | | | | | caused the IR interpreter not to work if the process had finished running. <rdar://problem/14124301> llvm-svn: 184125
* Fix the build. clang/Driver/OptTable.h was removed.Rafael Espindola2013-06-141-1/+0
| | | | llvm-svn: 183991
* Don't depend on the transitive inclusion of PathV1.hRafael Espindola2013-06-131-0/+1
| | | | llvm-svn: 183946
* Hardened the IR interpreter to prevent it fromSean Callanan2013-06-061-1/+1
| | | | | | | | reading non-standard value sizes. <rdar://problem/14081292> llvm-svn: 183448
* Fixes for the IR interpreter:Sean Callanan2013-06-051-8/+40
| | | | | | | | | | | | | | - Implemented the SExt instruction, and - eliminated redundant codepaths for constant handling. Added test cases. <rdar://problem/13244258> <rdar://problem/13955820> llvm-svn: 183344
* Fixed printf build warning.Greg Clayton2013-06-041-1/+1
| | | | llvm-svn: 183250
* Fix crash (in optimized builds) due to invalid metadata operandDaniel Malea2013-06-032-17/+8
| | | | | | | | | - ConstantDataArray is not a valid MDNode operand - encode function-name strings in metadata by wrapping in an MDString instead - should resolve reported by http://llvm-jenkins.debian.net/job/llvm-toolchain-quantal-binaries/architecture=amd64,distribution=quantal/173/ llvm-svn: 183153
* Fix various build warnings.Matt Kopec2013-06-033-29/+29
| | | | llvm-svn: 183140
* Fixed value evaluation to handle null constants.Sean Callanan2013-05-311-1/+5
| | | | | | <rdar://problem/14005311> llvm-svn: 183022
* Fixed signed operations in the IR interpreter.Sean Callanan2013-05-241-0/+12
| | | | | | | | Scalar now can make itself signed if needed. <rdar://problem/13977632> llvm-svn: 182668
* Fixed a bug where persistent variables did notSean Callanan2013-05-222-1/+27
| | | | | | | | | | | | | | | | | live as long as they needed to. This led to equality tests involving persistent variables often failing or succeeding when they had no business doing so. To do this, I introduced the ability for a memory allocation to "leak" - that is, to persist in the process beyond the lifetime of the expression. Hand-declared persistent variables do this now. <rdar://problem/13956311> llvm-svn: 182528
* Fixed a problem where the dynamic checkers (i.e.,Sean Callanan2013-05-181-17/+20
| | | | | | | | | the Objective-C object checker and the pointer checker) were not always installed into expressions. <rdar://problem/13882566> llvm-svn: 182183
* <rdar://problem/13893094>Greg Clayton2013-05-173-84/+51
| | | | | | Show variables that were in the debug info but optimized out. Also display a good error message when one of these variables get used in an expression. llvm-svn: 182066
* Added a per-process cache for reserved memorySean Callanan2013-05-161-15/+28
| | | | | | | | | | | | | | | | regions that aren't actually allocated in the process. This cache is used by the expression parser if the underlying process doesn't support memory allocation, to avoid needless repeated searches for unused address ranges. Also fixed a silly bug in IRMemoryMap where it would continue searching even after it found a valid region. <rdar://problem/13866629> llvm-svn: 182028
* Fixed a few obvious errors pointed out by the static analyzer.Jim Ingham2013-05-153-3/+3
| | | | llvm-svn: 181911
* Add all Decls found through FindExternalLexicalDeclsSean Callanan2013-05-091-0/+12
| | | | | | | | | | | | | | to the DeclContext. This fulfils the contract that we make with Clang by returning ELR_AlreadyLoaded. This is a little aggressive in that it does not allow the ASTImporter to import the child decls with any lexical parent other than the Decl that reported them as children. <rdar://problem/13517713> llvm-svn: 181498
* Fixed IRExecutionUnit build failures due to changesSean Callanan2013-05-081-22/+0
| | | | | | in the underlying llvm::JITMemoryManager API. llvm-svn: 181387
* Since the IR interpreter does not (currently)Sean Callanan2013-05-021-0/+23
| | | | | | | | | | support operands with vector types, it now reports that it cannot interpret expressions that use vector types. They get sent to the JIT instead. <rdar://problem/13733651> llvm-svn: 180899
* Fixed a problem where the expression parser wouldSean Callanan2013-04-301-1/+1
| | | | | | | | | | give up if it couldn't find the address for the first symbol it found with a particular name and type. <rdar://problem/13748253> llvm-svn: 180764
* Performance optimizations to ClangUserExpression,Sean Callanan2013-04-274-58/+100
| | | | | | | | | | | | | | | | | | | | mostly related to management of the stack frame for the interpreter. - First, if the expression can be interpreted, allocate the stack frame in the target process (to make sure pointers are valid) but only read/write to the copy in the host's memory. - Second, keep the memory allocations for the stack frame and the materialized struct as member variables of ClangUserExpression. This avoids memory allocations and deallocations each time the expression runs. <rdar://problem/13043685> llvm-svn: 180664
* Fixed a crash when we tried dyn_cast<>ing aSean Callanan2013-04-271-0/+3
| | | | | | | | null pointer. <rdar://problem/13745684> llvm-svn: 180663
* Hardening to avoid null-pointer crashes in theSean Callanan2013-04-261-0/+6
| | | | | | | | presence of malformed class types. <rdar://problem/13740646> llvm-svn: 180645
* Change Malloc to request an aligned memory size.Matt Kopec2013-04-261-4/+10
| | | | | | This fixes a problem on Linux where allocated memory would get overun in some use cases (ie. in TestExprs2.py). llvm-svn: 180614
* Purged unnecessary data structures from the IRSean Callanan2013-04-251-25/+6
| | | | | | | | | | | | interpreter. They are a legacy from when the IR interpreter didn't work with materialized values but rather got values directly from ClangExpressionDeclMap. Also updated the #includes for IRInterpreter accordingly. llvm-svn: 180565
* Fixed a crash in ClangASTSource when logging isSean Callanan2013-04-251-1/+2
| | | | | | disabled. llvm-svn: 180563
* Don't crash if we try to interpret the IR (incorrectly in this case) and ↵Greg Clayton2013-04-251-3/+5
| | | | | | | | can't handle the size. This came from trying to do: (lldb) p typedef float __attribute__((ext_vector_type(8))) __ext_vector_float8; (__ext_vector_float8)$ymm0 llvm-svn: 180235
* Fixed IRForTarget to handle Objective-C messagesSean Callanan2013-04-241-0/+10
| | | | | | | | sent to "super". <rdar://problem/13042260> llvm-svn: 180217
* Fixed expression parser handling of empty strings.Sean Callanan2013-04-241-0/+5
| | | | | | <rdar://problem/12977827> llvm-svn: 180215
* Fixed a problem where the expression parser wouldSean Callanan2013-04-242-4/+18
| | | | | | | | | | | | | | not find multiple functions with the same name but different types. Now we keep track of what types we've already reported for a function and only elide functions if we've already reported a conflicting one. Also added a test case. <rdar://problem/11367837> llvm-svn: 180167
* Be sure to print out the fully mangled name when we are unable to find a ↵Greg Clayton2013-04-231-0/+4
| | | | | | function to call so we can easily look for this symbol if needed. llvm-svn: 180151
* Fixed the expression parser's handling of resultSean Callanan2013-04-201-15/+40
| | | | | | | | | | and persistent variables so that they are not treated as remaining in the target process (i.e., having live data) when the process does not allow persistent allocations (e.g., when there is no process or in the case of kernel core files). llvm-svn: 179919
* Fixed an error message.Sean Callanan2013-04-201-1/+1
| | | | llvm-svn: 179918
* Fixed some linux buildbot warnings.Greg Clayton2013-04-191-1/+1
| | | | llvm-svn: 179892
* Fixed two problems when reading constant/registerSean Callanan2013-04-191-1/+1
| | | | | | | | | | | | | | variables in the ValueObject code: - Report an error if the variable does not have a valid address. - Return the contents of the data to GetData(), even if the value is constant. <rdar://problem/13690855> llvm-svn: 179876
* Simplified the management of the data buffer forSean Callanan2013-04-191-35/+50
| | | | | | | | an Allocation to reduce heap fragmentation and make the code less brittle (and to make some buildbots happier). llvm-svn: 179868
* Removed 2800+ lines of code that no longer do anythingSean Callanan2013-04-192-2373/+19
| | | | | | | now that the IR interpreter and the JIT share the same materialization codepaths. llvm-svn: 179842
* Optimized the way breakpoint conditions are evaluated.Sean Callanan2013-04-191-1/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the options for a breakopint or its locations stored only the text of the breakpoint condition (ironically, they used ClangUserExpression as a glorified std::string) and, each time the condition had to be evaluated in the StopInfo code, the expression parser would be invoked via a static method to parse and then execute the expression. I made several changes here: - Each breakpoint location now has its own ClangUserExpressionSP containing a version of the breakpoint expression compiled for that exact location. - Whenever the breakpoint is hit, the breakpoint condition expression is simply re-run to determine whether to stop. - If the process changes (e.g., it's re-run) or the source code of the expression changes (we use a hash so as to avoid doing string comparisons) the ClangUserExpressionSP is re-generated. This should improve performance of breakpoint conditions significantly, and takes advantage of the recent expression re-use work. llvm-svn: 179838
OpenPOWER on IntegriCloud