- Apr 19, 2013
-
-
Sean Callanan authored
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. llvm-svn: 179801
-
Greg Clayton authored
llvm-svn: 179799
-
- Apr 18, 2013
-
-
Greg Clayton authored
llvm-svn: 179796
-
Filipe Cabecinhas authored
llvm-svn: 179795
-
rdar://problem/13627061Greg Clayton authored
Fixed an issue where "platform process list" help message has options displayed a couple dozen times. llvm-svn: 179792
-
rdar://problem/13678882Greg Clayton authored
Disable "source info" until actually implemented. llvm-svn: 179787
-
Greg Clayton authored
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. llvm-svn: 179779
-
Greg Clayton authored
Re-enable m_private_run_lock changes from 179329, but only for Apple hosted builds so it doesn't break the buildbots. We will try and work the issues out in the Apple build before enabling this feature for everyone. llvm-svn: 179772
-
Ashok Thirumurthi authored
in order to prevent consistent hangs on all 3 LLDB buildbots. llvm-svn: 179759
-
Greg Clayton authored
Fixed a few m_private_run_lock issues when attaching and also fixed the process to not try to restart the process if the process is exited, crashed or detached. Partial patch from Carlo Kok. llvm-svn: 179738
-
- Apr 17, 2013
-
-
Ashok Thirumurthi authored
- Specify SC_Static given DIE attributes for static methods and operators. Thanks to Wei Pan for his review and the help with root-causing. llvm-svn: 179727
-
Daniel Malea authored
- add a workaround header to define uuid_t on platforms that need it - unbreak remote debugging of mac os x apps llvm-svn: 179710
-
Daniel Malea authored
- will commit a different workaround momentarily llvm-svn: 179705
-
Sean Callanan authored
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. llvm-svn: 179704
-
Sean Callanan authored
it doesn't actually hold any important state. llvm-svn: 179702
-
Sean Callanan authored
a ClangExpressionDeclMap. Any functions that require value resolution etc. fail if the ClangExpressionDeclMap isn't present - which is exactly what is desired. llvm-svn: 179695
-
Daniel Malea authored
- conditionally build mac-specific plugins only on mac (PluginObjectFileMachO, PluginDynamicLoaderDrawinKernel and PluginDynamicLoaderMacOSXDYLD) - clean up warnings by ignoring deprecated declarations (auto_ptr for example) llvm-svn: 179694
-
Sean Callanan authored
is entirely unnecessary and confuses the command interpreter when the user types "exp". llvm-svn: 179691
-
Sean Callanan authored
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). llvm-svn: 179675
-
Sean Callanan authored
It doesn't use it yet; the next step is to make it use the IRMemoryMap instead of its own conjured-up Memory class. llvm-svn: 179650
-
Sean Callanan authored
Materializer for all expressions that need to run in the target. This includes the following changes: - Removed a bunch of (de-)materialization code from ClangExpressionDeclMap and assumed the presence of a Materializer where we previously had a fallback. - Ensured that an IRMemoryMap is passed into ClangExpressionDeclMap::Materialize(). - Fixed object ownership on LLVMContext; it is now owned by the IRExecutionUnit, since the Module and the ExecutionEngine both depend on its existence. - Fixed a few bugs in IRMemoryMap and the Materializer that showed up during testing. llvm-svn: 179649
-
Jason Molenda authored
llvm-svn: 179643
-
Jim Ingham authored
ShouldStop on the threads, which might destroy information needed to correctly compute another thread's StopInfo. <rdar://problem/13664026> llvm-svn: 179641
-
- Apr 16, 2013
-
-
Jason Molenda authored
differs from lldb's own shared cache, and where the inferior process shared cache does not match up with the on-disk shared cache file. Simplify the code where lldb gets its own shared cache uuid a little bit. llvm-svn: 179633
-
Greg Clayton authored
llvm-svn: 179623
-
rdar://problem/13657900Greg Clayton authored
Special handling for file descriptor connections that are tty files. llvm-svn: 179613
-
rdar://problem/13468295Greg Clayton authored
Show an error message when we have a corrupt mach-o file where the LC_SEGMENT or LC_SEGMENT_64 load command have file offsets or file offsets + sizes that extend beyond the end of the file. llvm-svn: 179605
-
Jason Molenda authored
DynamicLoaderMacOSXDYLD::ReadAllImageInfosStructure for version 13 of that structure. llvm-svn: 179584
-
Jason Molenda authored
a UUID for the shared cache libraries that can be used to confirm that one process' shared cache is the same as another, or that a process' in-memory shared cache is a match for a given on-disk dyld_shared_cache binary file. Use these UUIDs to catch some uncommon problems when the shared caches are being changed for debug purposes. <rdar://problem/13524467> llvm-svn: 179583
-
Jason Molenda authored
No code changes in this checkin, only whitespace. llvm-svn: 179579
-
Andrew Kaylor authored
llvm-svn: 179577
-
Sean Callanan authored
to make debugging easier when things go wrong. llvm-svn: 179576
-
- Apr 15, 2013
-
-
Sean Callanan authored
- If an allocation is mirrored between the host and the process, update the host's version before returning a DataExtractor pointing to it. - If anyone attempts to access memory in a process/target that does not have a corresponding allocation, try accessing the memory directly before erroring out. llvm-svn: 179561
-
Sean Callanan authored
Also improved logging and error handling in a few spots in the Materializer. llvm-svn: 179557
-
Sean Callanan authored
that it works in the absence of a process. Codepaths in the Materializer now use the best execution context scope available to them. llvm-svn: 179539
-
- Apr 14, 2013
-
-
Greg Clayton authored
- Do not add symbols with no names - Make sure that symbols from ELF symbol tables know that the byte size is correct. Previously the symbols would calculate their sizes by looking for the next symbol and take symbols that had zero size and make them have invalid sizes. - Added the ability to dump raw ELF symbols by adding a Dump method to ELFSymbol Also removed some unused code from lldb_private::Symtab. llvm-svn: 179466
-
- Apr 13, 2013
-
-
Sean Callanan authored
Materializer. llvm-svn: 179445
-
Sean Callanan authored
Materializer use that API when dematerializing variables. llvm-svn: 179443
-
Sean Callanan authored
lets a ValueObject's contents be set from raw data. This has certain limitations (notably, registers can only be set to data that is as large as the register) but will be useful for the new Materializer. I also exposed this interface through SBValue. I have added a testcase that exercises various special cases of SBValue::SetData(). llvm-svn: 179437
-
Jason Molenda authored
defines a Return Address register (e.g. lr on arm) but the RA register hasn't been saved anywhere yet -- it is still in a live reg. <rdar://problem/13503130> llvm-svn: 179431
-