Commit Graph

13490 Commits

Author SHA1 Message Date
Ewan Crawford e69df38282 [RenderScript] Add hook for destroyed allocations
New hook for rsdAllocationDestroy() which is called when allocations are deleted.
LLDB should be aware of this so we can remove the allocation from our internal list.

llvm-svn: 255121
2015-12-09 16:01:58 +00:00
Pavel Labath 35b952ac3e Correctly XFAIL TestReturnValue
android is not an "os", use the target triple to match it.

llvm-svn: 255118
2015-12-09 15:49:40 +00:00
Sagar Thakur 4f58827a57 [LLDB][MIPS] Adding call to IsMSAAvailable() while creating RegisterInfoInterface
This patch will fix the test case test_p_returns_correct_data_size_for_each_qRegisterInfo_attach_llgs_* of TestLldbGdbServer.py on mips. The test fails because we were sending RegisterInfo for msa registers to client even when msa registers are not available. With this commit server will send E45(end of resigters) response if msa registers are not available.

llvm-svn: 255108
2015-12-09 12:31:01 +00:00
Pavel Labath 7ead0b937c XFAIL TestReturnValue for remote Windows->Android tests
this also adds the ability to match the host platform to the expectedFailureAll decorator.

llvm-svn: 255105
2015-12-09 10:54:18 +00:00
Tamas Berghammer 31fef1e273 Fix a cleanup error in TestPlatformProcessConnect.py
llvm-svn: 255104
2015-12-09 10:16:05 +00:00
Todd Fiala 5183147e2d wire timeouts and exceptional inferior process exits through the test event system
The results formatter system is now fed timeouts and exceptional process
exits (i.e. inferior dotest.py process that exited by signal on POSIX
systems).

If a timeout or exceptional exit happens while a test method is running
on the worker queue, the timeout or exceptional exit is charged and
reported against that test method.  Otherwise, if no test method was
running at the time of the timeout or exceptional exit, only the test
filename will be reported as the TIMEOUT or ERROR.

Implements:
https://llvm.org/bugs/show_bug.cgi?id=24830
https://llvm.org/bugs/show_bug.cgi?id=25703

In support of:
https://llvm.org/bugs/show_bug.cgi?id=25450

llvm-svn: 255097
2015-12-09 06:45:43 +00:00
Jason Molenda 12f7929177 Add some additional safety checks to the StructuredData access
methods - lldb can still crash pretty easily on corrupt JSON text,
and these will help eliminate a bunch of cases where that would
result in a crash.  Some of the methods would check that e.g.
GetItemAtIndex would actually return an item before dereferencing it,
some would not, that kind of thing.  

<rdar://problem/23768693> 

llvm-svn: 255093
2015-12-09 04:15:47 +00:00
Sean Callanan 77decf5f20 When printing warnings, the repeat_key should be
const void * because the data is never accessed,
the pointer is the only useful piece of data.

llvm-svn: 255090
2015-12-09 01:25:01 +00:00
Adrian McCarthy 278a6c952b Fix DoReadMemory for Windows mini dumps.
Differential Revision: http://reviews.llvm.org/D15359

llvm-svn: 255083
2015-12-09 00:29:38 +00:00
Zachary Turner d865c6b707 Remove the -c option from dotest.py.
This seems to be a legacy relic from days gone by where the
remote test suite runner operated completely differently than it
does today.  git blames and comments traced this functionality
back to about 2012, and nobody seems to know anything about it
now.

llvm-svn: 255060
2015-12-08 22:15:48 +00:00
Ed Maste a3ad0f1e27 Remove default case in switch which covers all enumeration values
This also conveniently eliminates another warning from the unintentional
use of a trigraph:

warning: trigraph converted to '[' character [-Wtrigraphs]
        default: printf("???(%u)", type);
                          ^
llvm-svn: 255049
2015-12-08 20:50:35 +00:00
Zachary Turner 5067158381 Remove the -X option from dotest.py
This removes the option to exclude a single directory.  This is
part of an effort to remove unused options and cleanup the interface
to the test suite.

llvm-svn: 255048
2015-12-08 20:36:22 +00:00
Zachary Turner 7544602d41 Remove the -g option from dotest.py
This removes the non-exclusive filterspec option as part of an
effort to remove unused / deprecated command line options from
dotest.

llvm-svn: 255041
2015-12-08 18:48:53 +00:00
Zachary Turner 2155d5d301 Remove the -b option from dotest.py
This removes the blacklist option as part of an effort to remove
unused / unmaintained command line options from the test suite.

llvm-svn: 255040
2015-12-08 18:43:16 +00:00
Greg Clayton dfc0962196 Change DeclContextFindDeclByName to return a vector of CompilerDecl objects. Opaque pointers should only be used for the decl context object. Also made a default implementation so that GoASTContext doesn't need to override DeclContextFindDeclByName.
llvm-svn: 255038
2015-12-08 18:39:50 +00:00
Zachary Turner aad25fb9a5 Remove +b option from dotest.py
llvm-svn: 255037
2015-12-08 18:36:05 +00:00
Zachary Turner b0dcbd461e Remove the -D option from dotest.py.
This removes the option to dump Python sys.path variable as part
of an effort to remove unused options.

llvm-svn: 255035
2015-12-08 18:25:38 +00:00
Todd Fiala be011d6c45 flip on executable bit on test runner tests
llvm-svn: 255025
2015-12-08 16:22:27 +00:00
Tamas Berghammer 372810f5f5 Fix MSVC build after rL255016
llvm-svn: 255017
2015-12-08 14:27:40 +00:00
Tamas Berghammer ccd6cffba3 Modify "platform connect" to connect to processes as well
The standard remote debugging workflow with gdb is to start the
application on the remote host under gdbserver (e.g.: gdbserver :5039
a.out) and then connect to it with gdb.

The same workflow is supported by debugserver/lldb-gdbserver with a very
similar syntax but to access all features of lldb we need to be
connected also to an lldb-platform instance running on the target.

Before this change this had to be done manually with starting a separate
lldb-platform on the target machine and then connecting to it with lldb
before connecting to the process.

This change modifies the behavior of "platform connect" with
automatically connecting to the process instance if it was started by
the remote platform. With this command replacing gdbserver in a gdb
based worflow is usually as simple as replacing the command to execute
gdbserver with executing lldb-platform.

Differential revision: http://reviews.llvm.org/D14952

llvm-svn: 255016
2015-12-08 14:08:19 +00:00
Tamas Berghammer 4fbd67ac11 Add a new option to Platform::LoadImage to install the image
This change introduce 3 different working mode for Platform::LoadImage
depending on the file specs specified.
* If only a remote file is specified then the remote file is loaded on
  the target (same behavior as before)
* If only a local file is specified then the local file is installed to
  the current working directory and then loaded from there.
* If both local and remote file is specified then the local file is
  installed to the specified location and then loaded from there.

The same options are exposed on the SB API with a new method LoadImage
method while the old signature presers its meaning.

On the command line the installation of the shared library can be specified
with the "--install" option of "process load".

Differential revision: http://reviews.llvm.org/D15152

llvm-svn: 255014
2015-12-08 13:43:59 +00:00
Pavel Labath 9cbf7dde88 Fixup dotest.py on mac for the configuration package
llvm-svn: 255013
2015-12-08 13:32:07 +00:00
Pavel Labath bddf18009f Fixup dotest.py after the configuration package introduction
llvm-svn: 255009
2015-12-08 12:09:56 +00:00
Bhushan D. Attarde 56222509c3 [LLDB][MIPS] Handle PIC calling convention for MIPS32
SUMMARY:
    - PrepareTrivialCall() to setup register r25 with the address of function to be called.
    - RegisterIsCalleeSaved() to use name of a register instead of its byte_offset.
    
    Reviewers: clayborg
    Subscribers: mohit.bhakkad, sagar, jaydeep, lldb-commits
    Differential Revision: http://reviews.llvm.org/D15273

llvm-svn: 255005
2015-12-08 06:05:57 +00:00
Zachary Turner b4733e6fd2 Move LLDBTestResult class to its own module.
llvm-svn: 254983
2015-12-08 01:15:44 +00:00
Zachary Turner 606e3a5221 Get rid of global variables in dotest.py
This moves all the global variables into a separate module called
`configuration`.  This has a number of advantages:

1. Configuration data is centrally maintained so it's easy to get
   a high level overview of what configuration data the test suite
   makes use of.
2. The method of sharing configuration data among different parts
   of the test suite becomes standardized.  Previously we would
   put some things into the `lldb` module, some things into the
   `lldbtest_config` module, and some things would not get shared.
   Now everything is shared through one module and is available to
   the entire test suite.
3. It opens the door to moving some of the initialization code into
   the `configuration` module, simplifying the implementation of
   `dotest.py`.

There are a few stragglers that didn't get converted over to using
the `configuration` module in this patch, because it would have grown
the size of the patch unnecessarily.  This includes everything
currently in the `lldbtest_config` module, as well as the
`lldb.remote_platform` variable.  We can address these in the future.

llvm-svn: 254982
2015-12-08 01:15:30 +00:00
Greg Clayton e6b36cdd4d Trying to submit 254476 one more time. This implement -gmodule debugging support.
It was previously reverted due to issues that showed up only on linux. I was able to reproduce these issues and fix the underlying cause.

So this is the same patch as 254476 with the following two fixes:
- Fix not trying to complete classes that don't have external sources
- Fix ClangASTSource::CompleteType() to check the decl context of types that it finds by basename to ensure we don't complete a type "S" with a type like "std::S". Before this fix ClangASTSource::CompleteType() would accept _any_ type that had a matching basename and copy it into the other type.

<rdar://problem/22992457>

llvm-svn: 254980
2015-12-08 01:02:08 +00:00
Todd Fiala de02939823 Refactor ResultsFormatter creation into result_formatter.
This cleans up dotest.py and is a pre-step for getting
the test inferior runner to send post-inferior run events
to the events collector, as this code needs to be accessed
from within dosep.py.

llvm-svn: 254979
2015-12-08 00:53:56 +00:00
Kamil Rytarowski faca93e407 Add NetBSD in platform specific logging of the specified category in RegisterCommandsTestCase()
Summary: NetBSD soon will reuse this feature while running tests.

Reviewers: emaste, tfiala, clayborg

Subscribers: lldb-commits, joerg

Differential Revision: http://reviews.llvm.org/D15263

llvm-svn: 254949
2015-12-07 21:26:56 +00:00
Kamil Rytarowski 49f9fb8d26 Add initial NetBSD support in lldbsuite/test/lldbtest.py
Summary:
Add new functions:

  - expectedFailureNetBSD()
  - expectedFlakeyNetBSD()
  - skipIfNetBSD()

Add new NetBSD entry in:

  - getPlatform()
  - getHostPlatform()

Assume that libc++ is installed and use the GNU toolchain

Reviewers: joerg, emaste, tfiala, clayborg

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D15262

llvm-svn: 254948
2015-12-07 21:25:57 +00:00
Kamil Rytarowski 5b76e726b3 Return gmake as the default name for GNU make on NetBSD
Summary:
The base make(1) on NetBSD is BSD make.

In the default installation of NetBSD GNU make comes via pkgsrc under the gmake name.

Reviewers: emaste, tfiala, clayborg

Subscribers: joerg, lldb-commits

Differential Revision: http://reviews.llvm.org/D15261

llvm-svn: 254947
2015-12-07 21:24:25 +00:00
Zachary Turner 905a98881b Rename test_results.py to result_formatter.py.
There is already a class called LLDBTestResults which I would like
to move into a separate file, but the most appropriate filename
was taken.

llvm-svn: 254946
2015-12-07 21:23:41 +00:00
Kamil Rytarowski 1f1a15332b getwd(3) with NULL pointer extension is supported on NetBSD
Summary:
The getwd() and getcwd() functions conform to IEEE Std 1003.1-1990
(POSIX.1).  The IEEE Std 1003.1-2004 (POSIX.1) revision marked
getwd() as legacy and recommended the use of getcwd() instead.  The IEEE
Std 1003.1-2008 (``POSIX.1'') revision removed getwd() from the
specification.

The ability to specify a NULL pointer and have getcwd() allocate memory
as necessary is an extension.

The getwd() function appeared in 4.0BSD.

Reviewers: emaste, tfiala, clayborg

Subscribers: lldb-commits, joerg

Differential Revision: http://reviews.llvm.org/D15260

llvm-svn: 254944
2015-12-07 21:21:12 +00:00
Chuck Ries 1ffd4f5093 Allow variable names to be quoted with -var-list-children
Allow both '-var-list-children var0' and '-var-list-children "var0"' to be used with the -var-list-children command. GDB MI allows for this and it is necessary if the variable name contains spaces, such as var5.std::_Vector_base<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<cahr> > > >.

Differential Revision: http://reviews.llvm.org/D15168

llvm-svn: 254941
2015-12-07 20:43:52 +00:00
Ted Woodward 65a47b31b3 Fix watchpoint check to use watchpoint ranges
Summary: Watchpoints, unlike breakpoints, have an address range. This patch changes WatchpointList::FindByAddress() to match on any address in the watchpoint range, instead of only matching on the watchpoint's base address.

Reviewers: clayborg

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D14932

llvm-svn: 254931
2015-12-07 19:38:58 +00:00
Chuck Ries df032e2b74 test commit.
llvm-svn: 254924
2015-12-07 19:08:15 +00:00
Ewan Crawford b1651b8d88 [RenderScript] Mips64 allocations workaround
Workaround for Mips64 compiler bug by using function pointers to call 
functions for expression evaluation. This avoids the emission of the JAL instruction, 
which can only jump within a particular range of the PC.

Author: Dean De Leo, dean@codeplay.com
llvm-svn: 254910
2015-12-07 13:50:32 +00:00
Pavel Labath 19da1f16c2 Recommit "Fix race during process interruption"
This is a resubmit of r254403, see that commit's message for context. This fixes an issue in the
original commit, where we would incorrectly interrupt the process if the interrupt request came
just as we were about to send the stopped event to the public.

llvm-svn: 254902
2015-12-07 12:36:52 +00:00
Pavel Labath cb8ea4bd23 Make TestThreadStates more stable
Summary:
Because of the large number of XFAILs TestThreadStates has decayed quite a bit. This commit does
the following:
- removes the "breakpoint list" expectations. Most tests have been failing on this, because the
  command output changed quite a while back. I remove it, because run_break_set_by_file_and_line
  already does a decent amount of checking
- fixup test_state_after_expression: this was calling the wrong function by mistake. As now the
  function actually tests something (which we know is broken), I needed to XFAIL it as well.
- replaces the sleep() with a proper wait-for-event functionality in parts which use async mode,
  to stabilize the one function that actually tests something.

Reviewers: clayborg

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D15233

llvm-svn: 254901
2015-12-07 11:09:14 +00:00
Todd Fiala 1d3b5a3ac2 Added lldbsuite.lldb_test_root, switched formatter to use it.
llvm-svn: 254894
2015-12-07 06:19:48 +00:00
Mohit K. Bhakkad f083b9fa97 [LLDB][MIPS] Marking some expected failures
Reviewers: clayborg, zturner.
Subscribers: jaydeep, bhushan, sagar, nitesh.jain, tberghammer,lldb-commits.
Differential Revision: http://reviews.llvm.org/D14944

llvm-svn: 254892
2015-12-07 05:47:35 +00:00
Todd Fiala 9dadac457e Moved total test count and rerun count into summary counts.
llvm-svn: 254891
2015-12-07 04:55:07 +00:00
Todd Fiala 35d604bfdd Move test summary counts to end; simplify issue detail line
Test summary counts now show at the end, with issue details
above.

Issue details now print "ISSUE_TYPE: test method (relative path)".
Relative paths are relative to the
packages/Python/lldbsuite/test directory.

Sample output:

test/dotest.py --executable `pwd`/build/Debug/lldb --results-formatter lldbsuite.test.basic_results_formatter.BasicResultsFormatter --threads 12
Testing: 415 test suites, 12 threads
415 out of 415 test suites processed - TestLldbGdbServer.py
Test Results
Total Test Methods Run (excluding reruns): 2470
Test Method rerun count: 0

Details:
UNEXPECTED SUCCESS: test_symbol_name_dsym (functionalities/completion/TestCompletion.py)
UNEXPECTED SUCCESS: test_symbol_name_dwarf (functionalities/completion/TestCompletion.py)

===================
Test Result Summary
===================
Success:            1329
Expected Failure:     79
Failure:               0
Error:                 0
Unexpected Success:    2
Skip:               1060

llvm-svn: 254890
2015-12-07 03:10:02 +00:00
Kamil Rytarowski a019e81df9 Plug-in PlatformNetBSD initializer and terminator
Summary: Other platform parts needed to build this code are already merged.

Reviewers: emaste, clayborg

Subscribers: joerg, lldb-commits

Differential Revision: http://reviews.llvm.org/D15066

llvm-svn: 254865
2015-12-05 21:46:37 +00:00
Kamil Rytarowski e81c15651f Document NetBSD platform support on the webpage
Summary: It's high time.

Reviewers: emaste, clayborg

Subscribers: labath, joerg, lldb-commits

Differential Revision: http://reviews.llvm.org/D14904

llvm-svn: 254858
2015-12-05 19:41:37 +00:00
Kamil Rytarowski 0b655da7e4 Define new builder_netbsd
Summary: This is used in tests.

Reviewers: emaste, tfiala, clayborg

Subscribers: zturner, lldb-commits, joerg

Differential Revision: http://reviews.llvm.org/D15065

llvm-svn: 254853
2015-12-05 18:46:56 +00:00
Sagar Thakur 44375e4226 [LLDB][MIPS] Fix TestConstVariables.py
Patch by Nitesh Jain.

Summary: There is no debug information generated for variable index with –O3 optimization flag. The DW_AT_location tag in DWARF debug_info section is empty.

Reviewers: ovyalov, clayborg
Subscribers: lldb-commits, mohit.bhakkad, sagar, bhushan, jaydeep
Differential: http://reviews.llvm.org/D15224
llvm-svn: 254850
2015-12-05 12:01:48 +00:00
Zachary Turner 3e9e7d2822 Make TestThreadSpecificBreakpoint.py more focused.
This test would fail before if conditional breakpoints weren't
working correctly, and the nature of the test (spinning up 10
threads, etc) opens the door to raciness.

This patch vastly simplifies the test, removes the need for relying
on conditional expression evaluation, and as a result makes the
correctness of the test vastly easier to reason about and reduces
flakiness.

Differential Revision: http://reviews.llvm.org/D15241
Reviewed By: Jim Ingham

llvm-svn: 254792
2015-12-04 22:59:41 +00:00
Zachary Turner 7d2d09842a Python 3 - Fix script import --allow-reload.
Differential Revision: http://reviews.llvm.org/D15209
Reviewed By: Todd Fiala

llvm-svn: 254791
2015-12-04 22:59:14 +00:00
Jim Ingham 6dd8aa2ed2 Make it clear how you would get the pointee out of an SBValue with
GetType().IsPointerType() returns true.

llvm-svn: 254790
2015-12-04 22:51:19 +00:00