1a582bc544258cfc6dde121c1fbc8a31cf59a469 |
|
27-Jun-2013 |
Sean Callanan <scallanan@apple.com> |
Fixed the IRInterpreter to reject any code that 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> git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185057 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
d39de039f8beb6496ab3a7a485d0dcf1ce19f2ba |
|
06-Jun-2013 |
Sean Callanan <scallanan@apple.com> |
Hardened the IR interpreter to prevent it from reading non-standard value sizes. <rdar://problem/14081292> git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183448 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
a45d2e2806cfa1e5b0189df96f069c137278fd46 |
|
06-Jun-2013 |
Sean Callanan <scallanan@apple.com> |
Fixes for the IR interpreter: - Implemented the SExt instruction, and - eliminated redundant codepaths for constant handling. Added test cases. <rdar://problem/13244258> <rdar://problem/13955820> git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183344 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
884288bcb6824452a3c64eb772c0976501acc47a |
|
03-Jun-2013 |
Matt Kopec <Matt.Kopec@intel.com> |
Fix various build warnings. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183140 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
9a71f969bc71ca25f5c28fbf994f4923132c1ee2 |
|
31-May-2013 |
Sean Callanan <scallanan@apple.com> |
Fixed value evaluation to handle null constants. <rdar://problem/14005311> git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183022 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
b50a2f360d56729c9b1082a45ec91faf7448a725 |
|
24-May-2013 |
Sean Callanan <scallanan@apple.com> |
Fixed signed operations in the IR interpreter. Scalar now can make itself signed if needed. <rdar://problem/13977632> git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@182668 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
d4f102fd6715cb8f31532faf6017bf414fdff686 |
|
02-May-2013 |
Sean Callanan <scallanan@apple.com> |
Since the IR interpreter does not (currently) 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> git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180899 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
cdc3ea5398f251d3eca482595f103b1874e51538 |
|
27-Apr-2013 |
Sean Callanan <scallanan@apple.com> |
Performance optimizations to ClangUserExpression, 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> git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180664 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
7f27bcc0624ba4a43e87b4d9803c9aa1bbd0e2d9 |
|
25-Apr-2013 |
Sean Callanan <scallanan@apple.com> |
Purged unnecessary data structures from the IR 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. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180565 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
cd3ba2dd2757fa3de8aba0ba9ba4614055eb0ec3 |
|
25-Apr-2013 |
Greg Clayton <gclayton@apple.com> |
Don't crash if we try to interpret the IR (incorrectly in this case) and 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 git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180235 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
41efd0e50a36a18d227a484f4dd70a7516dbe57b |
|
20-Apr-2013 |
Sean Callanan <scallanan@apple.com> |
Fixed an error message. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179918 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
2ce786d8238bbfb4f1cde19d5340d646631e499f |
|
19-Apr-2013 |
Sean Callanan <scallanan@apple.com> |
Removed 2800+ lines of code that no longer do anything now that the IR interpreter and the JIT share the same materialization codepaths. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179842 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
0f0551e67d8ea8d63ace5456f7d42d951827b017 |
|
19-Apr-2013 |
Sean Callanan <scallanan@apple.com> |
This commit changes the way LLDB executes user expressions. Previously, ClangUserExpression assumed that if there was a constant result for an expression then it could be determined during parsing. In particular, the IRInterpreter ran while parser state (in particular, ClangExpressionDeclMap) was present. This approach is flawed, because the IRInterpreter actually is capable of using external variables, and hence the result might be different each run. Until now, we papered over this flaw by re-parsing the expression each time we ran it. I have rewritten the IRInterpreter to be completely independent of the ClangExpressionDeclMap. Instead of special-casing external variable lookup, which ties the IRInterpreter closely to LLDB, we now interpret the exact same IR that the JIT would see. This IR assumes that materialization has occurred; hence the recent implementation of the Materializer, which does not require parser state (in the form of ClangExpressionDeclMap) to be present. Materialization, interpretation, and dematerialization are now all independent of parsing. This means that in theory we can parse expressions once and run them many times. I have three outstanding tasks before shutting this down: - First, I will ensure that all of this works with core files. Core files have a Process but do not allow allocating memory, which currently confuses materialization. - Second, I will make expression breakpoint conditions remember their ClangUserExpression and re-use it. - Third, I will tear out all the redundant code (for example, materialization logic in ClangExpressionDeclMap) that is no longer used. While implementing this fix, I also found a bug in IRForTarget's handling of floating-point constants. This should be fixed. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179801 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
81a96aa6242f7b559770f5dc62316253cb8cb0d4 |
|
18-Apr-2013 |
Greg Clayton <gclayton@apple.com> |
Since we use C++11, we should switch over to using std::unique_ptr when C++11 is being used. To do this, we follow what we have done for shared pointers and we define a STD_UNIQUE_PTR macro that can be used and it will "do the right thing". Due to some API differences in std::unique_ptr and due to the fact that we need to be able to compile without C++11, we can't use move semantics so some code needed to change so that it can compile with either C++. Anyone wanting to use a unique_ptr or auto_ptr should now use the "STD_UNIQUE_PTR(TYPE)" macro. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179779 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
3a201e4eacf34418d6640dc2645165e8ae3d1ccf |
|
17-Apr-2013 |
Sean Callanan <scallanan@apple.com> |
Added a new API to the IRInterpreter (the old API will be gone soon!) that lets it interpret a function using just an llvm::Module, an llvm::Function, and a MemoryMap. Also added an API to IRExecutionUnit to get at its llvm::Function, so that the IRInterpreter can work with it. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179704 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
44199f15f5b69bee8b64aa28e5e2b6d87d0fc932 |
|
17-Apr-2013 |
Sean Callanan <scallanan@apple.com> |
Made the IRInterpreter's methods static, since it doesn't actually hold any important state. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179702 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
e804caf35c6cca4b42ff609ded7e4dc6f22c6eba |
|
17-Apr-2013 |
Sean Callanan <scallanan@apple.com> |
Made the IRInterpreter be able to operate without a ClangExpressionDeclMap. Any functions that require value resolution etc. fail if the ClangExpressionDeclMap isn't present - which is exactly what is desired. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179695 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
13615cfef0435af28ccc1e93e13c6161e94585ed |
|
17-Apr-2013 |
Sean Callanan <scallanan@apple.com> |
Updated the IRInterpreter to work with an IRMemoryMap rather than through its own memory abstraction. This considerably simplifies the code, and makes it possible to run the IRInterpreter multiple times on an already-parsed expression in the absence of a ClangExpressionDeclMap. Changes include: - ClangExpressionDeclMap's interface methods for the IRInterpreter now take IRMemoryMap arguments. They are not long for this world, however, since the IRInterpreter will soon be working with materialized variables. - As mentioned above, removed the Memory class from the IR interpreter altogether. It had a few functions that remain useful, such as keeping track of Values that have been placed in memory, so I moved those into methods on InterpreterStackFrame. - Changed IRInterpreter to work with lldb::addr_t rather than Memory::Region as its primary currency. - Fixed a bug in the IRMemoryMap where it did not report correct address byte size and byte order if no process was present, because it was using Target::GetDefaultArchitecture() rather than Target::GetArchitecture(). - Made IRMemoryMap methods clear the Errors they receive before running. Having to do this by hand is just annoying. The testsuite seems happy with these changes, but please let me know if you see problems (especially in use cases without a process). git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179675 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
86d6ac2a3d920622c1ee7a68b5ca28b09dc18142 |
|
17-Apr-2013 |
Sean Callanan <scallanan@apple.com> |
Modified the IRInterpreter to take an IRMemoryMap. It doesn't use it yet; the next step is to make it use the IRMemoryMap instead of its own conjured-up Memory class. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179650 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.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/IRInterpreter.cpp
|
583f15dfb8f680cee0c499bcd876c5eb3b173136 |
|
19-Mar-2013 |
Sean Callanan <scallanan@apple.com> |
Fixed handling of function pointers in the IR interpreter. They now have correct values, even when the process is not running. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177372 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
5aff015bfe8ef7ae68c61801e320870471b2c4df |
|
16-Feb-2013 |
Sean Callanan <scallanan@apple.com> |
Fixes in the IRInterpreter: - removed an unnecessary variable - fixed an issue where we sometimes wrote too much data into a buffer - made the recognition of variables as "this" a little more conservative <rdar://problem/13216268> git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@175318 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
d6d63d68de4fd26caee9e953ff912f9250911ec8 |
|
07-Feb-2013 |
Greg Clayton <gclayton@apple.com> |
Address sanitizer found an issue which we filed a bug for: <rdar://problem/13168967> git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@174579 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.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/Expression/IRInterpreter.cpp
|
fac004ce7f0d5bbfaa6b59a88365bb752e31129d |
|
09-Jan-2013 |
Sean Callanan <scallanan@apple.com> |
Added emulation of shifts to the IR interpreter. <rdar://problem/12978619> git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@172013 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
a80c70c22a3e25d693e1a569a5209820873d44c8 |
|
02-Jan-2013 |
Chandler Carruth <chandlerc@gmail.com> |
Rewrite #includes for llvm/Foo.h to llvm/IR/Foo.h as appropriate to reflect the migration in r171366. I don't know anything about lldb, but a force run of the build bot indicated it would need this patch. I'll try to watch the build bot to get it green. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@171374 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
bab2a0caa65d114ab1dfc9314636c8057de285c7 |
|
21-Dec-2012 |
Sean Callanan <scallanan@apple.com> |
Added support for the modulus operator (%) to the IR interpreter. <rdar://problem/12921700> git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@170934 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
b31911838a69b0c0fe63e89f4d12f6efcc09bffb |
|
11-Dec-2012 |
Sean Callanan <scallanan@apple.com> |
Fixed the IRInterpreter's handling of "this" and "self" when those pointers are in registers. Previously in this case the IRInterpreter would handle them just as if the user had typed in "$rdi", which isn't safe because $rdi is passed in through the argument struct. Now we correctly break out all three cases (i.e., normal variables in registers, $reg, and this/self), and handle them in a way that's a little bit easier to read and change. This results in more accurate printing of "this" and "self" pointers all around. I have strengthened the optimized-code test case for Objective-C to ensure that we catch regressions in this area reliably in the future. <rdar://problem/12693963> git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169924 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
b9db9d5bb01963774f28540dbe2c5a11f586ff29 |
|
07-Dec-2012 |
Daniel Malea <daniel.malea@intel.com> |
Fix a few more clang (3.2) warnings on Linux: - remove unused members - add NO_PEDANTIC to selected Makefiles - fix return values (removed NULL as needed) - disable warning about four-char-constants - remove unneeded const from operator*() declaration - add missing lambda function return types - fix printf() with no format string - change sizeof to use a type name instead of variable name - fix Linux ProcessMonitor.cpp to be 32/64 bit friendly - disable warnings emitted by swig-generated C++ code Patch by Matt Kopec! git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169645 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
6b21a9b7c854ccf1eef1753e1ce2e9ab4976e4c2 |
|
01-Dec-2012 |
Sean Callanan <scallanan@apple.com> |
Added support for PtrToInt to the IR interpreter. <rdar://problem/12657742> git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@169063 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.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/Expression/IRInterpreter.cpp
|
7c5e22f2edf0a0ef17e3a401c814a873399d108a |
|
30-Oct-2012 |
Greg Clayton <gclayton@apple.com> |
Path from Ashok Thirumurthi: The attached patch adds eValueTypeVector to lldb_private::Value. The nested struct Vector is patterned after RegisterValue::m_data.buffer. This change to Value allows ClangExpressionDeclMap::LookupDecl to return vector register data for consumption by InterpreterStackFrame::ResolveValue. Note that ResolveValue was tweaked slightly to allocate enough memory for vector registers. An immediate result of this patch is that "expr $xmm0" generates the same results on Linux as on the Mac, which is good enough for TestRegisters.py. In addition, the log of m_memory.PrintData(data_region.m_base, data_region.m_extent) shows that the register content has been resolved successfully. On the other hand, the output is glaringly empty: runCmd: expr $xmm0 output: (unsigned char __attribute__((ext_vector_type(16)))) $0 = {} Expecting sub string: vector_type Matched git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@167033 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
4fbe61ba371bfde827b9424ebe5e14dce3d5fad3 |
|
12-Oct-2012 |
Sean Callanan <scallanan@apple.com> |
Fixed the IR interaction layer to deal with a change in the LLDB target data API. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165754 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
ce6335881f330581f641ef808602cac192664adf |
|
11-Oct-2012 |
Micah Villmow <villmow@gmail.com> |
Add in the first iteration of support for llvm/clang/lldb to allow variable per address space pointer sizes to be optimized correctly. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165726 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
3051ed73a487e92f12f8b6062f8415781453da21 |
|
08-Oct-2012 |
Micah Villmow <villmow@gmail.com> |
Move TargetData to DataLayout. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165396 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
9880efacdd3a5e855b405d89433a01170422a889 |
|
11-Aug-2012 |
Jim Ingham <jingham@apple.com> |
Add explicit casts to bool in "shared pointer is valid" constructs that return bool. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161719 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
b386d82334b65fb984348f2027b1cb7714de993f |
|
09-Aug-2012 |
Sean Callanan <scallanan@apple.com> |
Removed explicit NULL checks for shared pointers and instead made us use implicit casts to bool. This generated a warning in C++11. <rdar://problem/11930775> git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@161559 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
4a379b1194f3e6b308cd6e80b45d6ca5dd0aafd7 |
|
17-Jul-2012 |
Greg Clayton <gclayton@apple.com> |
Ran the static analyzer on the codebase and found a few things. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160338 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
6a3f9af114bfdc05c7b89de45fe7e0a52aceef0a |
|
23-Apr-2012 |
Sean Callanan <scallanan@apple.com> |
Implemented zext as a no-op cast in the IR interpreter. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@155360 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
598df88bd6fc33c6fb330bc859bdc277795501f3 |
|
14-Mar-2012 |
Greg Clayton <gclayton@apple.com> |
<rdar://problem/10434005> Prepare LLDB to be built with C++11 by hiding all accesses to std::tr1 behind macros that allows us to easily compile for either C++. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@152698 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
7347ef89c01f564d9cd84a77f6d860c607e8fee4 |
|
29-Feb-2012 |
Sean Callanan <scallanan@apple.com> |
Made the IR interpreter handle GetElementPtr instructions with non-constant indexes. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@151734 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
52d0d027dd38518e4b0cfb135a5d50a6652c5daf |
|
15-Feb-2012 |
Sean Callanan <scallanan@apple.com> |
Previoously the expression parser had to rely on the JIT when printing the values of registers (e.g., "expr $pc"). Now the expression parser can do this in the IR interpreter without running code in the inferior process. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150554 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
8eac77d782851ae85f821fee8eb0070b5d84b53b |
|
08-Feb-2012 |
Sean Callanan <scallanan@apple.com> |
The IRInterpreter's constant evaluator wasn't sufficiently general - it could only handle literals and operations that didn't change the data. Now the constant evaluator passes APInt values around, and can handle GetElementPtr constants. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150034 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.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/Expression/IRInterpreter.cpp
|
13d24fb1817faa7ccc4cfd799113ba1a2b8968eb |
|
29-Jan-2012 |
Greg Clayton <gclayton@apple.com> |
Switching back to using std::tr1::shared_ptr. We originally switched away due to RTTI worries since llvm and clang don't use RTTI, but I was able to switch back with no issues as far as I can tell. Once the RTTI issue wasn't an issue, we were looking for a way to properly track weak pointers to objects to solve some of the threading issues we have been running into which naturally led us back to std::tr1::weak_ptr. We also wanted the ability to make a shared pointer from just a pointer, which is also easily solved using the std::tr1::enable_shared_from_this class. The main reason for this move back is so we can start properly having weak references to objects. Currently a lldb_private::Thread class has a refrence to its parent lldb_private::Process. This doesn't work well when we now hand out a SBThread object that contains a shared pointer to a lldb_private::Thread as this SBThread can be held onto by external clients and if they end up using one of these objects we can easily crash. So the next task is to start adopting std::tr1::weak_ptr where ever it makes sense which we can do with lldb_private::Debugger, lldb_private::Target, lldb_private::Process, lldb_private::Thread, lldb_private::StackFrame, and many more objects now that they are no longer using intrusive ref counted pointer objects (you can't do std::tr1::weak_ptr functionality with intrusive pointers). git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149207 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
ddf110d67eb3d3e621441c4383904e838bc0c403 |
|
24-Jan-2012 |
Sean Callanan <scallanan@apple.com> |
Added a mechanism for the IR interpreter to return an error along with its boolean result. The expression parser reports this error if the interpreter fails and the expression could not be run in the target. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@148870 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
740b3b79b72e91a3e791693f178eef916e7a6feb |
|
11-Jan-2012 |
Sean Callanan <scallanan@apple.com> |
After thinking about it, it doesn't seem right to make assumptions if the type is unsized. We just give up (and let the JIT handle it) instead. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147915 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
883fdbedbd31910393d58dac7c3cb2d914eb89a7 |
|
11-Jan-2012 |
Sean Callanan <scallanan@apple.com> |
If the size of a type can't be determined, default to assume it's of pointer size. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147906 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
4237e1ea921ebd588b29319bf12050ba737fbca2 |
|
04-Jan-2012 |
Sean Callanan <scallanan@apple.com> |
Added logging to track when the IR interpreter resolves values in registers. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147551 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.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/IRInterpreter.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/IRInterpreter.cpp
|
4b3cef072258eb17bd387ca7c7be18b6451fe09a |
|
26-Oct-2011 |
Sean Callanan <scallanan@apple.com> |
Extended the IR interpreter to handle the variables "_cmd", "this", and "self". These variables are handled differently from all other external variables used by the expression. Other variables are used indirectly through the $__lldb_arg operand; only _cmd, this, and self are passed directly through the ABI. There are two modifications: - I added a function to ClangExpressionDeclMap that retrives the value of one of these variables by name; and - I made IRInterpreter fetch these values when needed, and ensured that the proper level of indirection is used. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@143065 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
557ccd6b47c5d4b3736e704e7f1e887a7fff6549 |
|
21-Oct-2011 |
Sean Callanan <scallanan@apple.com> |
Made the IR interpreter more robust in the presence of arbitrary pointers, allowing direct dereferences of literal addresses. Also disabled special-cased generation of certain expression results (especially casts), substituting the IR interpreter. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142638 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
141f8d98cb74262914d66a7af4732e8cb2d8699f |
|
12-Oct-2011 |
Greg Clayton <gclayton@apple.com> |
Fix preprocessor warnings for no newline at the end of the source files. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@141755 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
a8428a458e779a64c8642fef5d29c7f6cc1b95f9 |
|
22-Sep-2011 |
Sean Callanan <scallanan@apple.com> |
Fixed a problem with the IR interpreter that caused it to generate result variables that were not bound to their underlying data. This allowed the SBValue class to use the interpreter (if possible). Also made sure that any result variables that point to stack allocations in the stack frame of the interpreted expressions do not get live data. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140285 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|
47dc457387b690c5e4df1c0c7dd8c4337b92e630 |
|
15-Sep-2011 |
Sean Callanan <scallanan@apple.com> |
This patch modifies the expression parser to allow it to execute expressions even in the absence of a process. This allows expressions to run in situations where the target cannot run -- e.g., to perform calculations based on type information, or to inspect a binary's static data. This modification touches the following files: lldb-private-enumerations.h Introduce a new enum specifying the policy for processing an expression. Some expressions should always be JITted, for example if they are functions that will be used over and over again. Some expressions should always be interpreted, for example if the target is unsafe to run. For most, it is acceptable to JIT them, but interpretation is preferable when possible. Target.[h,cpp] Have EvaluateExpression now accept the new enum. ClangExpressionDeclMap.[cpp,h] Add support for the IR interpreter and also make the ClangExpressionDeclMap more robust in the absence of a process. ClangFunction.[cpp,h] Add support for the new enum. IRInterpreter.[cpp,h] New implementation. ClangUserExpression.[cpp,h] Add support for the new enum, and for running expressions in the absence of a process. ClangExpression.h Remove references to the old DWARF-based method of evaluating expressions, because it has been superseded for now. ClangUtilityFunction.[cpp,h] Add support for the new enum. ClangExpressionParser.[cpp,h] Add support for the new enum, remove references to DWARF, and add support for checking whether the expression could be evaluated statically. IRForTarget.[h,cpp] Add support for the new enum, and add utility functions to support the interpreter. IRToDWARF.cpp Removed CommandObjectExpression.cpp Remove references to the obsolete -i option. Process.cpp Modify calls to ClangUserExpression::Evaluate to pass the correct enum (for dlopen/dlclose) SBValue.cpp Add support for the new enum. SBFrame.cpp Add support for he new enum. BreakpointOptions.cpp Add support for the new enum. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139772 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRInterpreter.cpp
|