summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
Commit message (Collapse)AuthorAgeFilesLines
* [lldb] [Process/NetBSD] Implement thread name gettingMichał Górny2019-11-182-2/+1
| | | | | | | Implement thread name getting sysctl() on NetBSD. Also fix the incorrect type in pthread_setname_np() in the relevant test. Differential Revision: https://reviews.llvm.org/D70363
* [lldb] [test] Enable lldb-server tests on NetBSD, and set XFAILsMichał Górny2019-11-1811-2/+28
| | | | Differential Revision: https://reviews.llvm.org/D70335
* Remove +x permission on some filesSylvestre Ledru2019-11-161-0/+0
|
* [lldb-vscode] support the completion requestWalter Erquinigo2019-11-156-2/+154
| | | | | | | | | | | | | | | | Summary: The DAP has a completion request that has been unimplemented. It allows showing autocompletion tokens inside the Debug Console. I implemented it in a very simple fashion mimicking what the user would see when autocompleting an expression inside the CLI. There are two cases: normal variables and commands. The latter occurs when a text is prepepended with ` in the Debug Console. These two cases work well and have tests. Reviewers: clayborg, aadsm Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D69873
* Add a testcase for Clang modules being updated within one LLDB session.Adrian Prantl2019-11-156-0/+87
| | | | This actually works as expected, but wasn't explicitly tested before.
* dotest: Add a way for the run_to_* helpers to register dylibsFred Riss2019-11-152-12/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: To run the testsuite remotely the executable needs to be uploaded to the target system. The Target takes care of this by default. When the test uses additional shared libraries, those won't be handled by default and need to be registered with the target using test.registerSharedLibrariesWithTarget(target, dylib). Calling this API requires a target, so it doesn't mesh well with the run_to_* helpers that we've been advertising as the right way to write tests. This patch adds an extra_images argument to all the helpers and does the registration automatically when running a remote testsuite. TestWeakSymbols.py was converted to use this new scheme. Reviewers: jingham Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70134
* [-gmodules] Let LLDB log a warning if the Clang module hash mismatches.Adrian Prantl2019-11-155-1/+83
| | | | | | | | This feature is mostly there to aid debugging of Clang module issues, since the only useful actual the end-user can to is to recompile their program. Differential Revision: https://reviews.llvm.org/D70272
* Fix TestFormatters.py stepping too farDiana Picus2019-11-152-6/+5
| | | | | | | | | | | | | TestFormatters.py has a sequence of three 'next' commands to get past all the initializations in the test function. On AArch64 (and potentially other platforms), this was one 'next' too many and we ended up outside our frame. This patch replaces the sequence with a 'thread until ' the line of the return from the function, so we should stop after all the initializations but before actually returning. Differential Revision: https://reviews.llvm.org/D70303
* [lldb][Editline] Support ctrl+left/right arrow word navigation.Jordan Rupprecht2019-11-141-0/+49
| | | | | | | | | | | | | | | | | Summary: This adds several 5C/5D escape codes that allow moving forward/backward words similar to bash command line navigation. On my terminal, `ctrl+v ctrl+<left arrow>` prints `^[[1;5D`. However, it seems inputrc also maps other escape variants of this to forward/backward word, so I've included those too. Similar for 5C = ctrl+right arrow. Reviewers: JDevlieghere, labath Reviewed By: JDevlieghere, labath Subscribers: merge_guards_bot, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D70137
* [LLDB] Fix whitespace/tabs mismatch in lldbsuite Makefile.rulesMuhammad Omair Javaid2019-11-141-34/+34
| | | | | | | | | | | | This patch fixes whitespace/tabs mismatch in lldb/packages/Python/lldbsuite/test/make/Makefile.rules Legacy make files always used tabs though modern make version can work with white-spaces I have chosen the legacy just to be safe. Signed-off-by: Muhammad Omair Javaid <omair.javaid@linaro.org> Differential Revision: https://reviews.llvm.org/D70154
* [LLDB] Add core definition for armv8l and armv7lMuhammad Omair Javaid2019-11-132-2/+2
| | | | | | | | | | | | | This patch adds core definitions in lldb ArchSpecs for armv8l and armv7l cores. This was needed because on Linux running on 32-bit Arm v8 we are returned armv8l in case we are running 32-bit sysroot on 64bit kernel. In case of 32-bit kernel and 32-bit sysroot running on arm v8 hardware we are returned armv7l. This is quite common when we run 32 bit arm using docker container. Signed-off-by: Muhammad Omair Javaid <omair.javaid@linaro.org> Differential Revision: https://reviews.llvm.org/D69904
* [LLDB][Formatters] Re-enable std::function formatter with fixes to improve ↵shafik2019-11-123-15/+19
| | | | | | | | | non-cached lookup performance Performance issues lead to the libc++ std::function formatter to be disabled. We addressed some of those performance issues by adding caching see D67111 This PR fixes the first lookup performance by not using FindSymbolsMatchingRegExAndType(...) and instead finding the compilation unit the std::function wrapped callable should be in and then searching for the callable directly in the CU. Differential Revision: https://reviews.llvm.org/D69913
* [lldb][test] Macros in expressions require DWARF 5Tatyana Krasnukha2019-11-122-1/+4
|
* [lldb] Re-enable VSCode testsJonas Devlieghere2019-11-118-24/+3
| | | | | | | The VSCode tests were all disabled on macOS because the implementation had some issues that resulted in flakiness on Darwin. It seems most of these issues have been addressed. I've re-enabled all the tests that consistently passed locally.
* Replace tabs with spaces. (NFC)Adrian Prantl2019-11-111-11/+11
|
* Fix a regression in macOS-style path remapping.Adrian Prantl2019-11-114-6/+21
| | | | | | | | | | | | | | | | When we switched to the LLVM .debug_line parser, the .dSYM-style path remapping logic stopped working for relative paths because of how RemapSourceFile silently fails for relative paths. This patch both makes the code more readable and fixes this particular bug. One interesting thing I learned is that Module::RemapSourceFile() is a macOS-only code path that operates on on the lldb::Module level and is completely separate from target.source-map, which operates on a per-Target level. Differential Revision: https://reviews.llvm.org/D70037 rdar://problem/56924558
* Add a testcase for .dSYM path remapping dictionaries.Adrian Prantl2019-11-113-0/+69
| | | | rdar://problem/56924558
* Fix TestNoGPacketSupported on linuxPavel Labath2019-11-111-2/+2
| | | | | | | | The mock server pretends the process stopped with signal 17, which is SIGCHLD on linux. This causes lldb to resume to process, utterly confusing the test. Lldb probably shouldn't resume in this case, but for now this issue can be fixed by changing the signal number to 2, which is SIGINT just about anywhere.
* [lldb] [test] Fix typo in TestSendSignalMichał Górny2019-11-111-1/+1
|
* [lldb] [test] Mark TestSendSignal XFAIL on NetBSDMichał Górny2019-11-111-0/+1
|
* [lldb] [test] Un-XFAIL tests that work on NetBSD 9Michał Górny2019-11-094-6/+0
|
* Temporarily change the default for use-g-packet-for-reading to false,Jason Molenda2019-11-082-1/+4
| | | | | | | | until we can automatically fall back to p/P if g/G are not supported; it looks like there is a bug in debugserver's g/G packets taht needs to be fixed, or debugserver should stop supporting g/G until that bug is fixed. But we need lldb to be able to fall back to p/P correctly for that to be a viable workaround.
* Revert "Add a testcase for .dSYM path remapping dictionaries."Jonas Devlieghere2019-11-083-69/+0
| | | | This reverts commit 2bbc4fdd8fa0ed58d610ab6260cb664c7cfef204.
* Test case to verify that lldb falls back to p/P if g is unsupportedJason Molenda2019-11-081-0/+98
| | | | | | | | | and that lldb uses the expedited register values in the ? packet aka stop packet (T11 etc) and does not re-fetch them with the p packet. This test is currently failing from the "[lldb-server] Add setting to force 'g' packet use" commit; I'm marking it as @expectedFailureAll until we can get this fixed.
* Add a testcase for .dSYM path remapping dictionaries.Adrian Prantl2019-11-083-0/+69
| | | | rdar://problem/56924558
* [lldb] Skip parts of TestCallOverriddenMethod.py on LinuxRaphael Isemann2019-11-081-4/+18
| | | | | | The function call and the constructor call fail now several Linux bots (Swift CI, my own bot and Stella's Debian system), so let's disable the relevant test parts until we can figure out why it is failing.
* Modernize TestWeakSymbols MakefileFred Riss2019-11-071-20/+15
|
* [lldb] Add -m option to 'target modules dump symtab' to disable demanglingRaphael Isemann2019-11-072-0/+48
| | | | | | | | | | | | | | Summary: This option was added downstream in swift-lldb. This upstreams this option as it seems useful and also adds the missing tests. Reviewers: #lldb, kwk, labath Reviewed By: kwk, labath Subscribers: labath, kwk, abidh, JDevlieghere, lldb-commits Tags: #lldb, #upstreaming_lldb_s_downstream_patches Differential Revision: https://reviews.llvm.org/D69944
* [lldb-server] Add setting to force 'g' packet useGuilherme Andrade2019-11-072-1/+85
| | | | | | | | | | | | Following up on https://reviews.llvm.org/D62221, this change introduces the settings plugin.process.gdb-remote.use-g-packet-for-reading. When they are on, 'g' packets are used for reading registers. Using 'g' packets can improve performance by reducing the number of packets exchanged between client and server when a large number of registers needs to be fetched. Differential revision: https://reviews.llvm.org/D62931
* [LLDB] Adding caching to libc++ std::function formatter for lookups that ↵shafik2019-11-062-13/+49
| | | | | | | | | | require scanning symbols Performance issues lead to the libc++ std::function formatter to be disabled. This change is the first of two changes that should address the performance issues and allow us to enable the formatter again. In some cases we end up scanning the symbol table for the callable wrapped by std::function for those cases we will now cache the results and used the cache in subsequent look-ups. This still leaves a large cost for the initial lookup which will be addressed in the next change. Differential Revision: https://reviews.llvm.org/D67111
* [test] Fix apple_simulator_test decorator when simulators are unavailableAlex Langford2019-11-061-1/+1
| | | | | In the case where xcodebuild fails as you set up simulator tests, you would fail because `feature` is never defined.
* Testuite: Support Asan test with remote testingFred Riss2019-11-063-8/+18
| | | | | | To do so, we need to register the sanitizer libraries with the target so that they get uploaded before running. This patch adds a helper to the test class to this effect.
* [TestMTCSimple] Disable the test if you don't have libMTCAlex Langford2019-11-051-1/+5
| | | | | | If you are running on macOS and have the CommandLineTools installed of Xcode, this test will fail because CommandLineTools doesn't ship with libMainThreadChecker. Skip the test if you don't have it installed.
* TestBatchMode.py: add missing @skipIfRemoteFred Riss2019-11-051-0/+1
| | | | | All the tests in this file were already marked as skipped for remote tests except for this one.
* testsuite: skipIfNoSBHeaders should skip when running remotelyFred Riss2019-11-051-0/+3
| | | | | The LLDB dylib/framework will not be available on the remote host, it makes no sense to try to run those tests in a remote scenario.
* Modernize add-dsym test MakefileFred Riss2019-11-051-17/+7
|
* lldb/minidump: Add support for the alternate ARM64 constantPavel Labath2019-11-051-1/+1
|
* [lldb] [Process/NetBSD] Add register info for missing register setsMichał Górny2019-11-041-1/+0
| | | | | | | | | | | | | | | | | | | | | | Add info for all register sets supported in NetBSD, particularly for all registers 'expected' by LLDB. This is necessary in order to fix python_api/lldbutil/iter/TestRegistersIterator.py test that currently fails due to missing names of register sets (None). This copies fpreg descriptions from Linux, and combines Linux' AVX and MPX registers into a single XState group, to fit NetBSD register group design. Technically, we do not support MPX registers at the moment but gdb-remote insists on passing their errors anyway, and if we do not include it in any group, they end up in a separate anonymous group that breaks the test. While at it, swap the enums for XState and DBRegs to match register set ordering. This also adds a few consts to the lldb-x86-register-enums.h to provide more consistency between user registers and debug registers. Differential Revision: https://reviews.llvm.org/D69667
* [lldb][NFC] Make test/python_api/module_section test smallerRaphael Isemann2019-11-041-132/+2
| | | | | | | | | | | | | | | | Summary: I don't see why this test needs to compile this rather complicated file for just testing module sections. This just removes all this code with a simple "Hello world!" program which should be faster to compile Reviewers: labath, davide, JDevlieghere Reviewed By: JDevlieghere Subscribers: jfb, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D69705
* [lldb] Fix offset intersection bug between MPX and AVX registersGuilherme Andrade2019-10-313-0/+82
| | | | | | | | | | | | | | | | | Summary: This change increases the offset of MPX registers (by 128) so they do not overlap with the offset associated with AVX registers. That was causing MPX data in GDBRemoteRegisterContext::m_reg_data to get overwritten. Reviewers: labath Reviewed By: labath Subscribers: JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68874
* [LLDB][PythonFile] fix dangerous borrow semantics on python2Lawrence D'Anna2019-10-301-4/+0
| | | | | | | | | | | | | | | | | | | | Summary: It is inherently unsafe to allow a python program to manipulate borrowed memory from a python object's destructor. It would be nice to flush a borrowed file when python is finished with it, but it's not safe to do on python 2. Python 3 does not suffer from this issue. Reviewers: labath, mgorny Reviewed By: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D69532
* minidump: Rename some architecture constantsPavel Labath2019-10-302-2/+2
| | | | | | | | | | | | | | | | | | | | | The architecture enum contains two kinds of contstants: the "official" ones defined by Microsoft, and unofficial constants added by breakpad to cover the architectures not described by the first ones. Up until now, there was no big need to differentiate between the two. However, now that Microsoft has defined https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/ns-sysinfoapi-system_info a constant for ARM64, we have a name clash. This patch renames all breakpad-defined constants with to include the prefix "BP_". This frees up the name "ARM64", which I'll re-introduce with the new "official" value in a follow-up patch. Reviewers: amccarth, clayborg Subscribers: lldb-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D69285
* [LLDB][breakpoints] ArgInfo::count -> ArgInfo::max_positional_argsLawrence D'Anna2019-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | Summary: Move breakpoints from the old, bad ArgInfo::count to the new, better ArgInfo::max_positional_args. Soon ArgInfo::count will be no more. It looks like this functionality is already well tested by `TestBreakpointCommandsFromPython.py`, so there's no need to write additional tests for it. Reviewers: labath, jingham, JDevlieghere Reviewed By: labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D69468
* [LLDB][Python] fix another fflush issue on NetBSDLawrence D'Anna2019-10-291-0/+5
| | | | | | | | | | | | | | | | Summary: Here's another instance where we were calling fflush on an input stream, which is illegal on NetBSD. Reviewers: labath, mgorny Reviewed By: mgorny Subscribers: krytarowski, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D69488
* Modernize TestThreadStepOut.pyJim Ingham2019-10-282-51/+37
| | | | | | | | This test was timing out on the swift CI bots. I didn't see any obvious reason for that, and the test hasn't had problems on greendragon. OTOH, it was a bit oddly written, and needed modernizing, so I did that. Differential Revision: https://reviews.llvm.org/D69453
* Add support for DW_AT_export_symbols for anonymous structsshafik2019-10-282-2/+14
| | | | | | | | | Summary: We add support for DW_AT_export_symbols to detect anonymous struct on top of the heuristics implemented in D66175 This should allow us to differentiate anonymous structs and unnamed structs. We also fix TestTypeList.py which was incorrectly detecting an unnamed struct as an anonymous struct. Differential Revision: https://reviews.llvm.org/D68961
* [LLDB] Remove incorrect dotest.py invocationJonas Devlieghere2019-10-281-16/+0
| | | | | | | | | | | | | | The invocation shown by dotest.py to re-run a single test is misleading: it ranges from missing arguments (best case scenario) to being totally wrong (worst case scenario). In the past I've tried to get it right, but given the dotest architecture this is harder than it looks. Furthermore, we have pretty good documentation on the website [1] for most use cases. This patch removes the rerun invocation. [1] https://lldb.llvm.org/resources/test.html
* Add the ability to pass extra args to a Python breakpoint callback.Jim Ingham2019-10-253-7/+102
| | | | | | | | | | | | | | | | | For example, it is pretty easy to write a breakpoint command that implements "stop when my caller is Foo", and it is pretty easy to write a breakpoint command that implements "stop when my caller is Bar". But there's no way to write a generic "stop when my caller is..." function, and then specify the caller when you add the command to a breakpoint. With this patch, you can pass this data in a SBStructuredData dictionary. That will get stored in the PythonCommandBaton for the breakpoint, and passed to the implementation function (if it has the right signature) when the breakpoint is hit. Then in lldb, you can say: (lldb) break com add -F caller_is -k caller_name -v Foo More generally this will allow us to write reusable Python breakpoint commands. Differential Revision: https://reviews.llvm.org/D68671
* [lldb] Add nodebug attribute to import-std-module/sysroot testRaphael Isemann2019-10-231-0/+1
| | | | | | | | | | | | | | | | | | Summary: So far we rely on the default argument and the fact that we don't call this inline function in our actual `main.cpp` to make sure that this function can only be called if LLDB loads this header as a C++ module. This patch just adds the nodebug attribute as yet another measure to make sure LLDB can't call this function without the standard module loaded. Note that the test is already requiring clang for the sysroot setup, so its fine that this is a Clang specific attribute. Reviewers: friss, labath Subscribers: JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68861
* XFAIL TestLocalVariables.py on WindowsJonas Devlieghere2019-10-211-0/+1
| | | | | | | | This test has been failing for a while on the Windows bot. https://bugs.llvm.org/show_bug.cgi?id=43752 llvm-svn: 375459
OpenPOWER on IntegriCloud