eebd175a054e833c928462a91d7cb07c65b5e09d |
|
23-Jul-2013 |
Stefanus Du Toit <stefanus.du.toit@intel.com> |
Remove builtin attribute from calls whose targets we replace If we are replacing a function with the nobuiltin attribute, it may be called with the builtin attribute on call sites. Remove any such attributes since it's illegal to have a builtin call to something other than a nobuiltin function. This fixes the current buildbot breakage (where LLDB crashes on "expression new foo(42)"). git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186990 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
250e7494cc3a99a868880ba9240c70f5b78cf273 |
|
16-Jul-2013 |
Sean Callanan <scallanan@apple.com> |
Fixed a problem in IRForTarget where we would not delete a constant after we replaced it with a dynamically-computed value. Also ensured that we replace all users of the constant if there are multiple ones. Added a testcase. <rdar://problem/14379043> git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186363 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
52f792329be5db8e38961350589e97e8f2823acd |
|
12-Jul-2013 |
Greg Clayton <gclayton@apple.com> |
Huge change to clean up types. A long time ago we start with clang types that were created by the symbol files and there were many functions in lldb_private::ClangASTContext that helped. Later we create ClangASTType which contains a clang::ASTContext and an opauque QualType, but we didn't switch over to fully using it. There were a lot of places where we would pass around a raw clang_type_t and also pass along a clang::ASTContext separately. This left room for error. This checkin change all type code over to use ClangASTType everywhere and I cleaned up the interfaces quite a bit. Any code that was in ClangASTContext that was type related, was moved over into ClangASTType. All code that used these types was switched over to use all of the new goodness. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@186130 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
4a20587f56a05955ea94f650cb39245a092b0c69 |
|
28-Jun-2013 |
Sean Callanan <scallanan@apple.com> |
Hitherto the IRForTarget infrastructure has mainly 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> git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185224 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
5f365bce232e2776898f102fccb5dfe5860ada43 |
|
27-Jun-2013 |
Sean Callanan <scallanan@apple.com> |
Cleanup of IRForTarget. Removed some relics of the time when the IRInterpreter ran inside IRForTarget. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@185088 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
3e11c7ec050648ba865f1d451f8cb46fd39072a8 |
|
19-Jun-2013 |
Andy Gibbs <andyg1001@hotmail.co.uk> |
Sort out a number of mismatched integer types in order to cut down the number of compiler warnings. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@184333 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
804930f1d6f0b79f837acadf76b9d7b75cd412cd |
|
03-Jun-2013 |
Daniel Malea <daniel.malea@intel.com> |
Fix crash (in optimized builds) due to invalid metadata operand - 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/ git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@183153 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
2dbfe86c0b186487aac732fcb9748a863d138ad0 |
|
24-Apr-2013 |
Sean Callanan <scallanan@apple.com> |
Fixed IRForTarget to handle Objective-C messages sent to "super". <rdar://problem/13042260> git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180217 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
e2172fd8191f1f6493a4388f7082bd2f2f43d67f |
|
24-Apr-2013 |
Sean Callanan <scallanan@apple.com> |
Fixed expression parser handling of empty strings. <rdar://problem/12977827> git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180215 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
d9865518043af19069e10a5c56ed68551c7891ad |
|
23-Apr-2013 |
Greg Clayton <gclayton@apple.com> |
Be sure to print out the fully mangled name when we are unable to find a function to call so we can easily look for this symbol if needed. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@180151 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.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/IRForTarget.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/IRForTarget.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/IRForTarget.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/IRForTarget.cpp
|
2a90dd0ce40c583af74333987a48fc82d7d0adf5 |
|
11-Apr-2013 |
Sean Callanan <scallanan@apple.com> |
Handle C++ static variables in the expression parser. <rdar://problem/13631469> git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@179304 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.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/IRForTarget.cpp
|
5365753c4749cdd98a907bf870fdf0cd681a88be |
|
23-Mar-2013 |
Sean Callanan <scallanan@apple.com> |
If there are multiple uses of an Objective-C class symbol in the same expression, handle all of them instead of just the first one. <rdar://problem/13440133> git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177794 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
1cf3da8b0fb0cabf2431b5fe521842929fca69a3 |
|
19-Mar-2013 |
Sean Callanan <scallanan@apple.com> |
Refactored the expression parser so that the IR and the JITted code are managed by a standalone class that handles memory management itself. I have removed RecordingMemoryManager and ProcessDataAllocator, which filled similar roles and had confusing ownership, with a common class called IRExecutionUnit. The IRExecutionUnit manages all allocations ever made for an expression and frees them when it goes away. It also contains the code generator and can vend the Module for an expression to other clases. The end goal here is to make the output of the expression parser re-usable; that is, to avoid re-parsing when re-parsing isn't necessary. I've also cleaned up some code and used weak pointers in more places. Please let me know if you see any leaks; I checked myself as well but I might have missed a case. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177364 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
fe6dc6e241c52822710380cec0931351a1d7b2d3 |
|
14-Mar-2013 |
Greg Clayton <gclayton@apple.com> |
<rdar://problem/13421412> Many "byte size" members and variables were using a mixture of uint32_t and size_t. Switching over to using uint64_t everywhere. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@177091 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.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/IRForTarget.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/IRForTarget.cpp
|
0052123c1f8cd5ad42756f0205e93c9fd11bdcb2 |
|
26-Nov-2012 |
Jim Ingham <jingham@apple.com> |
Missing “if (log)” on a log printf. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@168602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
880b2ca643dd4a03a1a7b8113239cfa6006ed382 |
|
02-Nov-2012 |
Sean Callanan <scallanan@apple.com> |
Fixed a problem where we mistook normal result variables for guard variables because the current class or method named contained the letters "GV". git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@167327 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
6f01c93497df194b6f2194630a81e87d806ce0e0 |
|
12-Oct-2012 |
Jim Ingham <jingham@apple.com> |
Bunch of cleanups for warnings found by the llvm static analyzer. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@165808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.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/IRForTarget.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/IRForTarget.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/IRForTarget.cpp
|
06dc17f8eb821d7256fd42e56f85c2779a29f689 |
|
25-Sep-2012 |
Sean Callanan <scallanan@apple.com> |
Brought LLDB top-of-tree into sync with LLVM/Clang top-of-tree. Removed all local patches and llvm.zip. The intent is that fron now on top-of-tree will always build against LLVM/Clang top-of-tree, and that problems building will be resolved as they occur. Stable release branches of LLDB can be constructed as needed and linked to specific release branches of LLVM/Clang. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@164563 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
083b37663cb6d880f989c6887085edf499e4525f |
|
27-Jul-2012 |
Sean Callanan <scallanan@apple.com> |
Changed the IRForTarget pass to ensure that all sel_getName() calls are generated for all Objective-C selectors before static literals are moved to the static allocation. This prevents errors of the form Internal error [IRForTarget]: Couldn't change a static reference to an Objective-C selector to a dynamic reference <rdar://problem/11331906> git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160887 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
1850f94688f9362c78c27e5472afe022a56c08df |
|
21-Jul-2012 |
Sean Callanan <scallanan@apple.com> |
Added a fix that allows newly-constructed objects to returned by expressions, by removing the __cxa_atexit call that would normally cause these objects to be destroyed. This also prevents many errors of the form Couldn't rewrite one of the arguments of a function call error: Couldn't materialize struct: Structure hasn't been laid out yet <rdar://problem/11309402> git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160596 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
9b98ffdf151138af70f184c8b5b0b32c8e5c3e31 |
|
18-Jul-2012 |
Greg Clayton <gclayton@apple.com> |
<rdar://problem/10998370> Improved the error message when we can find a function in the current program by printing the demangled name. Also added the ability to create lldb_private::Mangled instances with a ConstString when we already have a ConstString for a mangled or demangled name. Also added the ability to call SetValue with a ConstString and also without a boolean to indicate if the string is mangled where we will now auto-detect if the string is mangled. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@160450 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
2b03efefef987b2e4f8710d877b55ececc61ac9c |
|
04-Jul-2012 |
Sean Callanan <scallanan@apple.com> |
Fixed a potential crash if a metadata category we write into doesn't already exist. <rdar://problem/11775508> git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@159700 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
1d970e7a461fe31aca72acc3bbe80d0cc79f2d2b |
|
09-Jun-2012 |
Sean Callanan <scallanan@apple.com> |
Minor fixes for ARM/iOS targets: - On iOS, we select the "apcs-gnu" ABI to match what libraries expect. - Literals are now allocated at their preferred alignment, eliminating many alignment crashes. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@158236 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
26c05d93aaca1505b92c7ebee65b4078c82f335a |
|
26-Apr-2012 |
Sean Callanan <scallanan@apple.com> |
Made the IR interpreter move all floats, not just "wide" ones, to its own constant pool. This reflects the fact that the LLVM code generators for different targets move floats to their constant pools under varying conditions, and the JIT cannot (yet) be relied upon to relocate references to its constant pool correctly. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@155660 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
082105758487ec4e854424404ab358e62dbb18c9 |
|
24-Apr-2012 |
Sean Callanan <scallanan@apple.com> |
Fixed a crasher that occurs when an expression doesn't return a result. If that expression can't be run in the current context (for example, if it uses a function and there is no running process) then we used to try to destroy the nonexistent result variable. We now only destroy the result variable if we actually made one. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@155455 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
39a30348f0233865e168bb3e9a3c63a446f69f34 |
|
09-Feb-2012 |
Sean Callanan <scallanan@apple.com> |
Brought LLVM/Clang up to top of tree. The only change (besides logging) is that now string literals in the IR are ConstantDataArrays instead of ConstantArrays. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@150142 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.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/IRForTarget.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/IRForTarget.cpp
|
1c17a7ed48d8d16ffde99ff56264c142634cc4f1 |
|
22-Dec-2011 |
Sean Callanan <scallanan@apple.com> |
Added checking to prevent a rare crash when getting the name for an external variable in the IR. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147178 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
b6f9ee73d2abe30242e37e6e0436b4998c35c888 |
|
22-Dec-2011 |
Sean Callanan <scallanan@apple.com> |
Made IRForTarget error out correctly when it can't complete the result type, preventing crashes later. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@147107 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.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/IRForTarget.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/IRForTarget.cpp
|
16d2187c0c3992f22e9cb011f863dc0fe35e3cde |
|
03-Dec-2011 |
Greg Clayton <gclayton@apple.com> |
Added the ability for clients to grab a set of symbol table indexes and then add them to a fast lookup map. lldb_private::Symtab now export the following public typedefs: namespace lldb_private { class Symtab { typedef std::vector<uint32_t> IndexCollection; typedef UniqueCStringMap<uint32_t> NameToIndexMap; }; } Clients can then find symbols by name and or type and end up with a Symtab::IndexCollection that is filled with indexes. These indexes can then be put into a name to index lookup map and control if the mangled and demangled names get added to the map: bool add_demangled = true; bool add_mangled = true; Symtab::NameToIndexMap name_to_index; symtab->AppendSymbolNamesToMap (indexes, add_demangled, add_mangled, name_to_index). This can be repeated as many times as needed to get a lookup table that you are happy with, and then this can be sorted: name_to_index.Sort(); Now name lookups can be done using a subset of the symbols you extracted from the symbol table. This is currently being used to extract objective C types from object files when there is no debug info in SymbolFileSymtab. Cleaned up how the objective C types were being vended to be more efficient and fixed some errors in the regular expression that was being used. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145777 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
21ef5bb658e4582339bedf5befc10c13953bdac0 |
|
01-Dec-2011 |
Sean Callanan <scallanan@apple.com> |
Made symbol lookup in the expression parser more robust: - Now a client can specify what kind of symbols are needed; notably, this allows looking up Objective-C class symbols specifically. - In the class of symbols being looked up, if one is non-NULL and others are NULL, LLDB now prefers the non-NULL one. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145554 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.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/IRForTarget.cpp
|
5a55c7a90100e2ed832c35955645bf146e8a66b7 |
|
18-Nov-2011 |
Sean Callanan <scallanan@apple.com> |
This commit completes the rearchitecting of ClangASTSource to allow variables in the persistent variable store to know how to complete themselves from debug information. That fixes a variety of bugs during dematerialization of expression results and also makes persistent variable and result variables ($foo, $4, ...) more useful. I have also added logging improvements that make it much easier to figure out how types are moving from place to place, and made some checking a little more aggressive. The commit includes patches to Clang which are currently being integrated into Clang proper; once these fixes are in Clang top-of-tree, these patches will be removed. The patches don't fix API; rather, they fix some internal bugs in Clang's ASTImporter that were exposed when LLDB was moving types from place to place multiple times. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144969 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
7befa307d354cad9ef1119429dd51032cacb1ce1 |
|
16-Nov-2011 |
Sean Callanan <scallanan@apple.com> |
Two fixes for Objetive-C methods that return struct types. First, I added handling for the memset intrinsic in the IR, which is used to zero out the returned struct. Second, I fixed the object-checking instrumentation to objc_msgSend_stret, and generally tightened up how the object-checking functions get inserted. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144741 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
c41606fe0aeeac867d5d0b64abfe2444c5d36bf2 |
|
15-Nov-2011 |
Sean Callanan <scallanan@apple.com> |
Fixed a bug where the variable-resolution code would occasionally try to resolve the placeholder variable used for static data allocation. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144677 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
9911d2fa3380028c9b798110bd1dcdeb44920421 |
|
02-Nov-2011 |
Sean Callanan <scallanan@apple.com> |
Added functionality to call Objective-C class methods correctly, and added a testcase to check that it works. The main problem here is that Objective-C class method selectors are external references stored in a special data structure in the LLVM IR module for an expression. I just had to extract them and ensure that the real class object locations were properly resolved. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@143520 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
7b8eb76b6e96913bd26a6f5ad9d7667a66aabbc3 |
|
01-Nov-2011 |
Sean Callanan <scallanan@apple.com> |
Minor logging changes: added logging right before the expression makes it to the JIT, and made some logging only appear in verbose mode. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@143467 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
715f6b0843d0099761464f05e4f899cb69e63320 |
|
31-Oct-2011 |
Sean Callanan <scallanan@apple.com> |
The IRDynamicChecks subsystem was not properly detecting Objective-C method calls because the "lldb.call.realName" metadata was no longer being correctly installed. I fixed this problem. git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@143371 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
c7ca466fa99aea0e4e81530157bc8927682cae00 |
|
25-Oct-2011 |
Sean Callanan <scallanan@apple.com> |
Improved handling of static data in the expression parser. Now expression like the following work as expected: - (lldb) expr struct { int a; int b; } $blah = { 10, 20 } <no result> (lldb) expr $blah (<anonymous struct at Parse:6:5>) $blah = { (int) a = 10 (int) b = 20 } - Now the IRForTarget subsystem knows how to handle static initializers of various composite types. Also removed an unnecessary parameter from ClangExpressionDeclMap::GetFunctionInfo. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142936 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
f6a5bd78aaef0e4d477208289ace03cfa7f60649 |
|
22-Oct-2011 |
Greg Clayton <gclayton@apple.com> |
Added template support when parsing DWARF into types. We can now use STL classes in the expression parser. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@142717 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.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/IRForTarget.cpp
|
7e5fa7fc1f8efd24c078e063b2c4b5e13ba5be20 |
|
20-Sep-2011 |
Jason Molenda <jmolenda@apple.com> |
Update declarations for all functions/methods that accept printf-style stdarg formats to use __attribute__ format so the compiler can flag incorrect uses. Fix all incorrect uses. Most of these are innocuous, a few were resulting in crashes. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@140185 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.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/IRForTarget.cpp
|
1b3d1dfa9ab139e1d2ddb34aea11703feb7fd761 |
|
10-Aug-2011 |
Sean Callanan <scallanan@apple.com> |
Fixed a problem that prevented access to members of string literals ("hello"[2]). Also fixed a problem in which empty string literals were not being compiled correctly ((int)printf("") would print garbage). Added a testcase that covers both. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137247 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
58021ccb9087a5199bb6af0fbdb9ab429d4f9aca |
|
10-Aug-2011 |
Johnny Chen <johnny.chen@apple.com> |
Check log shared pointer before using it. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@137173 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.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/IRForTarget.cpp
|
57fb37e102284a87fb91ade738fbd7b0dd314a35 |
|
01-Aug-2011 |
Sean Callanan <scallanan@apple.com> |
Fixed a problem in the expression parser that caused functions that were cast as part of the call to have that cast ignored once their addresses were resolved. Notably, in the case of objc_msgSend(), if the function was cast from something returning i8* to something returning i8, the expression parser was discarding the cast as part of its resolution. This caused crashes later on. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136648 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
9a8774383dc91717151f85b32f3677aef102a77a |
|
01-Aug-2011 |
Sean Callanan <scallanan@apple.com> |
Fixed a bug where named constants were being treated as externals, causing problems when we tried to look their locations up in the debug info. For example: expr char c[] = "foo"; c[0] would terminate when trying to find c in the debug information, despite the fact that c was defined inside the expression. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136629 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
9b6898f3ec1dedbe1dfc8bd7cd1d82a5b10e1bb0 |
|
30-Jul-2011 |
Sean Callanan <scallanan@apple.com> |
This change brings in the latest LLVM/Clang, and completes the support in the LLDB expression parser for incomplete types. Clang now imports types lazily, and we complete those types as necessary. Changes include: - ClangASTSource now supports three APIs which it passes to ClangExpressionDeclMap. CompleteType completes a TagDecl or an ObjCInterfaceDecl when needed; FindExternalVisibleDecls finds named entities that are visible in the expression's scope; and FindExternalLexicalDecls performs a (potentially restricted) search for entities inside a lexical scope like a namespace. These changes mean that entities in namespaces should work normally. - The SymbolFileDWARF code for searching a context for a specific name is now more general, and can search arbitrary contexts. - We are continuing to adapt our calls into LLVM from interfaces that take start and end iterators when accepting multiple items to interfaces that use ArrayRef. - I have cleaned up some code, especially our use of namespaces. This change is neutral for our testsuite and greatly improves correctness for large programs (like Clang) with complicated type systems. It should also lay the groundwork for improving the expression parser's performance as we are lazier and lazier about providing type information. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@136555 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
2bc9eb3ba78efc64a273729b480bafc3bbaa433a |
|
19-Jul-2011 |
Johnny Chen <johnny.chen@apple.com> |
Patch by Matt Johnson to silence G++ warnings! Used hand merge to apply the diffs. I did not apply the diffs for FormatManager.h and the diffs for memberwise initialization for ValueObject.cpp because they changed since. I will ask my colleague to apply them later. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135508 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
4c3fb4b50a87e6e08987096d7edacc26545f58dc |
|
19-Jul-2011 |
Enrico Granata <granata.enrico@gmail.com> |
The implementation of categories is now synchronization safe Code cleanup: - The Format Manager implementation is now split between two files: FormatClasses.{h|cpp} where the actual formatter classes (ValueFormat, SummaryFormat, ...) are implemented and FormatManager.{h|cpp} where the infrastructure classes (FormatNavigator, FormatManager, ...) are contained. The wrapper code always remains in Debugger.{h|cpp} - Several leftover fields, methods and comments from previous design choices have been removed type category subcommands (enable, disable, delete) now can take a list of category names as input - for type category enable, saying "enable A B C" is the same as saying enable C enable B enable A (the ordering is relevant in enabling categories, and it is expected that a user typing enable A B C wants to look into category A, then into B, then into C and not the other way round) - for the other two commands, the order is not really relevant (however, the same inverted ordering is used for consistency) git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@135494 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.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/IRForTarget.cpp
|
cbc07cfd435fb703d8feb69b97ca8590e6ee2fd8 |
|
23-Jun-2011 |
Greg Clayton <gclayton@apple.com> |
Fixed an issue for ARM where data symbols would alway return invalid addresses. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133684 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
54b38413f62af3bcaeb8802a978cc621c8e88eb1 |
|
25-May-2011 |
Greg Clayton <gclayton@apple.com> |
ABI plug-ins must implement the following pure virtual functions: virtual bool ABI::StackUsesFrames () = 0; Should return true if your ABI uses frames when doing stack backtraces. This means a frame pointer is used that points to the previous stack frame in some way or another. virtual bool ABI::CallFrameAddressIsValid (lldb::addr_t cfa) = 0; Should take a look at a call frame address (CFA) which is just the stack pointer value upon entry to a function. ABIs usually impose alignment restrictions (4, 8 or 16 byte aligned), and zero is usually not allowed. This function should return true if "cfa" is valid call frame address for the ABI, and false otherwise. This is used by the generic stack frame unwinding code to help determine when a stack ends. virtual bool ABI::CodeAddressIsValid (lldb::addr_t pc) = 0; Validates a possible PC value and returns true if an opcode can be at "pc". Some ABIs or architectures have fixed width instructions and must be aligned to a 2 or 4 byte boundary. "pc" can be an opcode or a callable address which means the load address might be decorated with extra bits (such as bit zero to indicate a thumb function call for ARM targets), so take this into account when returning true or false. The address should also be validated to ensure it is a valid address for the address size of the inferior process. 32 bit targets should make sure the address is less than UINT32_MAX. Modified UnwindLLDB to use the new ABI functions to help it properly terminate stacks. Modified the mach-o function that extracts dependent files to not resolve the path as the paths inside a binary might not match those on the current host system. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@132021 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
c0492741dc594cd02736521048fe0d8f4c9a0a61 |
|
23-May-2011 |
Sean Callanan <scallanan@apple.com> |
This commit integrates support for the LLVM MCJIT into the mainline LLDB codebase. MCJIT introduces API improvements and better architectural support. This commit adds a new subsystem, the ProcessDataAllocator, which is responsible for performing static data allocations on behalf of the IR transformer. MCJIT currently does not support the relocations required to store the constant pool in the same allocation as the function body, so we allocate a heap region separately and redirect static data references from the expression to that heap region in a new IR modification pass. This patch also fixes bugs in the IR transformations that were exposed by the transition to the MCJIT. Finally, the patch also pulls in a more recent revision of LLVM so that the MCJIT is available for use. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131923 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
0de254aaec7d6766379191e5397ec2294042c5d7 |
|
16-May-2011 |
Sean Callanan <scallanan@apple.com> |
Updated to use the latest LLVM/Clang, to pick up JIT changes. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131391 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
819749647b1605f75753f625050cb240292c08b0 |
|
08-May-2011 |
Sean Callanan <scallanan@apple.com> |
Added support for reading untyped symbols. Right now they are treated as pointers of type (void*). This allows reading of environ, for instance. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131063 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
696cf5f6f2a77b87a4b06cdf0f697749b494665f |
|
07-May-2011 |
Sean Callanan <scallanan@apple.com> |
Made expressions that are just casts of pointer variables be evaluated statically. Also fixed a bug that caused the results of statically-evaluated expressions to be materialized improperly. This bug also removes some duplicate code. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@131042 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
2a8c338d8a069488cf22eed04dd4664d63a237a4 |
|
14-Apr-2011 |
Sean Callanan <scallanan@apple.com> |
Updated LLVM to pick up fixes to the ARM instruction tables. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129500 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
dbeb3e1e038a75f00fd565203839020e1d00a7c6 |
|
11-Apr-2011 |
Stephen Wilson <wilsons@start.ca> |
Order of initialization lists. This patch fixes all of the warnings due to unordered initialization lists. Patch by Marco Minutoli. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@129290 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
0ece52676ccd90f23ad42b72788e4b439a43b31b |
|
10-Feb-2011 |
Sean Callanan <scallanan@apple.com> |
Fixes for two bugs: - Objective-C constant strings were being NULL-terminated erroneously. - Empty Objective-C constant strings were not being generated correctly. Also added the template for a test of these fixes. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125314 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
2c344ca60ed19b1284633f795c4dc52245bd8f67 |
|
05-Feb-2011 |
Greg Clayton <gclayton@apple.com> |
Fixed an excessive ctor issue. Patch from Kirk Beitz / Jai Menon. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124928 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.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/IRForTarget.cpp
|
97c924e1ff142ea29a2f7b41cbcdcb0082b76959 |
|
27-Jan-2011 |
Sean Callanan <scallanan@apple.com> |
Added error reporting to IRForTarget so that the user doesn't have to enable logging to see where something went wrong. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124342 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
237e47483b9a864fee7da5e2685aea06bc0748b7 |
|
21-Jan-2011 |
Sean Callanan <scallanan@apple.com> |
Added a safeguard to ensure that the user does not create variables that override persistent result variables. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@124001 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
c7674af9458fbad6f07fa73609c354abf93af2dc |
|
18-Jan-2011 |
Sean Callanan <scallanan@apple.com> |
Added support for the fragile ivars provided by Apple's Objective-C 2.0 runtime. They are enabled if the Objective-C runtime has the proper version. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123694 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
97678d17ac9bcb66f7092178109271991ab16533 |
|
13-Jan-2011 |
Sean Callanan <scallanan@apple.com> |
Fixed handling of explicitly-declared persistent variables. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@123398 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.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/IRForTarget.cpp
|
05a5a1bcbed5c0f31fed29153bb2912d71836e91 |
|
16-Dec-2010 |
Sean Callanan <scallanan@apple.com> |
Implemented a feature where the expression parser can avoid running the code in the target if the expression's result is known and the expression has no side effects. Right now this feature is quite conservative in its guess about side effects, and it only computes integer results, but the machinery to make it more sophisticated is there. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121952 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.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/IRForTarget.cpp
|
c4217a663232c014ee054f55bd90ece79803c963 |
|
07-Dec-2010 |
Sean Callanan <scallanan@apple.com> |
Fixes to make id work as well as well as fix minor errors when calling built-ins. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121070 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
b9f09a6188dc2b48bf7f5677bc1eef9a73c3fa25 |
|
06-Dec-2010 |
Sean Callanan <scallanan@apple.com> |
Fixed a bug in which the SEL type was being resolved wrongly as the target of a pointer rather than the SEL pointer itself. This caused incorrect behavior when dealing with Objective-C selector variables. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@121048 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
7cd4674d027ed726eb8830b455e95249846b7899 |
|
06-Dec-2010 |
Sean Callanan <scallanan@apple.com> |
Fixed a problem in which non-external variables (for example, string literals) were being flagged erroneously as undefined external variables. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@120972 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
f921cf530ecb96381c93a34c313e4967a6e79834 |
|
03-Dec-2010 |
Sean Callanan <scallanan@apple.com> |
Eliminated a redundant code path. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@120834 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
f3143b7faf3f934282859b62575537366565a0ee |
|
03-Dec-2010 |
Sean Callanan <scallanan@apple.com> |
Removed a compiler warning. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@120788 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
4844365bea9261f6afe24508d413d80ea2400abd |
|
02-Dec-2010 |
Sean Callanan <scallanan@apple.com> |
Fixed IRForTarget so that it errors out when function pointers are used. Previously, they caused a crash in the JIT because we didn't resolve them correctly. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@120728 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
65e2aeef29f572ead90029e21b5bc3fec5c01afe |
|
20-Nov-2010 |
Sean Callanan <scallanan@apple.com> |
Removed a stray dump(). git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@119888 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
3c7feb44971e0adf121c9b72a4eb5eb2896fe66d |
|
19-Nov-2010 |
Greg Clayton <gclayton@apple.com> |
Added some logging back and cleaned up the code to match LLDB's coding conventions. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@119771 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
ae71e30fe0c0e0d5fd1bf9062274798060df674c |
|
18-Nov-2010 |
Sean Callanan <scallanan@apple.com> |
Fixed the logic in IRForTarget that recognizes externally-defined variables to match up with the code in ClangASTSource that produces them. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@119750 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
6ba533e0b2220b2aac92d10f94d3cecedb199763 |
|
18-Nov-2010 |
Sean Callanan <scallanan@apple.com> |
Added support for constant strings of the form @"this-is-a-string". They are replaced with calls to the CoreFoundation function CFStringCreateWithBytes() by a portion of the IRForTarget pass. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@119582 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
b5037af312160b2f396aad579e45619af3126e4a |
|
15-Nov-2010 |
Greg Clayton <gclayton@apple.com> |
Added quotes around names that are being lookup up or inspected in the expression logging. Added some properties to the "objc" test. The expression parser can currently display properties that are backed by the default functions "expr myStr.string" will work. But it won't currently work when the property is backed by a different function such as "expr myStr.date". git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@119103 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
1d1b39c93c64294ae1c6e5cfe6de584716c284bc |
|
08-Nov-2010 |
Sean Callanan <scallanan@apple.com> |
Made variable resolution more robust by handling every external variable reference in the module, and returning a clean error (instead of letting LLVM issue a fatal error) if the variable could not be resolved. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118388 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.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/IRForTarget.cpp
|
58a4034d931f470823ecffe64d4dc7324b9a9882 |
|
06-Nov-2010 |
Sean Callanan <scallanan@apple.com> |
Fixed a bug where variables in the source operands of store statements were not being marked for resolution. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118316 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
b51ee98581de0c271f9fcea7585c3ea3bbbbbb80 |
|
03-Nov-2010 |
Sean Callanan <scallanan@apple.com> |
Fixed a bug where we left a definition hanging for a global variable that we had replaced with a reference to a slot in the input array. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@118123 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
c2c6f7781b6721e73ccf5ed842d00906ae27f191 |
|
26-Oct-2010 |
Sean Callanan <scallanan@apple.com> |
Fixed a problem where function calls on i386 weren't being generated correctly. Also added a messy way to single-step through expressions that I will improve soon. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117342 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
03c997b4fa17e4e8350637454f9404dbbd13b8c4 |
|
22-Oct-2010 |
Sean Callanan <scallanan@apple.com> |
Fixed IRForTarget to not recognize $__lldb variables as persistent variables. These are special markers used by LLDB. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@117078 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.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/IRForTarget.cpp
|
dc27aba0bdf7c2aa4f59374d4b612bf84bfe70c8 |
|
06-Oct-2010 |
Sean Callanan <scallanan@apple.com> |
Added handling for external variables in function arguments to the expression parser. This means that structs can be returned from the "expr" command. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115698 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
771131d04344e57abb340699f54dce77a511bc71 |
|
30-Sep-2010 |
Sean Callanan <scallanan@apple.com> |
Switched the expression parser from using TargetData to using Clang to get type sizes. This fixes a bug where the type size for a double[2] was being wrongly reported as 8 instead of 16 bytes, causing problems for IRForTarget. Also improved logging so that the next bug in this area will be easier to find. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115208 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
3cb1fd8920248072952345260e6f5c5679cb2c86 |
|
29-Sep-2010 |
Sean Callanan <scallanan@apple.com> |
Removed a dreadful hack to get at the name of the intrinsic being used. Thanks to Chris Lattner for pointing out the proper way to do it. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115006 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
c04743d68391ae090e6ebada32b6fb87cdc03d30 |
|
28-Sep-2010 |
Sean Callanan <scallanan@apple.com> |
Fixed two bugs in the expression parser: - the guard variable for the static result variable was being mistaken for the actual result value, causing IRForTarget to fail - LLVM builtins like memcpy were not being properly resolved; now they are resolved to the corresponding function in the target git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114990 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.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/IRForTarget.cpp
|
3c9c5eb466869ede185e879d14a47335fb43194d |
|
21-Sep-2010 |
Sean Callanan <scallanan@apple.com> |
Removed the hacky "#define this ___clang_this" handler for C++ classes. Replaced it with a less hacky approach: - If an expression is defined in the context of a method of class A, then that expression is wrapped as ___clang_class::___clang_expr(void*) { ... } instead of ___clang_expr(void*) { ... }. - ___clang_class is resolved as the type of the target of the "this" pointer in the method the expression is defined in. - When reporting the type of ___clang_class, a method with the signature ___clang_expr(void*) is added to that class, so that Clang doesn't complain about a method being defined without a corresponding declaration. - Whenever the expression gets called, "this" gets looked up, type-checked, and then passed in as the first argument. This required the following changes: - The ABIs were changed to support passing of the "this" pointer as part of trivial calls. - ThreadPlanCallFunction and ClangFunction were changed to support passing of an optional "this" pointer. - ClangUserExpression was extended to perform the wrapping described above. - ClangASTSource was changed to revert the changes required by the hack. - ClangExpressionParser, IRForTarget, and ClangExpressionDeclMap were changed to handle different manglings of ___clang_expr flexibly. This meant no longer searching for a function called ___clang_expr, but rather looking for a function whose name *contains* ___clang_expr. - ClangExpressionParser and ClangExpressionDeclMap now remember whether "this" is required, and know how to look it up as necessary. A few inheritance bugs remain, and I'm trying to resolve these. But it is now possible to use "this" as well as refer implicitly to member variables, when in the proper context. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114384 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.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/IRForTarget.cpp
|
65af734ce9ebc0597c9c3ccdd270023546ffaef3 |
|
08-Sep-2010 |
Sean Callanan <scallanan@apple.com> |
Fixed an expression parser bug that prevented certain functions from being resolved correctly. Some functions (particularly varargs functions) are BitCast before being called, and the problem was that a CallInst where getCalledValue() returned a BitCast ConstantExpr was not being relocated at all. This problem should now be resolved for the case of BitCast. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113396 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
2e2db5334f535faa440eb4c6c700b80abf3f99fb |
|
08-Sep-2010 |
Sean Callanan <scallanan@apple.com> |
Fixed a bug where we did not handle constant expressions correctly. These produced a result variable with an initializer but no store instruction, and the store instruction was as a result never rewritten to become a store to a persistent variable. Now if the result variable has an initializer but is never used, we generate a (redundant) store instruction for it, which is then later rewritten into a (useful) store to the persistent result variable. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113300 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
92aa666e66798e8d72d873d48da2b3f92e94c450 |
|
07-Sep-2010 |
Sean Callanan <scallanan@apple.com> |
Improved function lookup to avoid conflicts between symbols with the same name and no debug information. Also improved the way functions are called so we don't automatically define them as variadic functions in the IR. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@113290 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
45690fe3b8b4efb101dd31085413381021a69c2f |
|
31-Aug-2010 |
Sean Callanan <scallanan@apple.com> |
Fixed a bug where the parser-specific members of persistent variables were staying around too long. This caused the following problem: - A persistent result variable is created for the result of an expression. The pointer to the corresponding Decl is stored in the variable. - The persistent variable is looked up during struct generation (correctly) using its Decl. - Another expression defines a new result variable which happens to have a Decl in the same place as the original result variable. - The persistent variable is looked up during struct generation using its Decl, but the old result variable appears first in the list and has the same Decl pointer. The fix is to destroy parser-specific data when it is no longer valid. Also improved some logging as I diagnosed the bug. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@112540 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.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/IRForTarget.cpp
|
8c12720c108cd5e7ed792596749218d8400f647e |
|
24-Aug-2010 |
Sean Callanan <scallanan@apple.com> |
Refactored ClangExpressionDeclMap to use ClangExpressionVariables for found external variables as well as for struct members, replacing the Tuple and StructMember data structures. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@111859 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.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/IRForTarget.cpp
|
3351dacda090c21c203d2300f38e2f45d8f78f4d |
|
18-Aug-2010 |
Sean Callanan <scallanan@apple.com> |
Patch by Bill Lynch fixing handling of the pid in the IR transformation passes. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@111388 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
a386e05ea6d20cdcedc80c23cf771d5030db43d6 |
|
14-Aug-2010 |
Sean Callanan <scallanan@apple.com> |
Added documentation to ClangExpressionDeclMap. Also cleaned up its API a tiny bit (but not the extensive amount that is actually needed. That's still coming.) git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@111049 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.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/IRForTarget.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/IRForTarget.cpp
|
93a4b1a8d6ad9a5d1e18a38b5ec55de5b7f6e724 |
|
04-Aug-2010 |
Sean Callanan <scallanan@apple.com> |
Added support for accessing members of C++ objects, 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. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@110174 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
bc2928a7a6b973327bf10f153c3c0479bc11e4c5 |
|
03-Aug-2010 |
Sean Callanan <scallanan@apple.com> |
Set a CodeGenOption in Clang to inhibit insertion of profiling code into expressions. Modified IRForTarget to emit array and record member accesses correctly. (Reading and writing both work.) git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@110088 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
f5857a002d1e0c5fe29b8af9f9e2fe4fac0298d8 |
|
31-Jul-2010 |
Sean Callanan <scallanan@apple.com> |
Added support for rewriting objc_msgSend so we can 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. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109938 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
6e71340988075f55c85e8bfcbc503ceaceb157c7 |
|
30-Jul-2010 |
Greg Clayton <gclayton@apple.com> |
Updated to llvm/clang from July 30, 2010 at 08:00. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109887 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
321fe9e06c68dfeed55839d71603713b1ea3bb70 |
|
28-Jul-2010 |
Sean Callanan <scallanan@apple.com> |
Added and improved logging. This is helping us as we diagnose a problem where we're not correctly emitting PIC code. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109568 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
02fbafa1bf2bb77bf8f25af3403d7d8721a3f8b1 |
|
27-Jul-2010 |
Sean Callanan <scallanan@apple.com> |
Added support for calling functions from expressions. 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. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109543 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
ba992c58b25ec0a67ef430024dc3dca154982dc9 |
|
27-Jul-2010 |
Sean Callanan <scallanan@apple.com> |
Added support for locating a function that is referenced in the IR. We don't yet support updating the call to that function. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109483 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
b5b749c1d13458b170a7e0e00e7bf0d7da37defa |
|
27-Jul-2010 |
Sean Callanan <scallanan@apple.com> |
Fixed a bug in the IR transformer where we were trying to do replaceUsesOfWith on a constant, which doesn't work. Turns out we don't need to do anything for constants. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109477 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
45839276c3de51a55adef98a2a20a98f2ba428a9 |
|
24-Jul-2010 |
Sean Callanan <scallanan@apple.com> |
Updated the IR converter for the target to eliminate 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. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@109317 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
f328c9ffe0bb00f48601027ec86dbdf238b42c2a |
|
21-Jul-2010 |
Sean Callanan <scallanan@apple.com> |
Added functionality to dematerialize values that were 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. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@108965 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
810f22d18ca8f9d31f49d79bb4b51a9f2fd96dea |
|
16-Jul-2010 |
Sean Callanan <scallanan@apple.com> |
Wrote the code that looks at a context to see if the variables in that context allow a particular JIT compiled expression to run in that context. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@108485 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
bafd685bcd5efa19f4f01254db1282fbb7541ac7 |
|
15-Jul-2010 |
Sean Callanan <scallanan@apple.com> |
Fixes to the IR generator in the expression parser to correctly unfold constant-folded global variables. Also added code to JIT the expression. Simple expressions are now JIT compiled successfully. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@108380 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
193e6d5b143d500122f66a6b5b756564a8fab59e |
|
14-Jul-2010 |
Greg Clayton <gclayton@apple.com> |
Removed unused variable "log". Fixed the llvm build for Mac OS X builds to look in llvm/lib/Release+Asserts output directory for all configurations (Debug, Release, BuildAndIntegration). git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@108289 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
8bce665569ea08dd43d9ff21e23f14ebbc191d12 |
|
13-Jul-2010 |
Sean Callanan <scallanan@apple.com> |
"expr -i" now performs the required transforms to prepare the IR for JIT compilation. We still need to do the JIT compilation and move the arguments in/out of target memory. git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@108279 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|
5cf4a1ca412654c3f912e2b3cea931fb814f322f |
|
03-Jul-2010 |
Sean Callanan <scallanan@apple.com> |
Added the skeleton of an IR transformer that will prepare IR for execution in the target. Wired the expression command to use this IR transformer when conversion to DWARF fails, and wired conversion to DWARF to always fail (well, we don't generate any DWARF...) git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@107559 91177308-0d34-0410-b5e6-96231b3b80d8
/external/lldb/source/Expression/IRForTarget.cpp
|