summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
Commit message (Collapse)AuthorAgeFilesLines
* Add ThreadSanitizer debugging support.Kuba Brecka2016-03-236-0/+219
| | | | | | | | | | | | This patch adds ThreadSanitizer support into LLDB: - Adding a new InstrumentationRuntime plugin, ThreadSanitizerRuntime, in the same way ASan is implemented. - A breakpoint stops in `__tsan_on_report`, then we extract all sorts of information by evaluating an expression. We then populate this into StopReasonExtendedInfo. - SBThread gets a new API, SBThread::GetStopReasonExtendedBacktraces(), which returns TSan’s backtraces in the form of regular SBThreads. Non-TSan stop reasons return an empty collection. - Added some test cases. Reviewed by Greg Clayton. llvm-svn: 264162
* Change 'apropos' such that it doesn't look into the "long help/syntax" ↵Enrico Granata2016-03-231-1/+1
| | | | | | | | | | strings for commands This solves issues such as 'apropos foo' returning valid matches just because syntax examples happen to use 'foo' as a placeholder token Fixes rdar://9043025 llvm-svn: 264123
* Fix a bug caused by my alias refactoring where, if an alias was defined in ↵Enrico Granata2016-03-223-0/+87
| | | | | | terms of another alias, trying to run the nested command would actually cause a crash in the command interpreter llvm-svn: 264096
* Unicode support on Win32.Zachary Turner2016-03-221-1/+1
| | | | | | | | | | | | | Win32 API calls that are Unicode aware require wide character strings, but LLDB uses UTF8 everywhere. This patch does conversions wherever necessary when passing strings into and out of Win32 API calls. Patch by Cameron Differential Revision: http://reviews.llvm.org/D17107 Reviewed By: zturner, amccarth llvm-svn: 264074
* Add a DiagnosticManager replace error streams in the expression parser.Sean Callanan2016-03-192-44/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We want to do a better job presenting errors that occur when evaluating expressions. Key to this effort is getting away from a model where all errors are spat out onto a stream where the client has to take or leave all of them. To this end, this patch adds a new class, DiagnosticManager, which contains errors produced by the compiler or by LLDB as an expression is created. The DiagnosticManager can dump itself to a log as well as to a string. Clients will (in the future) be able to filter out the errors they're interested in by ID or present subsets of these errors to the user. This patch is not intended to change the *users* of errors - only to thread DiagnosticManagers to all the places where streams are used. I also attempt to standardize our use of errors a bit, removing trailing newlines and making clients omit 'error:', 'warning:' etc. and instead pass the Severity flag. The patch is testsuite-neutral, with modifications to one part of the MI tests because it relied on "error: error:" being erroneously printed. This patch fixes the MI variable handling and the testcase. <rdar://problem/22864976> llvm-svn: 263859
* Switch from unittest2.expectedFailure to our own decorator on TestSTLPavel Labath2016-03-161-2/+1
| | | | | | | the main reason is that our decorator contains extra fluff to "expect" crashes (which seem to happen occasionaly on the android buildbot). llvm-svn: 263633
* Mark an LLGS test as flakyPavel Labath2016-03-161-0/+1
| | | | | cause: Async output arrival over pty llvm-svn: 263631
* [test] Persist packets between expect_gdbremote_sequence invocationsPavel Labath2016-03-163-30/+41
| | | | | | | | | | | | | | | | | | | | | | Summary: Some tests (Hc_then_Csignal_signals_correct_thread, at least) were sending a "continue" packet in one expect_gdbremote_sequence invocation, and "expecting" the stop-reply in another call. This posed a problem, because the were packets were not persisted between the two invocations, and if the stub was exceptionally fast to respond, the packet would be received in the first invocation (where it would be ignored) and then the second invocation would fail because it could not find the packet. Since doing matching in two invocations seems like a reasonable use of the packet pump, instead of fixing the test, I make sure the packet_pump supports this usage by making the list of captured packets persistent. Reviewers: tfiala Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D18140 llvm-svn: 263629
* Fix thread/process ID reading from linux core filesPavel Labath2016-03-167-0/+94
| | | | | | | | | | | | | | | | | Summary: This also adds a basic smoke test for linux core file reading. I'm checking in the core files as well, so that the tests can run on all platforms. With some tricks I was able to produce reasonably-sized core files (~40K). This fixes the first part of pr26322. Reviewers: zturner Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D18176 llvm-svn: 263628
* On some platforms, the compiler is allowed to assume that BOOL == bool. On ↵Enrico Granata2016-03-152-1/+9
| | | | | | | | | | | | others, BOOL == signed char. This can cause differences in which bit patterns end up meaning YES or NO. In general, however, 0 == NO and 1 == YES. To keep it simple, LLDB will now show "YES" and "NO" only for 1 and 0 respectively, and format other values as the plain numeric value instead. Fixes rdar://24809994 llvm-svn: 263604
* Make it so that the data formatter for NSError can see through a variable of ↵Enrico Granata2016-03-152-5/+8
| | | | | | type NSError**. Fixes rdar://25060684 llvm-svn: 263603
* Add regression test for expressions calling functions taking anonymous ↵Ewan Crawford2016-03-153-0/+78
| | | | | | | | | | | | struct typedef arguments This CL adds a regression test for the bug listed at https://llvm.org/bugs/show_bug.cgi?id=26790 Functionality was implemented in commit r263544 Author: Luke Drummond <luke.drummond@codeplay.com> Differential Revision: http://reviews.llvm.org/D17777 llvm-svn: 263547
* Add some test coverage for the changes in alias helpEnrico Granata2016-03-151-0/+18
| | | | llvm-svn: 263520
* Enable expectedFailure for all Clang versions in TestRegisterVariablesEd Maste2016-03-141-1/+1
| | | | | | | | | | In r262970 this was changed from xfail Clang < 3.5 to > 3.5, but it still fails on FreeBSD 10's system Clang 3.4.1 so assume it fails on all versions. llvm.org/pr26937 llvm-svn: 263467
* [test] Correctly retry connections on android targetsPavel Labath2016-03-141-5/+31
| | | | | | | | | | | | | | | | | Summary: Normally, when the remote stub is not ready, we will get ECONNREFUSED during the connect() attempt. However, due to the way how ADB forwarding works, on android targets the connect() will always be successful, but the connection will be immediately dropped if ADB could not connect on the remote side. This commit tries to detect this situation, and report it as "connection refused" so that the upper test layers attempt the connection again. Reviewers: tfiala, tberghammer Subscribers: tberghammer, danalbert, srhines, lldb-commits Differential Revision: http://reviews.llvm.org/D18146 llvm-svn: 263439
* Extend XFlaky in TestProcessIO to linux as wellPavel Labath2016-03-141-5/+5
| | | | | | The test sometimes fails on local linux as well. The cause is the same. llvm-svn: 263421
* Remove the skip if Darwin since I fixed the crash.Jim Ingham2016-03-111-1/+0
| | | | llvm-svn: 263283
* Fixed MemoryCache L1 cache flushMarianne Mailhot-Sarrasin2016-03-113-0/+81
| | | | | | | | Use the same method to find the cache line as in Read(). Differential Revision: http://reviews.llvm.org/D18050 llvm-svn: 263233
* skip newly segfaulting test on OS X public CITodd Fiala2016-03-111-0/+1
| | | | llvm-svn: 263205
* Fixed ValueObject::GetExpressionPath() for paths including anonymous ↵Marianne Mailhot-Sarrasin2016-03-101-0/+11
| | | | | | | | | | struct/union When the parent of an expression is anonymous, skip adding '.' or '->' before the expression name. Differential Revision: http://reviews.llvm.org/D18005 llvm-svn: 263166
* Eliminate the TestStarted-XXX and TestFinished-XXX files from check-lldb runs.Adrian McCarthy2016-03-101-11/+0
| | | | | | | | Nobody seems to know what purpose these files serve, yet they were accumulating by the thousands in the test traces directory. I'm proposing we delete them. Creating these files accounted for about 2.5% of the time to run ninja check-lldb on my machine, which isn't a lot, but it's something. llvm-svn: 263122
* [DWARFASTParserClang] Start with member offset of 0 for members of union types.Siva Chandra2016-03-103-0/+69
| | | | | | | | | | | | | | | Summary: GCC does not emit DW_AT_data_member_location for members of a union. Starting with a 0 value for member locations helps is reading union types in such cases. Reviewers: clayborg Subscribers: ldrumm, lldb-commits Differential Revision: http://reviews.llvm.org/D18008 llvm-svn: 263085
* [TestRegisterVariables] Adjust compiler range in expected failure decorator.Siva Chandra2016-03-091-2/+2
| | | | | | | | Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D17972 llvm-svn: 262970
* Made self.expect() errors a little more readable in the testsuite.Sean Callanan2016-03-081-7/+8
| | | | | | | | | | | | | | | | | self.expect() had two problems: - If there was a substrs argument, then it overwrote the variable containing the command to run with the last substr. That meant nonsense command text in testsuite errors. - The actual output is not printed, which makes fixing testsuite failures a bit annoying (you end up having to use the -tv arguments to dotest). This fixes both of these issues. We could do even better, pretty-printing the criteria for "correct" output, but this at least makes dealing with errors a bit better. llvm-svn: 262950
* Support floating point values in 128-bit SSE vector registersAdrian Prantl2016-03-082-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | The System-V x86_64 ABI requires floating point values to be passed in 128-but SSE vector registers (xmm0, ...). When printing such a variable this currently yields an <invalid load address>. This patch makes LLDB's DWARF expression evaluator accept 128-bit registers as scalars. It also relaxes the check that the size of the result of the DWARF expression be equal to the size of the variable to a greater-than. DWARF defers to the ABI how smaller values are being placed in a larger register. Implementation note: I found the code in Value::SetContext() that changes the m_value_type after the fact to be questionable. I added a sanity check that the Value's memory buffer has indeed been written to (this is necessary, because we may have a scalar value in a vector register), but really I feel like this is the wrong place to be setting it. Reviewed by Greg Clayton. http://reviews.llvm.org/D17897 rdar://problem/24944340 llvm-svn: 262947
* Change over the broadcaster/listener process to hold shared or weak pointersJim Ingham2016-03-073-0/+68
| | | | | | | | | | | | | | to each other. This should remove some infrequent teardown crashes when the listener is not the debugger's listener. Processes now need to take a ListenerSP, not a Listener&. This required changing over the Process plugin class constructors to take a ListenerSP, instead of a Listener&. Other than that there should be no functional change. <rdar://problem/24580184> CrashTracer: [USER] Xcode at …ework: lldb_private::Listener::BroadcasterWillDestruct + 39 llvm-svn: 262863
* [LLDB][MIPS] Fix TestDisassembleBreakpointMohit K. Bhakkad2016-03-071-1/+1
| | | | | | | | | | Patch by Nitesh Jain Reviewers: clayborg, jaydeep. Subscribers: bhushan, mohit.bhakkad, sagar, lldb-commits. Differential Revision: http://reviews.llvm.org/D17597 llvm-svn: 262819
* Add a log statementPavel Labath2016-03-041-0/+1
| | | | llvm-svn: 262715
* Resumbit "Fetch remote log files from LLGS tests"Pavel Labath2016-03-041-5/+29
| | | | | | | | The problem with the original patch (and my first attempt to fix) was that the value debug monitor flags could persist from one test to another. Resetting the value in the setUp() function fixes the problem. llvm-svn: 262713
* Add reverse file remapping for breakpoint setTamas Berghammer2016-03-041-0/+18
| | | | | | | | | | | | | | LLDB can remap a source file to a new directory based on the "target.sorce-map" to handle the usecase when the source code moved between the compliation and the debugging. Previously the remapping was only used to display the content of the file. This CL fixes the scenario when a breakpoint is set based on the new an absolute path with adding an inverse remapping step before looking up the breakpoint location. Differential revision: http://reviews.llvm.org/D17848 llvm-svn: 262711
* Revert "Fetch remote log files from LLGS tests"Pavel Labath2016-03-031-29/+5
| | | | | | | Even after the last fixup, there still seems to be one failure left. Revert until I figure out what is going on. llvm-svn: 262622
* Fix OSX breakage caused by r262597Pavel Labath2016-03-031-0/+1
| | | | llvm-svn: 262602
* Fetch remote log files from LLGS testsPavel Labath2016-03-031-5/+28
| | | | | | | | | | | | | | | | | Summary: this enables download of remote log files for llgs and debugserver tests (previously we were just passing the host file name which obviously did not work). Note this also changes the debugserver logging to work only when logging has been requested on the command line, whereas previously it would log unconditionally. I can change it back if anyone is relying on this, but I thought I'd make this consistent. Reviewers: tfiala Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D17798 llvm-svn: 262597
* Slightly improve logging in LLGS testsPavel Labath2016-03-011-1/+1
| | | | | | we're sometimes getting an exception here, and I want to see why... llvm-svn: 262333
* When 'help' cannot find a command, produce additional help text that also ↵Enrico Granata2016-02-291-0/+15
| | | | | | | | | | | | | | | | | | points the user to the apropos and type lookup commands This is useful in cases such as, e.g. (lldb) help NSString (the user meant type lookup) or (lldb) help kill (the user is looking for process kill) Fixes rdar://24868537 llvm-svn: 262271
* Fix TestInlines.py on WindowsAdrian McCarthy2016-02-294-8/+8
| | | | | | | | | | | | | | The inlining semantics for C and C++ are different, which affects the test's expectation of the number of times the function should appear in the binary. In the case of this test, C semantics means there should be three instances of inner_inline, while C++ semantics means there should be only two. On Windows, clang uses C++ inline semantics even for C code, and there doesn't seem to be a combination of compiler flags to avoid this. So, for consistency, I've recast the test to use C++ everywhere. Since the test resided under lang/c, it seemed appropriate to move it to lang/cpp. This does not address the other XFAIL for this test on Linux/gcc. See https://llvm.org/bugs/show_bug.cgi?id=26710 Differential Revision: http://reviews.llvm.org/D17650 llvm-svn: 262255
* Revert a part of "Add/Improve complex, vector, aggregate types handling for ↵Pavel Labath2016-02-291-3/+3
| | | | | | | | | | | | SysV ARM (hard/soft) ABI." This partially reverts commit r262218. The commit added additional checks to a test case. The test case is too big so it's not feasible to XFAIL it completely. Suggest to implement the checks as a separate test case, which can then be XFAILed more surgically. llvm-svn: 262223
* Add/Improve complex, vector, aggregate types handling for SysV ARM ↵Omair Javaid2016-02-291-3/+3
| | | | | | | | | | (hard/soft) ABI. For details see: Differential revision: http://reviews.llvm.org/D17708 llvm-svn: 262218
* [LLDB][MIPS] Fix TestInferiorAssert.py for MIPSSagar Thakur2016-02-261-0/+4
| | | | | | | | | | | Patch by Nitesh Jain. Summary: The debug version of libc.so is require for backtracing which may not be available on all platforms. Reviewers: ovyalov, clayborg Subscribers: zturner, lldb-commits, mohit.bhakkad, sagar, bhushan, jaydeep Differential: http://reviews.llvm.org/D17131 llvm-svn: 262011
* Make TestPlatformProcessConnect to support abstract/domain sockets.Oleksiy Vyalov2016-02-261-4/+20
| | | | llvm-svn: 261974
* Add the "block" keyword to "thread step-in -e", and an alias that uses it: ↵Jim Ingham2016-02-263-0/+158
| | | | | | | | | "sif <target function>" - i.e. step-into-function to allow you to step through a complex calling sequence into a particular function that may span multiple lines. Also some test cases for this and the --step-target feature. llvm-svn: 261953
* XFail TestInlines.py on Windows with clang.Adrian McCarthy2016-02-251-0/+1
| | | | | | | | Test expects the breakpoint to resolve to three locations, but clang on windows yields only 2. llvm.org/pr26710 llvm-svn: 261810
* Get register context for the 32-bit process in a WoW64 process minidumpAdrian McCarthy2016-02-253-0/+107
| | | | | | | | | | | | 32-bit processes on 64-bit Windows run in a layer called WoW64 (Windows-on-Windows64). If you capture a mini dump of such a process from a 32-bit debugger, you end up with a register context for the 64-bit WoW64 process rather than the 32-bit one you probably care about. This detects WoW64 by looking to see if there's a module named wow64.dll loaded. For such processes, it then looks in the 64-bit Thread Environment Block (TEB) to locate a copy of the 32-bit CONTEXT record that the plugin needs for the register context. Added some rudimentary tests. I'd like to improve these later once we figure out how to get the exception information from these mini dumps. Differential Revision: http://reviews.llvm.org/D17465 llvm-svn: 261808
* xfail case sensitivity test on Linux.Zachary Turner2016-02-241-0/+1
| | | | | | | | | | | | There are two tests in this file. One which only runs on Windows and tests that you can set a breakpoint with mismatched case. And another that only runs on non-Windows and tests that you cannot set a breakpoint with mismatched case. This latter test is failing on non Windows platforms for some reason. It could be that the test is just written incorrectly, as I think the actual functionality actually works correctly on non-Windows platforms. llvm-svn: 261800
* Some fixes for case insensitive paths on Windows.Zachary Turner2016-02-243-0/+134
| | | | | | | | | | | | | | | | | | | Paths on Windows are not case-sensitive. Because of this, if a file is called main.cpp, you should be able to set a breakpoint on it by using the name Main.cpp. In an ideal world, you could just tell people to match the case, but in practice this can be a real problem as it requires you to know whether the person who compiled the program ran "clang++ main.cpp" or "clang++ Main.cpp", both of which would work, regardless of what the file was actually called. This fixes http://llvm.org/pr22667 Patch by Petr Hons Differential Revision: http://reviews.llvm.org/D17492 Reviewed by: zturner llvm-svn: 261771
* XFAIL TestInlines for Linux with gccTamas Berghammer2016-02-231-1/+3
| | | | llvm-svn: 261630
* Actually commit the test for r261598.Sean Callanan2016-02-232-1/+50
| | | | llvm-svn: 261599
* Mark TestMiBreak.test_lldbmi_break_insert_function_pending as flaky on linuxPavel Labath2016-02-221-0/+1
| | | | | | | Test has become flaky again. Attempts to investigate the triggering commit have failed, so I suspect it was flaky all along.. llvm-svn: 261519
* Remove expectedFailureFreeBSD decoratorEd Maste2016-02-1919-26/+22
| | | | | | | | All invocations are updated to use the generic expectedFailureAll. Differential Revision: http://reviews.llvm.org/D17455 llvm-svn: 261355
* Remove XFAIL from test passing on FreeBSDEd Maste2016-02-191-1/+0
| | | | | | | | | | | There is a report in the PR from several months ago that it failed intermittently, but it is passing consistently for me on FreeBSD 10 and 11. We can re-add a decorator if further testing shows it is still flakey. llvm.org/pr17214 llvm-svn: 261340
OpenPOWER on IntegriCloud