summaryrefslogtreecommitdiffstats
path: root/lldb
Commit message (Collapse)AuthorAgeFilesLines
* Disabling test in TestClassTemplateParameterPack.py until we do template ↵Shafik Yaghmour2019-05-012-7/+9
| | | | | | | | | | | | | lookup correctly Summary: Some tests currently only work because we are pulling all the local variables when we are evaluating an expression. This will soon change and these test are working but for the wrong reasons. The details can be found in the discussion here: http://lists.llvm.org/pipermail/lldb-commits/Week-of-Mon-20180507/040689.html Differential Review: https://reviews.llvm.org/D61266 llvm-svn: 359699
* [lldb] [lit] Add write tests for r8-r15 & xmm8-xmm15 registersMichal Gorny2019-05-012-0/+114
| | | | | | Differential Revision: https://reviews.llvm.org/D61303 llvm-svn: 359682
* [lldb] [lit] Add write tests for MM/XMM registersMichal Gorny2019-05-012-0/+114
| | | | | | Differential Revision: https://reviews.llvm.org/D61303 llvm-svn: 359681
* Fix build URL in new LLDB websiteRaphael Isemann2019-05-011-1/+1
| | | | | | | | | | | | | | | | | | | Summary: After the LLDB website was migrated to be generated by Sphinx the build.html file lives in another location. See http://lists.llvm.org/pipermail/lldb-dev/2019-April/014992.html. Reviewers: teemperor Reviewed By: teemperor Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D61368 llvm-svn: 359665
* Removed unnecessary conversion to StringRefRaphael Isemann2019-05-011-3/+1
| | | | llvm-svn: 359664
* [CMake] Correct lldbPluginProcessPOSIX dependenciesAlex Langford2019-05-011-1/+1
| | | | | | | This plugin does not depend on lldbInterpreter. It only depends on lldbUtility. llvm-svn: 359645
* Add CxxModuleHandler to Xcode projectJonas Devlieghere2019-04-301-0/+6
| | | | llvm-svn: 359593
* Sort Symbol/CMakeLists.txtJonas Devlieghere2019-04-301-5/+5
| | | | | | This makes resolving merge conflicts downstream a tad easier. llvm-svn: 359577
* XFAIL x86-64-zmm-read on DarwinJonas Devlieghere2019-04-301-0/+1
| | | | llvm-svn: 359575
* Un-xfail the TestMiniDump tests on WindowsStella Stamenova2019-04-301-2/+0
| | | | | | After Aaron's commit for ObjectFilePECOFF:: GetUUID, the tests are now passing llvm-svn: 359573
* [lldb] [Process/NetBSD] Fix handling piod_len from PT_IO callsMichal Gorny2019-04-301-4/+4
| | | | | | | | | | | | | | | | | | | | | | Fix bugs in piod_len return value processing in ReadMemory() and WriteMemory() methods. In particular, add support for piod_len == 0 indicating EOF, and fix summing bytes_read/bytes_written when PT_IO does partial reads/writes. The EOF condition could happen if LLDB attempts to read past vm.maxaddress, e.g. as a result of RBP containing large (invalid) value. Previously, the 0 return caused the function to retry reading via PT_IO indefinitely, effectively deadlooping lldb-server. Partial reads probably did not occur in practice, yet they would cause ReadMemory() to return incorrect bytes_read and/or overwrite previously read data. WriteMemory() suffered from analoguous problems. Differential Revision: https://reviews.llvm.org/D61310 llvm-svn: 359572
* PostfixExpression: Introduce InitialValueNodePavel Labath2019-04-303-3/+61
| | | | | | | | | | | | | | | | | | | | | | | Summary: This node represents can be used to refer to the initial value, which is sometimes pushed onto the DWARF stack as the "input" to the DWARF expression. The typical use case (and the reason why I'm introducing it) is that the "Canonical Frame Address" is passed this way to the DWARF expressions computing the values of registers during frame unwind. The nodes are converted into dwarf by keeping track of DWARF stack depth an any given point, and then copying the initial value from the bottom of the stack via the DW_OP_pick opcode. This could be made more efficient for simple expressions, but here I chose to start with the most general implementation possible. Reviewers: amccarth, clayborg, aleksandr.urakov Subscribers: aprantl, jasonmolenda, lldb-commits, markmentovai Differential Revision: https://reviews.llvm.org/D61183 llvm-svn: 359560
* Sort containers alphabetically in CxxModuleHandler [NFC]Raphael Isemann2019-04-301-3/+3
| | | | llvm-svn: 359546
* Instantiate 'std' templates explicitly in the expression evaluatorRaphael Isemann2019-04-3058-1/+1244
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch is a follow-up for D58125. It implements the manual instantiation and merging of 'std' templates like `std::vector` and `std::shared_ptr` with information from the debug info AST. This (finally) allows using these classes in the expression evaluator like every other class (i.e. things like `vec.size()` and shared_ptr debugging now works, yay!). The main logic is the `CxxModuleHandler` which intercept the ASTImporter import process and replaces any `std` decls by decls from the C++ module. The decls from the C++ module are "imported" by just deserializing them directly in the expression evaluation context. This is mostly because we don't want to rely on the ASTImporter to correctly import these declarations, but in the future we should also move to the ASTImporter for that. This patch doesn't contain the automatic desugaring for result variables. This means that if you call for example `size` of `std::vector` you maybe get some very verbose typedef'd type as the variable type, e.g. `std::vector<int, std::allocator<int>>::value_type`. This is not only unreadable, it also means that our ASTImporter has to import all these types and associated decls into the persisent variable context. This currently usually leads to some assertion getting triggered in Clang when the ASTImporter either makes a mistake during importing or our debug info AST is inconsitent. The current workaround I use in the tests is to just cast the result to it's actual type (e.g. `size_t` or `int`) to prevent the ASTImporter from having to handle all these complicated decls. The automatic desugaring will be a future patch because I'm not happy yet with the current code for that and because I anticipate that this will be a controversial patch. Reviewers: aprantl, shafik, jingham, martong, serge-sans-paille Reviewed By: martong Subscribers: balazske, rnkovacs, mgorny, mgrang, abidh, jdoerfert, lldb-commits Tags: #c_modules_in_lldb, #lldb Differential Revision: https://reviews.llvm.org/D59537 llvm-svn: 359538
* [PECOFF] Implementation of ObjectFilePECOFF:: GetUUID()Aaron Smith2019-04-304-32/+194
| | | | | | | | | | | | | | | | | | | Summary: Provide an implementation of GetUUID() for remote debugging scenarios. Return a PDB's GUID (or PDB70's Signature) as the UUID. Reviewers: amccarth, labath Reviewed By: labath Subscribers: amccarth, clayborg, Hui, labath, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D56229 llvm-svn: 359528
* [lit] Check for the psutil module when setting a timeoutJonas Devlieghere2019-04-291-2/+8
| | | | | | | | Apparently setting the per-test-timeout and not having the psutil package constitutes to a fatal error. So only set the timeout when the module is available. llvm-svn: 359503
* [lit] Fix the timeout.Jonas Devlieghere2019-04-292-1/+3
| | | | | | | | The timeout wasn't working because it's a property of the lit configuration, not of the configuration in lit.site.cfg. This sets the property for the correct object. llvm-svn: 359492
* [CMake] Fix subtle CMake bugAlex Langford2019-04-294-6/+6
| | | | | | | | CMake specifies that the DEPENDS field of add_custom_target is for files and output of add_custom_command. In order to add a target dependency, add_dependencies should be used. llvm-svn: 359490
* [test] Disable x86-64-gp-write on DarwinJonas Devlieghere2019-04-291-0/+1
| | | | llvm-svn: 359487
* Fix a stack-smasher in PlatformMacOSX::GetSDKDirectory()Adrian Prantl2019-04-291-1/+1
| | | | | | | | | GetSDKVersion expects the number of version fields not their byte size and will happily overwrite later contents of the stack. Differential Revision: https://reviews.llvm.org/D61218 llvm-svn: 359471
* [Docs] Generate the python reference without building all of LLDBJonas Devlieghere2019-04-292-22/+37
| | | | | | | | | | | | As discussed on the mailing list, we should be able to generate the Python reference without building all of LLDB. To make that possible I create a dummy python package, which is then parsed by epydoc. The latter will complain that it couldn't import lldb, but that doesn't matter as far as generation of the docs is concerned. Differential revision: https://reviews.llvm.org/D61216 llvm-svn: 359465
* Remove XFAIL: windows from x86-64-gp-write.testPavel Labath2019-04-291-1/+0
| | | | | | The typo fix in r359451 was enough to get it passing there. llvm-svn: 359456
* @skipIfLinux another batch of flaky lldb-mi testsPavel Labath2019-04-292-1/+3
| | | | llvm-svn: 359452
* Fix a typo in x86-64-gp-write.testPavel Labath2019-04-291-1/+1
| | | | | | The test was building the wrong inferior, causing failures. llvm-svn: 359451
* Remove obsoleted NativePDB testsPavel Labath2019-04-291-26/+0
| | | | | | | | Their functionality overlaps with the newly introduced PostfixExpressionTests (r359288). Tests, which still exercise some pdb-related functionality (register name resolution) have been kept. llvm-svn: 359450
* Editline: Fix an msan errorPavel Labath2019-04-291-3/+7
| | | | | | | | | | | | | | | | | | | | Summary: libedit implementation of el_get(EL_GETTC) had a bug, where it was consuming vararg arguments until reaching the first null pointer (and not just two, as documented). This was causing (at least) errors to be reported when running the tests under msan. The issue has since been fixed in libedit, but this adds patch adds a trivial workaround, so that we operate correctly with the libedit versions which are already out there. Reviewers: christos, krytarowski, davide Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D61191 llvm-svn: 359449
* [lldb] [lit] Introduce tests for writing x86 general-purpose registersMichal Gorny2019-04-294-0/+168
| | | | | | | | | | | Introduce two initial tests for 'register write' command. The tests first clobber x86 general purpose registers, then call int3 to let lldb write to them, then print the new values. FileCheck takes care of verifying whether correct values were written. Differential Revision: https://reviews.llvm.org/D61221 llvm-svn: 359441
* [lldb] [test] Remove duplicate YMM/ZMM dotest testsMichal Gorny2019-04-294-354/+0
| | | | llvm-svn: 359440
* [lldb] [lit] Add tests for reading ZMM registers (AVX512)Michal Gorny2019-04-294-0/+344
| | | | | | Differential Revision: https://reviews.llvm.org/D61212 llvm-svn: 359439
* [lldb] [lit] Introduce tests for reading x86 general purpose registersMichal Gorny2019-04-294-0/+156
| | | | | | | | | | | | | | Introduce tests for reading the eight x86 general purpose registers, i.e. RAX/RBX/RCX/RDX/RBP/RSP/RSI/RDI and their shorter counterparts. The test comes in separate 32-bit and 64-bit variant, targeting appropriate processors. While technically the 32-bit test could run on amd64, it would be redundant to the 64-bit version, so just run one of them on each arch. Differential Revision: https://reviews.llvm.org/D61210 llvm-svn: 359438
* DWARFExpression: Fix implementation of DW_OP_pickPavel Labath2019-04-295-1/+54
| | | | | | | | | | | | | | | | | | | | | | Summary: The DWARF spec states that the DWARF stack arguments are numbered from the top. Our implementation of DW_OP_pick was counting them from the bottom. This bug probably wasn't noticed because nobody (except my upcoming postfix-to-DWARF converter) uses DW_OP_pick, but I've cross-checked with gdb to confirm that counting from the top is the expected behavior. This patch fixes the implementation to match the spec and gdb behavior and adds a test. Reviewers: jasonmolenda, clayborg Subscribers: mgorny, aprantl, lldb-commits Differential Revision: https://reviews.llvm.org/D61182 llvm-svn: 359436
* [Windows] Dump more information about access violation exceptionAleksandr Urakov2019-04-294-1/+110
| | | | | | | | | | | | | | | | | | | | Summary: Dump more information about "access violation" and "in page error" exceptions to description. Description now contains data about read/write violation type and actual address as described at https://docs.microsoft.com/en-us/windows/desktop/api/winnt/ns-winnt-_exception_record Reviewers: asmith, stella.stamenova Reviewed By: stella.stamenova Subscribers: teemperor, amccarth, abidh, lldb-commits, aleksandr.urakov Tags: #lldb Differential Revision: https://reviews.llvm.org/D60519 llvm-svn: 359420
* Fix UNPREDICTABLE check in EmulateInstructionARM::EmulateADDRegShiftRaphael Isemann2019-04-271-1/+1
| | | | | | | | | | | | | | | | | | | Summary: As reported in LLVM bug 41487, the check in this function is wrong and should be the same as the described check in the comment (which is correctly copied from the ARM ISA reference). Reviewers: #lldb, davide, JDevlieghere Reviewed By: #lldb, davide, JDevlieghere Subscribers: davide, javed.absar, kristof.beyls, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D60654 llvm-svn: 359387
* [lldb] [lit] Cleanly terminate Register testsMichal Gorny2019-04-274-0/+12
| | | | | | | Continue the Register test processes, and let them terminate cleanly rather than implicitly terminating them along with lldb. llvm-svn: 359375
* [CommandObject] Use GetDebugger() helper method (NFC)Jonas Devlieghere2019-04-2718-131/+116
| | | | | | | | | | In r359354 a GetDebugger() method was added to the CommandObject class, so that we didn't have to go through the command interpreter to obtain the script interpreter. This patch simplifies other call sites where m_interpreter.GetDebugger() was used, and replaces them with a shorter call to the new method. llvm-svn: 359373
* [FormatEntity] Remove unused format type (NFC)Jonas Devlieghere2019-04-272-102/+84
| | | | | | | The FormatType enum and corresponding field are unused. This patch removes the type, field and simplifies the macros that initialize them. llvm-svn: 359372
* [Driver] Remove unused functions (NFC)Jonas Devlieghere2019-04-262-53/+27
| | | | | | | | Remove unused from the driver class. I noticed a bunch of small thing while doing this that didn't warrant separate commits, so I've lumped them together into this patch. llvm-svn: 359355
* [ScriptInterpreter] Move ownership into debugger (NFC)Jonas Devlieghere2019-04-2629-104/+76
| | | | | | | | | | | | | | This is part two of the change started in r359330. This patch moves the ownership of the script interpreter from the command interpreter into the debugger. I would've preferred to remove the lazy initialization, however the fact that the scripting language is set after the debugger is created makes that tricky. So for now this does exactly the same thing as when it was under the command interpreter. The result is that this patch is fully NFC. Differential revision: https://reviews.llvm.org/D61211 llvm-svn: 359354
* Pass explicit C++ version to testFrederic Riss2019-04-261-1/+1
| | | | | | | | stop-hook-threads.cpp uses C++11 features, so ask for C++11 explicitely. This isn't broken on mainstream because clang defaults to a newer C++ version now, but it breaks if testing against an older compiler. llvm-svn: 359349
* TestZMMRegister: use an integer division as intendedFrederic Riss2019-04-261-2/+2
| | | | llvm-svn: 359347
* [CommandInterpreter] Remove scripting language argument. (NFC)Jonas Devlieghere2019-04-263-8/+3
| | | | | | | | | | The script language argument was passed from the debugger to the command interpreter, only to call SetScriptLanguage on the debugger again. It wasn't even used to initialize the script interpreter, because that would query the debugger again. This patch removes the needless back and forth. llvm-svn: 359346
* [ScriptInterpreter] Pass the debugger instead of the command interpreterJonas Devlieghere2019-04-2611-64/+50
| | | | | | | | | | | | | | | | As discussed in D61090, there's no good reason for the script interpreter to depend on the command interpreter. When looking at the code, it becomes clear that we mostly use the command interpreter as a way to access the debugger. Hence, it makes more sense to just pass that to the script interpreter directly. This is part 1 out of 2. I have another patch in the pipeline that changes the ownership of the script interpreter to the debugger as well, but I didn't get around to finish that today. Differential revision: https://reviews.llvm.org/D61172 llvm-svn: 359330
* Replace local utility class OnExit with llvm::scope_exit (NFC)Tatyana Krasnukha2019-04-261-17/+4
| | | | llvm-svn: 359319
* [lldb] [lit] Add register read tests for YMM registers (AVX)Michal Gorny2019-04-264-0/+145
| | | | | | Differential Revision: https://reviews.llvm.org/D61074 llvm-svn: 359304
* [lldb] [lit] Add feature flags for native CPU featuresMichal Gorny2019-04-266-1/+55
| | | | | | | | | | | | Add a new lit-cpuid tool that detects CPU features used by some of the tests, and use it to populate available_features in lit. For now, this means that the test for MM/XMM register read will be run only when the host CPU support SSE instruction set. However, this is going to make it possible to introduce additional tests relying on AVX. Differential Revision: https://reviews.llvm.org/D61073 llvm-svn: 359303
* PostfixExpression: move DWARF generator out of NativePDB internalsPavel Labath2019-04-264-183/+209
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: The new dwarf generator is pretty much a verbatim copy of the one in PDB. In order to write a pdb-independent test for it, I needed to write a dummy "symbol resolver", which (together with the fact that I'll need one more for breakpad-specific resolution logic) prompted me to create a more simple interface for algorithms which replace or "resolve" SymbolNodes. The resolving algorithms in NativePDB have been updated to make use of that too. I have removed a couple of NativePDB tests which weren't testing anything pdb-specific and where the tested functionality was covered by the new format-agnostic tests I have added. Reviewers: amccarth, clayborg, aleksandr.urakov Subscribers: aprantl, markmentovai, lldb-commits, jasonmolenda, JDevlieghere Differential Revision: https://reviews.llvm.org/D61056 llvm-svn: 359288
* Allow direct comparison of ConstString against StringRefRaphael Isemann2019-04-2616-32/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When we want to compare a ConstString against a string literal (or any other non-ConstString), we currently have to explicitly turn the other string into a ConstString. This makes sense as comparing ConstStrings against each other is only a fast pointer comparison. However, currently we (rather incorrectly) use in several places in LLDB temporary ConstStrings when we just want to compare a given ConstString against a hardcoded value, for example like this: ``` if (extension != ConstString(".oat") && extension != ConstString(".odex")) ``` Obviously this kind of defeats the point of ConstStrings. In the comparison above we would construct two temporary ConstStrings every time we hit the given code. Constructing a ConstString is relatively expensive: we need to go to the StringPool, take a read and possibly an exclusive write-lock and then look up our temporary string in the string map of the pool. So we do a lot of heavy work for essentially just comparing a <6 characters in two strings. I initially wanted to just fix these issues by turning the temporary ConstString in static variables/ members, but that made the code much less readable. Instead I propose to add a new overload for the ConstString comparison operator that takes a StringRef. This comparison operator directly compares the ConstString content against the given StringRef without turning the StringRef into a ConstString. This means that the example above can look like this now: ``` if (extension != ".oat" && extension != ".odex") ``` It also no longer has to unlock/lock two locks and call multiple functions in other TUs for constructing the temporary ConstString instances. Instead this should end up just being a direct string comparison of the two given strings on most compilers. This patch also directly updates all uses of temporary and short ConstStrings in LLDB to use this new comparison operator. It also adds a some unit tests for the new and old comparison operator. Reviewers: #lldb, JDevlieghere, espindola, amccarth Reviewed By: JDevlieghere, amccarth Subscribers: amccarth, clayborg, JDevlieghere, emaste, arichardson, MaskRay, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D60667 llvm-svn: 359281
* [TestTemplateFunction] Add a missing debug info variant.Davide Italiano2019-04-251-1/+1
| | | | llvm-svn: 359249
* Another use of the interactive lldb.debugger.Jason Molenda2019-04-251-1/+1
| | | | llvm-svn: 359240
* Two tests were using the interactive convenience variableJason Molenda2019-04-252-3/+3
| | | | | | | lldb.debugger. They should not be. <rdar://problem/50210340> llvm-svn: 359234
OpenPOWER on IntegriCloud