summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python
Commit message (Collapse)AuthorAgeFilesLines
...
* Improve the way LLDB escapes arguments before passing them to the shellEnrico Granata2016-04-041-1/+5
| | | | | | | | | | | | | Teach LLDB that different shells have different characters they are sensitive to, and use that knowledge to do shell-aware escaping This helps solve a class of problems on OS X where LLDB would try to launch via sh, and run into problems if the command line being passed to the inferior contained such special markers (hint: the shell would error out and we'd fail to launch) This makes those launch scenarios work transparently via shell expansion Slightly improve the error message when this kind of failure occurs to at least suggest that the user try going through 'process launch' directly Fixes rdar://problem/22749408 llvm-svn: 265357
* disabled TSAN tests until the author can help track down CI failuresTodd Fiala2016-04-042-0/+2
| | | | | | | These tests run fine locally for me but are failing on the Green Dragon OS X CI. llvm-svn: 265342
* Fix flakyness in TestWatchpointMultipleThreadsPavel Labath2016-04-042-7/+2
| | | | | | | This addresses the same problem as r264846 (the test not expecting the situation when two thread hit the watchpoint simultaneously), but for a different test. llvm-svn: 265294
* skip and xfail two std::list-related libcxx tests that fail on OS X with TOT ↵Todd Fiala2016-04-012-0/+2
| | | | | | | | | | | | | libcxx Enrico has a bug on him to make this work across older libcxx list and newer libcxx list simultaneously. Needed in preparation of getting the OS X public CI to run the TSAN tests. tracked by: rdar://25499635 llvm-svn: 265188
* Remove more of the code-running ObjC data formatter supportEnrico Granata2016-04-011-6/+1
| | | | llvm-svn: 265181
* mark TestCallWithTimeout.py XFAIL on macosx.Todd Fiala2016-04-011-1/+1
| | | | | | | | | | This test is failing on the CI but not locally for me. Needs investigation. tracked by: https://llvm.org/bugs/show_bug.cgi?id=27182 llvm-svn: 265175
* Guard xunit result test class and test method name access to prevent testbot ↵Todd Fiala2016-04-011-2/+2
| | | | | | | | breakage http://llvm.org/bugs/show_bug.cgi?id=27179 llvm-svn: 265165
* Fix clean rule for a makefilePavel Labath2016-04-011-1/+1
| | | | | | | The test was failing on windows because the clean rule (which is executed even if the test is skipped) returned an error there. llvm-svn: 265140
* Don't vary debug info for lldb-server testsPavel Labath2016-03-312-1/+13
| | | | | | | | | | | | | | | | | | Summary: Debug info is used only by the client and lldb-server tests do not even have the client component running, as they communicate with the server directly. Therefore, running the tests for each debug info type is unnecessarry. This adds general ability to mark a test class as not dependent on debug info, and marks all lldb-server tests as such. Reviewers: tberghammer, tfiala Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D18598 llvm-svn: 265017
* Add --help and --long-help options to 'command alias' such that one can now ↵Enrico Granata2016-03-311-0/+13
| | | | | | specify a help string for an alias as they are defining it llvm-svn: 264980
* Enhance the 'type X list' commands such that they actually alert the user if ↵Enrico Granata2016-03-302-1/+4
| | | | | | no formatters matching the constraints could be found llvm-svn: 264957
* Fixed a problem where a dSYM wasn't properly found because it had the wrong nameSean Callanan2016-03-302-2/+3
| | | | | | <rdar://problem/25447765> llvm-svn: 264914
* Fix flakyness in TestWatchpointMultipleThreadsPavel Labath2016-03-302-13/+3
| | | | | | | | | | | | | | | | | | | | | | Summary: the inferior in the test deliberately does not lock a mutex when accessing the watched variable. The reason for that is unclear as, based on the logs, the original intention of the test was to check whether watchpoints get propagated to newly created threads, which should work fine even with a mutex. Furthermore, in the unlikely event (which I have still observed happening from time to time) that two threads do manage the execute the "critical section" simultaneously, the test will fail, as it is expecting the watchpoint "hit count" to be 1, but in this case it will be 2. Given this, I have simply chose to lock the mutex always, so that we have more predictible behavior. Watchpoints being hit simultaneously is still (and correctly!) tested by TestConcurrentEvents. Reviewers: clayborg, jingham Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D18558 llvm-svn: 264846
* Fixed the failing test TestCommandScriptImmediateOutput on MacOSX. Turns out ↵Greg Clayton2016-03-303-6/+6
| | | | | | | | | | | | | | | | | | | | | that there are few things to watch out for when writing pexpect tests: 1 - If you plan on looking for the "(lldb) " prompt as a regular expression, look for "\(lldb\) " so you don't just find "lldb". 2 - Make sure to not use colors (specify --no-use-colors as an option to lldb when launching it) as our editline will print: "(lldb) <color junk>(lldb) " where "<color junk>" is a work around that is used to allow us to colorize our prompts. The bad thing is this will make pexepct code like this not execute as you would expect: prompt = "\(lldb\) " self.child.sendline("breakpoint set ...", prompt) self.child.sendline("breakpoint clear ...", prompt) The problem is the first "sendline" will create two lldb prompts and will match both the first and second prompts and you output will get off. So be sure to disable colors if you need to. Fixed a case where "TestCommandScriptImmediateOutput.py" would fail if you have spaces in your directory names. I modified custom_command.py to use shlex to parse arguments and I quoted the file path we sent down to the custom_command.write_file function. llvm-svn: 264810
* Figure out what the fixed expression is, and print it. Added another target ↵Jim Ingham2016-03-291-1/+5
| | | | | | | | | | | | | setting to quietly apply fixits for those who really trust clang's fixits. Also, moved the retry into ClangUserExpression::Evaluate, where I can make a whole new ClangUserExpression to do the work. Reusing any of the parts of a UserExpression in situ isn't supported at present. <rdar://problem/25351938> llvm-svn: 264793
* Expose top-level Clang expressions via the command line and the API.Sean Callanan2016-03-285-0/+174
| | | | | | | | | | | | | | | | | | Top-level Clang expressions are expressions that act as new translation units, and define their own symbols. They do not have function wrappers like regular expressions do, and declarations are persistent regardless of use of the dollar sign in identifiers. Names defined by these are given priority over all other symbol lookups. This patch adds a new expression option, '-p' or '--top-level,' which controls whether the expression is treated this way. It also adds a flag controlling this to SBExpressionOptions so that this API is usable externally. It also adds a test that validates that this works. (The test requires a fix to the Clang AST importer which I will be committing shortly.) <rdar://problem/22864976> llvm-svn: 264662
* Fix an issue with nested aliases where the help system wouldn't correctly ↵Enrico Granata2016-03-251-0/+8
| | | | | | | | track the fact that an alias is an alias to a dash-dash alias (and I hope I typed the word 'alias' enough times in this commit message :-) llvm-svn: 264468
* Use Clang's FixItHints to correct expressions with "trivial" mistakes (e.g. ↵Jim Ingham2016-03-253-0/+114
| | | | | | | | | | | | | | | "." for "->".) This feature is controlled by an expression command option, a target property and the SBExpressionOptions setting. FixIt's are only applied to UserExpressions, not UtilityFunctions, those you have to get right when you make them. This is just a first stage. At present the fixits are applied silently. The next step is to tell the user about the applied fixit. <rdar://problem/25351938> llvm-svn: 264379
* Make File option flags consistent for Python APIStephane Sezer2016-03-242-1/+44
| | | | | | | | | | | | | | | | | | Summary: Fixes SBCommandReturnObject::SetImmediateOutputFile() and SBCommandReturnObject::SetImmediateOutputFile() for files opened with "a" or "a+" by resolving inconsistencies between File and our Python parsing of file objects. Reviewers: granata.enrico, Eugene.Zelenko, jingham, clayborg Subscribers: lldb-commits, sas Differential Revision: http://reviews.llvm.org/D18228 Change by Francis Ricci <fjricci@fb.com> llvm-svn: 264351
* Make 'type lookup' print an error message instead of complete radio silence ↵Enrico Granata2016-03-241-0/+1
| | | | | | | | when it can't find a type matching user input It would be fun to make it provide suggestions (e.g. 'can't find NString, did you mean NSString instead?'), but this worries me a little bit on the account of just how thorough of a type system scan it would have to do llvm-svn: 264343
* 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
OpenPOWER on IntegriCloud