Commit Graph

13743 Commits

Author SHA1 Message Date
Pavel Labath ffbf9e86b2 Make test categories composable
Summary:
Previously the add_test_categories would simply overwrite the current set of categories for a
method. This change makes the decorator truly "add" categories, by extending the current set of
categories instead of replacing it.

To do this, I have:
- replaced the getCategories() property on a method (which was itself a method), with a simple
  list property "categories". This makes add_test_categories easier to implement, and test
  categories isn't something which should change between calls anyway.
- rewritten the getCategoriesForTest function to merge method categories with the categories of
  the test case. Previously, it would just use the method categories if they were present. I have
  also greatly simplified this method. Originally, it would use a lot of introspection to enable
  it being called on various types of objects. Based on my tests, it was only ever being called
  on a test case. The new function uses much less introspection then the preivous one, so we
  should easily catch any stray uses, if there are any, as they will generate exceptions now.

Reviewers: zturner, tfiala, tberghammer

Subscribers: lldb-commits

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

llvm-svn: 255493
2015-12-14 13:17:18 +00:00
Pavel Labath b8ea7a0ed3 Extend XFAIL on TestNamespaceLookup on linux
one of the tests seems to (occasionally) fail with clang as well.

llvm-svn: 255492
2015-12-14 12:09:28 +00:00
Pavel Labath 25cf6727d1 XFAIL TestNamespaceLookup for linux
llvm-svn: 255490
2015-12-14 11:05:44 +00:00
Mohit K. Bhakkad 1951f719df [LLDB][MIPS] Mark TestConcurrentEvents.py expected failure, as MIPS atomic sequences are yet to be supported in LLDB
Reviewers: jaydeep.
Subscribers: lldb-commits.
Differential Revision: http://reviews.llvm.org/D15488

llvm-svn: 255488
2015-12-14 10:26:18 +00:00
Dawn Perchik b6d737c9b8 Test case for "Fix scope-based lookup when more than one function is found."
Missed commit in r255439.
Differential Revision: http://reviews.llvm.org/D15312

llvm-svn: 255440
2015-12-12 20:44:08 +00:00
Dawn Perchik b59257841e Fix scope-based lookup when more than one function is found.
When multiple functions are found by name, lldb removes duplicate entries of
functions with the same type, so the first function in the symbol context list
is chosen, even if it isn't in scope. This patch uses the declaration context
of the execution context to select the function which is in scope.

This fixes cases like the following:

    int func();
    namespace ns {
	int func();
	void here() {
	    // Run to BP here and eval 'p func()';
	    // lldb used to find ::func(), now finds ns::func().
	}
    }

Reviewed by: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D15312

llvm-svn: 255439
2015-12-12 19:31:41 +00:00
Todd Fiala 93153922db test infra: adds book-keeping for rerunnable tests
Also adds full path info for exceptional exits and timeouts when
no test method is currently running.

Adds --rerun-all-issues command line arg.  If specified, all
test issues are eligible for rerun.  If not specified, only tests
marked flakey are eligible for rerun.

The actual rerunning will occur in an upcoming change.  This
change just handles tha accounting of what should be rerun.

llvm-svn: 255438
2015-12-12 19:26:56 +00:00
Jason Molenda a38312a9a4 Fix the L1 cache search in MemoryCache::Read to use the
stl upper_bound method instead of lower_bound - we were
failing to find some cached data in the L1 cache resulting
in extra memory read packets while stepping.

The bug with the existing code looked like this:
If the L1 cache has 8 bytes at address 0x1000 and 8 bytes
at address 0x2000 and we are searching for 4 bytes at 0x2004,
the use of lower_bound would return the end() of the container
and so we would incorrectly treat the memory as uncached.

(the L1 cache is memory seeded from debugserver in the T aka
questionmark packet, where debugserver will send up the stack
memory that likely contains the caller's stack pointer and 
frame pointer values.)

<rdar://problem/23869227> 

llvm-svn: 255421
2015-12-12 03:06:10 +00:00
Oleksiy Vyalov 9497cc2bf8 Remove unused mips typedefs.
llvm-svn: 255419
2015-12-12 02:13:17 +00:00
Jason Molenda 0071be6590 When supplying memory to expedite the unwinds in the T packet,
include two stack frames worth of unwind information instead of
just one -- the unwinder is trying to fetch two stack frames in
more instances now and we're sending extra memory reads resulting
in a performance degredation while stepping.

llvm-svn: 255417
2015-12-12 01:32:09 +00:00
Todd Fiala d06a9c9f61 Decouple test execution and test finder logic in parallel test runner.
llvm-svn: 255400
2015-12-12 00:34:57 +00:00
Todd Fiala 9a58133698 Use new set when checking if a test event type matches the job/test result types
llvm-svn: 255385
2015-12-11 22:45:52 +00:00
Todd Fiala b68dbfa227 Revert "Revert "Turn on new test summary results by default.""
This reverts commit f994b46a2028c8a8b9b55fe010a95122bca07540.

llvm-svn: 255381
2015-12-11 22:29:34 +00:00
Adrian McCarthy cf6177131a Add some tests for stack and local variable inspection for mini dumps.
Differential Revision: http://reviews.llvm.org/D15435

llvm-svn: 255379
2015-12-11 22:27:57 +00:00
Ted Woodward 4062601cb9 Remove hardcoded registers from Hexagon ABI
Summary: The Hexagon ABI plugin uses hardcoded registers when setting up function calls. This is OK for the Hexagon simulator, but the register numbers are different on the gdbserver running on hardware. Change the hardcoded registers to LLDB generic registers.

Reviewers: clayborg

Subscribers: lldb-commits

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

llvm-svn: 255374
2015-12-11 21:52:47 +00:00
Eugene Zelenko e2ccd33359 Fix Clang-tidy modernize-use-nullptr and readability-simplify-boolean-expr warnings in source/Target/Target.cpp.
Simplify smart pointers checks in conditions.

llvm-svn: 255364
2015-12-11 19:52:15 +00:00
Todd Fiala a8fee7f981 Add expected timeout support to test event architecture.
llvm-svn: 255363
2015-12-11 19:44:23 +00:00
Zachary Turner 742afdb3d2 Remove -S option from dotest.py.
llvm-svn: 255361
2015-12-11 19:21:49 +00:00
Zachary Turner 6a188e6c1e Remove -r and -R options from dotest.py.
llvm-svn: 255360
2015-12-11 19:21:34 +00:00
Sean Callanan d38f4d288f DisassemblerLLVMC now gets the disassembler comments for an instruction
and appends them to our list of comments (which can additionally include
things like decoded addresses).

llvm-svn: 255358
2015-12-11 19:10:04 +00:00
Todd Fiala 9187f27e32 Add test event marking a test as explicitly eligible for rerun if it is marked flakey.
This will be used in a future change to support rerunning flakey tests
that hit a test result isue in a low-load, single worker test runner phase.

This is implemented as an additive-style event rather than being
evaluated and added to the start_test event because the decorator code
only runs after the start_test event is created and sent.  i.e.
LLDBTestResult.startTest() runs before the test method decorators run.

llvm-svn: 255351
2015-12-11 18:06:47 +00:00
Tamas Berghammer e43482b626 Create test for llvm.org/pr25806
LLDB don't detect the loading of a shared object file linked against the
main executable before the static initializers are executed for the
given module. Because of this it is not possible to get breakpoint hits
in these static initializers and to display proper debug info in case of
a crash in these codes.

llvm-svn: 255342
2015-12-11 16:24:14 +00:00
Pavel Labath 734a0b3f81 XFAIL TestLoadUnload for Windows->Android
llvm-svn: 255341
2015-12-11 16:16:51 +00:00
Ted Woodward ec2422364f Change finishSwigPythonLLDB.py to copy six.py instead of simlink it
Summary: If six.py is simlink'd, an installation won't be able to find it unless it has access to the source tree that lldb was built from.

Reviewers: zturner

Subscribers: lldb-commits

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

llvm-svn: 255340
2015-12-11 15:43:36 +00:00
Ewan Crawford cdfb1485be [RenderScript] Support for amd64 RS hooks
Adds support for reading a maximum of six integer arguments from a renderscript hook on X86_64.
Author: Luke Drummond <luke.drummond@codeplay.com>

llvm-svn: 255338
2015-12-11 13:49:21 +00:00
Pavel Labath 027158fad7 Revert "Turn on new test summary results by default."
The new test summary formatter does not honor the "expected timeout" markings, which makes our
buildbots all red. I'm switching it off by default until we figure out a way to make this work.

llvm-svn: 255335
2015-12-11 11:05:24 +00:00
Todd Fiala 07206ea19d test result details now print module.class.test_name in verbose mode.
And, turns off verbose mode by default.  This must have been switched
on as the default when somebody was testing.

llvm-svn: 255310
2015-12-10 23:14:24 +00:00
Kamil Rytarowski f5d34b7b9d Add NetBSD support in the buildDriver and buildLibrary routines
Summary: NetBSD is like FreeBSD and Linux in these routines.

Reviewers: clay.chang, tfiala, emaste, joerg

Subscribers: lldb-commits, emaste

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

llvm-svn: 255308
2015-12-10 22:56:56 +00:00
Zachary Turner 923fdbadae Remove the -y option from dotest.py.
llvm-svn: 255280
2015-12-10 18:52:09 +00:00
Zachary Turner 70ed57389a Remove the -x option from dotest.py.
llvm-svn: 255279
2015-12-10 18:51:40 +00:00
Zachary Turner 21accab1a7 Remove deprecated command line options from dotest.py
llvm-svn: 255278
2015-12-10 18:51:21 +00:00
Zachary Turner 80310c29fb Remove the --output-on-success command line argument from dotest.
llvm-svn: 255277
2015-12-10 18:51:02 +00:00
Zachary Turner 3cfa31492c Remove the -T option from dotest.py.
llvm-svn: 255276
2015-12-10 18:50:49 +00:00
Zachary Turner b08ab72427 Remove -w option from dotest.py.
llvm-svn: 255275
2015-12-10 18:50:32 +00:00
Ted Woodward bff0a21b57 Add Hexagon ABI to System Initialization
Summary: When the Hexagon ABI was added, it was inadvertently left out of initialization/termination. This patch adds it.

Reviewers: clayborg

Subscribers: lldb-commits

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

llvm-svn: 255268
2015-12-10 17:53:07 +00:00
Tamas Berghammer 257e13ae9a Add modules downloaded by ModuleCache to the global ModuleList
Adding the modules to the global module list eleminate issues in the
case when a module is unloaded from the target but some object (e.g.
breakpoint) still referencing them with weak pointers. It also speeds
up the case when we load, unload, load the same shared library because
the global module cache will keep the parsed debug info around between
the 2 load (this scenario happens for some code on android).

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

llvm-svn: 255260
2015-12-10 17:08:23 +00:00
Tamas Berghammer 7b93d66208 Switch to gold linker on android x86, x86_64, arm
These architectures already using the gold linker for the android
framework and switching to gold gives us the opportunity to enable ICF.

Safe ICF (identical code folding) reduces the size of an optimized and
striped binary by ~5%.

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

llvm-svn: 255240
2015-12-10 11:02:51 +00:00
Ewan Crawford 8b59062a32 [RenderScript] Refactor condition deciding when to JIT RS runtime
Patch creates a member function that decides when to JIT all the details about an allocation.
By checking for zero pointers we can avoid the situation where we store uninitialised data from previously inspecting the allocation during creation.

llvm-svn: 255238
2015-12-10 10:20:39 +00:00
Aidan Dodds 49ffb02a58 Differential Revision: http://reviews.llvm.org/D15333
llvm-svn: 255237
2015-12-10 10:11:49 +00:00
Todd Fiala 5d96dc5629 enable timeout/exceptional exit support for xUnit formatter
Also adds enable.py/disable.py script to simplify turning on and off
the issue_verification tests helpful for testing a results formatter.

llvm-svn: 255161
2015-12-09 22:02:31 +00:00
Zachary Turner 6c29ca7dd0 Put progress.py back, apparently this can't be deleted.
llvm-svn: 255159
2015-12-09 21:32:28 +00:00
Zachary Turner 94ea56bc8b Remove the -P option from dotest.py
This was an option to display a graphical progress bar.  Nobody
is using this, and it doesn't work correctly anyway with the new
result formatter.

llvm-svn: 255153
2015-12-09 20:48:59 +00:00
Zachary Turner 35a7610a05 Delete the -n command line option from dotest.py.
This removes the option to not print some one time version and
diagnostic information when running the test suite.

llvm-svn: 255152
2015-12-09 20:48:42 +00:00
Zachary Turner 6c9e44413f Remove the -i command line option from dotest.py.
This is part of a larger effort to remove unused command line
options from dotest.py.

llvm-svn: 255151
2015-12-09 20:48:31 +00:00
Zachary Turner d2a93fd6ca Delete the -F command line option from dotest.py.
This removes the failfast command line option as part of an effort
to simplify dotest and remove unused command line options.  You can
still Ctrl+C any time you want to exit early.

llvm-svn: 255150
2015-12-09 20:48:19 +00:00
Zachary Turner 76972031fa Remove -k command line option from dotest.py.
This is part of an effort to remove unused command line options.

llvm-svn: 255143
2015-12-09 19:45:51 +00:00
Zachary Turner 6c8733346a Remove -e option from dotest.py.
This is part of an effort to clean up dotest command line options
that are no longer used.

llvm-svn: 255142
2015-12-09 19:45:36 +00:00
Zachary Turner c816013641 Remove -libcxx option from dotest.py
Nobody was using this, and plus it can be achieved just as well
by using -E to set an environment variable.

llvm-svn: 255141
2015-12-09 19:45:16 +00:00
Todd Fiala d58476da79 Move XunitFormatter into its own xunit_formatter.py file.
llvm-svn: 255139
2015-12-09 19:32:14 +00:00
Todd Fiala 0a7c32b38e Fix new summary to include exceptional exit count in determining exit value
The main dotest.py should exit with a system return code of 1 on any
issue.  This change fixes a place where I omitted counting the
exceptional exit value to determine if we should return 1 when using the
new summary results.

This change also puts a banner around the Issue Details section that comes
before the Test Result Summary.

llvm-svn: 255138
2015-12-09 19:05:44 +00:00
Todd Fiala 29508491e5 Disable the issue verification tests.
llvm-svn: 255134
2015-12-09 18:24:47 +00:00
Todd Fiala f0cccb3189 create 3 issues for testbots: FAIL, ERROR (exceptional), and TIMEOUT
This change is a trial balloon to verify that the default test summary
output sends the right output for the buildbot issue detection script.

The effect of this change will be reverted after verifying the testbot
behavior.  This change will not stay in as is and will knowingly create
noise, see this thread:

http://lists.llvm.org/pipermail/lldb-dev/2015-December/009048.html

llvm-svn: 255131
2015-12-09 18:01:19 +00:00
Todd Fiala 1f99176fe5 Turn on new test summary results by default.
llvm-svn: 255130
2015-12-09 18:01:14 +00:00
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
Enrico Granata 4c2bf56850 Reduce memory traffic in ConstString in the std::map formatter
llvm-svn: 254787
2015-12-04 22:49:27 +00:00
Enrico Granata a0b75d7eb4 Do the same iterator caching optimization for std::map
This brings the timings down for 1500 elements from 166 to 2 seconds on my machine - if I can math correctly, that is a 98% improvement

llvm-svn: 254781
2015-12-04 22:25:52 +00:00
Adrian McCarthy 0c35cde9b1 Implement GetMemoryRegionInfo for mini dumps.
Differential Revision: http://reviews.llvm.org/D15218

llvm-svn: 254780
2015-12-04 22:22:15 +00:00
Enrico Granata 072bff8036 Add a similar benchmark for our std::map performance
llvm-svn: 254779
2015-12-04 22:16:14 +00:00
Kamil Rytarowski 8502545123 Fix typo in a comment
llvm-svn: 254768
2015-12-04 21:23:24 +00:00
Jim Ingham 9d27f1b0b2 Add documentation for SBTarget::CreateValueFromAddress.
llvm-svn: 254763
2015-12-04 20:16:51 +00:00
Enrico Granata 26935d9a09 Cache the incremental iterators as you traverse the list, so that you don't have to keep recomputing them
If memory turns out to be a problem, which I don't think it will in practice because all these ValueObjects, we'd be keeping alive anyway, I can always resort to caching the farthest-most iterator only

This gains us an order of magnitude in my benchmark, cutting the time to traverse a 1500-elements list from 22 seconds down to 2

llvm-svn: 254762
2015-12-04 20:12:46 +00:00
Enrico Granata ef4fa44ab8 Fix an issue where all tests marked with skip_if_callable would be skipped regardless of the actual callable
llvm-svn: 254758
2015-12-04 19:50:05 +00:00
Enrico Granata 367e2fe123 Improve the std::list data formatter to not need to calculate indices for every loop iteration
This saves about 5 seconds on a 1500 elements list from my local estimates

llvm-svn: 254757
2015-12-04 19:48:08 +00:00
Enrico Granata 61d8c13b67 Add a benchmark that validates how much time LLDB spends trying to fully print a fairly large std::list<T>
This is meant to help me track optimizations to the libc++ std::list data formatter

llvm-svn: 254755
2015-12-04 19:40:26 +00:00
Dawn Perchik f268357514 Fix breakpoint language filtering for other C variants (like C99) and Pascal.
This patch fixes setting breakpoints on symbol for variants of C and
Pascal where the language is "unknown" within the filter-by-language
process added in r252356. It also renames GetLanguageForSymbolByName to
GuessLanguageForSymbolByName and adds comments explaining the pitfalls
of the flawed assumption that the language can be determined solely from
the name and target.

Reviewed by: jingham
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D15175

llvm-svn: 254753
2015-12-04 19:34:00 +00:00
Todd Fiala c5011a8a1a Marked TestModulesInlineFunctions.py XFAIL
Tracked here:
https://llvm.org/bugs/show_bug.cgi?id=25743

llvm-svn: 254746
2015-12-04 18:52:02 +00:00
Todd Fiala 12777837a4 Fix test error in TestObjCCheckers.py
llvm-svn: 254744
2015-12-04 18:40:34 +00:00
Greg Clayton b1583dc67d Fill in the generic register kind if in AugmentRegisterInfoViaABI if it is available.
llvm-svn: 254743
2015-12-04 18:37:48 +00:00
Tamas Berghammer 6d73750b2a Improve the functionality of JSONNumber
* Add support for representing signed integers
* Add new constructors taking any signed or unsigned integer types

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

llvm-svn: 254715
2015-12-04 13:23:35 +00:00
Mohit K. Bhakkad 1e577e66e9 [LLDB][MIPS] Fix gdbremote_testcase.py
Patch by Nitesh Jain

Reviewers: clayborg, ovyalov.
Subscribers: jaydeep, bhushan, mohit.bhakkad, sagar.
Differential Revision: http://reviews.llvm.org/D15103

llvm-svn: 254711
2015-12-04 09:58:07 +00:00
Jaydeep Patil 56cb5ebae8 [LLDB][MIPS] XFAIL TestCrashDuringStep.py for MIPS
SUMMARY:
    Marked TestCrashDuringStep.py as XFAIL for MIPS. The test generates IO error due to breakpoint at invalid address.
    
    Reviewers: clayborg, labath
    Subscribers: nitesh.jain, mohit.bhakkad, sagar, bhushan and lldb-commits
    Differential Revision: http://reviews.llvm.org/D15182

llvm-svn: 254710
2015-12-04 09:56:36 +00:00
Jason Molenda afdf6cbf3c Add a space char so step logging doesn't print things like
"Stepping out from a.out`bar at a.c:3returning to frame"

llvm-svn: 254698
2015-12-04 02:52:49 +00:00
Enrico Granata f3129cbd84 Add a newline at the end of this file
llvm-svn: 254666
2015-12-03 23:53:45 +00:00
Oleksiy Vyalov 9ebe30b265 Fix in-memory section loading for JIT-ed code.
http://reviews.llvm.org/D15172

llvm-svn: 254638
2015-12-03 19:41:21 +00:00
Zachary Turner da6e77f718 Update .gitignore to include __pycache__ directories.
llvm-svn: 254634
2015-12-03 19:20:11 +00:00
Zachary Turner abb4420f57 Un XFAIL some tests that are now passing on Windows.
llvm-svn: 254633
2015-12-03 19:20:05 +00:00
Tamas Berghammer fcdde63ff4 Remove some duplicated code from PlatformPOSIX/Android
The code was duplicated to handle the custom symbol name for functions
in libdl.so for android. This change modify the way we handle the issue
to eliminate a lot of duplicated code.

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

llvm-svn: 254608
2015-12-03 12:58:03 +00:00
Tamas Berghammer f9a52f044c Fix TestLoadUnload for Windows -> POSIX remote debugging
Previously we used sys.os.path for appending target pathes what failed
when cased dlopen to fail on the target because of the '\'.

The fix won't work for local Windows tests but dlopen don't available
on Windows anyway so the test don't make sense in that context.

llvm-svn: 254602
2015-12-03 11:02:10 +00:00
Mohit K. Bhakkad 69035c8a5d [Fix] fix build failure due to rL254588
llvm-svn: 254593
2015-12-03 08:44:33 +00:00
Jaydeep Patil 7b531c1a11 [LLDB][MIPS] Using enum instead of a constant to fetch PC and CAUSE registers.
SUMMARY:
    Using enum instead of a constant to fetch PC and CAUSE registers.

llvm-svn: 254590
2015-12-03 06:41:24 +00:00
Mohit K. Bhakkad 8be7499507 [LLDB] Switch to assembly view if source is moved
Reviewers: clayborg, jingham, jasonmolenda.
Subscribers: jaydeep, bhushan, sagar, nitesh.jain,lldb-commits.
Differential Revision: http://reviews.llvm.org/D12877

llvm-svn: 254588
2015-12-03 04:56:16 +00:00
Zachary Turner fe868acafa Fix test result serialization to use bytes.
llvm-svn: 254563
2015-12-02 23:07:33 +00:00
Todd Fiala c84311163a Candidate fixes for python2/3 compatible string handling in pickling support.
llvm-svn: 254550
2015-12-02 21:45:15 +00:00
Todd Fiala 194913ffbe Make --results-file stdout implied if unspecified when using a results formatter.
Also cleans up pylint warnings (stock settings) in the modified function.

llvm-svn: 254546
2015-12-02 21:12:17 +00:00
Zachary Turner 7cc4477637 Use sub-commands instead of --mode={client,server}.
This is more pythonic and allows a more idiomatic way of getting
detailed usage information for each individual sub-command.

llvm-svn: 254533
2015-12-02 19:00:52 +00:00
Todd Fiala 46a4e34dcc Adds candidate formatter for replacing legacy summary results.
Also cleans up some usages of strings where symbolic names
were safer and made more sense.

Try a test run with something like this to check out the new
basic results formatter (not used by default):

time test/dotest.py --executable `pwd`/build/Debug/lldb --results-formatter lldbsuite.test.basic_results_formatter.BasicResultsFormatter --results-file stdout

This will yield something like:

Testing: 1 test suites, 8 threads
1 out of 1 test suites processed - TestHelp.py
Test Results
Total Test Methods Run (excluding reruns): 13
Test Method rerun count: 0

===================
Test Result Summary
===================
Success:              13
Expected Failure:      0
Failure:               0
Error:                 0
Unexpected Success:    0
Skip:                  0

Whereas something with a bit of error will look more like this:

42 out of 42 test suites processed - TestSymbolTable.py
Test Results
Total Test Methods Run (excluding reruns): 166
Test Method rerun count: 0

===================
Test Result Summary
===================
Success:              93
Expected Failure:     10
Failure:               2
Error:                 2
Unexpected Success:    0
Skip:                 59

Details:
FAIL:
TestModulesInlineFunctions.ModulesInlineFunctionsTestCase.test_expr_dsym
(/Users/tfiala/work/lldb-tot/git-svn/lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py)
FAIL:
TestModulesInlineFunctions.ModulesInlineFunctionsTestCase.test_expr_dwarf
(/Users/tfiala/work/lldb-tot/git-svn/lldb/packages/Python/lldbsuite/test/lang/objc/modules-inline-functions/TestModulesInlineFunctions.py)
ERROR: TestObjCCheckers.ObjCCheckerTestCase.test_objc_checker_dsym
(/Users/tfiala/work/lldb-tot/git-svn/lldb/packages/Python/lldbsuite/test/lang/objc/objc-checker/TestObjCCheckers.py)
ERROR: TestObjCCheckers.ObjCCheckerTestCase.test_objc_checker_dwarf
(/Users/tfiala/work/lldb-tot/git-svn/lldb/packages/Python/lldbsuite/test/lang/objc/objc-checker/TestObjCCheckers.py)

The Details header only prints if there are any issues to report.  The
Details section has tags that should get picked up using the normal
issue text scrapers (e.g. buildbot).

Test numbers reported are strictly test method runs.

The rerun bit at the top is in support of the multi-pass test
runner code (to run the low-load, single worker test pass for
tests that failed the first run), which I'll be able to put up
for review after this.

ResultsFormatters now have the ability to indicate they replace
the legacy summary, as this one does.

Once we come to agreement on the exact format, I will switch
us over to using this by default.

llvm-svn: 254530
2015-12-02 18:48:38 +00:00
Mohit K. Bhakkad 6846bc8de2 [LLDB][MIPS] fix watchpoint searched on client side for same masked variables
Reviewers: clayborg.
Subscribers: jaydeep, bhushan, sagar, nitesh.jain,lldb-commits.
Differential Revision: http://reviews.llvm.org/D15106

llvm-svn: 254522
2015-12-02 17:45:02 +00:00
Tamas Berghammer 2a7043cd70 XFAIL TestReturnValue for linux i386 clang 3.5-3.6
The test failing most likely because clang 3.5 and 3.6 uses an incorrect
ABI for returning small structs from  a function.

llvm-svn: 254507
2015-12-02 13:36:17 +00:00
Tamas Berghammer 3cb132a0f4 Fix "process load/unload" on android
On android the symbols exposed by libdl (dlopen, dlclose, dlerror)
prefixed by "__dl_". This change moves the handling of process
load/unload to the platform object and override it for android to
handle the special prefix.

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

llvm-svn: 254504
2015-12-02 11:58:51 +00:00
Tamas Berghammer fcf334b824 Revert "Added support for -gmodule debugging when debug info is left in the .o files on Darwin."
The commit caused a test failure on the linux buildbot in
TestDataFormatterSynthVal.

llvm-svn: 254502
2015-12-02 11:35:54 +00:00
Abhishek Aggarwal 296e063d8f PTRACE ABI to read FXSAVE area for 32-bit inferior
Summary:
 - Problem occurs when:
    -- 32-bit inferiors run on x86_32 machine and
       the architecture doesn't have AVX feature

    -- This causes FPRType to be set to eFPRTypeFXSAVE

    -- PTRACE_GETFPREGS was being used to read FXSAVE area

    -- For 32-bit inferiors running on x86_32 machine,
       PTRACE_GETFPREGS reads FSAVE area and not FXSAVE area

 - Changed ptrace API to PTRACE_GETREGSET for 32-bit inferiors
    -- This reads FPR data in FXSAVE format.
    -- For 64-bit inferiors, no change has been made.

 - Modified XFAIL for TestReturnValue.py
    -- Earlier, this test was passing for Linux OS
    -- Now, it passes for Android OS as well

Change-Id: Ieed72bc969b79516fc7b263b32493aa1e7a1a2ac
Signed-off-by: Abhishek Aggarwal <abhishek.a.aggarwal@intel.com>

Reviewers: ovyalov, jingham, lldb-commits, tberghammer, labath

Subscribers: jevinskie, labath, tberghammer, danalbert

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

llvm-svn: 254499
2015-12-02 09:40:17 +00:00
Greg Clayton 5dfc4a4d02 Added support for -gmodule debugging when debug info is left in the .o files on Darwin.
This is done by finding the types that are forward declarations that come from a module, and loading that module's debug info in a separate lldb_private::Module, and copying the type over into the current module using a ClangASTImporter object. ClangASTImporter objects are already used to copy types from on clang::ASTContext to another for expressions so the type copying code has been around for a while.

A new FindTypes variant was added to SymbolVendor and SymbolFile:

size_t
SymbolVendor::FindTypes (const std::vector<CompilerContext> &context, bool append, TypeMap& types);

size_t
SymbolVendor::FindTypes (const std::vector<CompilerContext> &context, bool append, TypeMap& types);

The CompilerContext is a way to represent the exact context of a type and pass it through an agnostic API boundary so that we can find that exact context elsewhere in another file. This was required here because we can have a module that has submodules, both of which have a "foo" type.

I am not able to add tests for this yet as we currently don't build our C/C++/ObjC binaries with the clang binary that we build. There are some driver issues where it can't find the header files for the C and C++ standard library which makes compiling these tests hard. We can't also guarantee that if we are building with clang that it supporst the exact format of -gmodule debugging that we are trying to test. We have had other versions of clang that had a different implementation of -gmodule debugging that we are no longer supporting, so we can't enable tests if we are building with clang without compiling something and looking at the structure of the DWARF that was generated to ensure that it is the format we can actually use.

llvm-svn: 254476
2015-12-02 00:43:32 +00:00
Pavel Labath 00fea63627 Revert "Fix race during process interruption"
The android buildbot gets quite flaky after this change. I'm reverting it while I investigate.

llvm-svn: 254430
2015-12-01 17:59:56 +00:00
Pavel Labath df55f522bd Fix race during process interruption
Summary:
The following situation was occuring in TestAttachResume:
- we did a "continue" from a breakpoint (which involves a private start-stop to step over the
  breakpoint)
- after receiving the stop-reply from the step-over, we issue a "detach" (which requires a
  process interrupt)
- at this moment, the public state is "running", private state is "about-to-be-stopped" (the
  stopped event was broadcast, but it was not received yet)
- StopForDestroyOrDetach (public thread) notes the public state is running, sends an interrupt
  request to the private thread
- private thread gets the eBroadcastBitInterrupt (before the eStateStopped message), and asks the
  process plugin to stop (via Halt())
- process plugin says it has nothing to do as the process is already stopped
- private thread shrugs and carries on. receives the stop event, restores the breakpoint and
  resumes the process.
- after a while, the public thread times out and says it failed to stop the process

This patch does the following:
- splits Halt() into two functions, private and public, their usage depends on the context
  - public Halt(): sends eBroadcastBitInterrupt to the private thread and waits for the Stop
    event
  - HaltPrivate(): asks the plugin to stop and makes a note that the halt was requested. When the
    next stop event comes it sets the interrupt flag on it.
- removes HijackPrivateProcessEvents(), as the only user (old Halt()) has gone away
- removes the m_currently_handling_event hack, as the new Halt() does not need it
- adds a use_run_lock parameter to public Halt() and WaitForProcessToStop(). This was needed
  because RunThreadPlan uses Halt() while holding the run lock and we don't want Halt() to take
  it away from him.

Reviewers: clayborg, jingham

Subscribers: lldb-commits

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

llvm-svn: 254403
2015-12-01 11:28:47 +00:00
Sagar Thakur d4eb7cc3f3 [LLDB][MIPS] Clear bug 25194 - LLDB-Server Assertion raised when single stepping on MIPS
This patch will clear bug 25194 - LLDB-Server Assertion raised when single stepping on MIPS. The problem was that while emulating instructions, old and new pc values would have garbage value in their upper 32 bits. Therefore checking if pc was changed (old_pc == new_pc) would always return false, because of which pc was not getting updated.

/* If we haven't changed the PC, change it here */
if (old_pc == new_pc)
{
    new_pc += 4;
    Context context;
        return false;
}

Reviewers: tberghammer, clayborg
Subscribers: dsanders, lldb-commits, mohit.bhakkad, bhushan, jaydeep, nitesh.jain
Differential: http://reviews.llvm.org/D14633
llvm-svn: 254379
2015-12-01 05:44:18 +00:00
Jaydeep Patil 27c25b1591 [LLDB][MIPS] Change ARCHFLAG for MIPS
SUMMARY:
    For MIPS, ARCH is specified without m.

    Reviewers: clayborg
    Subscribers: nitesh.jain, mohit.bhakkad, sagar, bhushan and lldb-commits
    Differential Revision: http://reviews.llvm.org/D14978

llvm-svn: 254376
2015-12-01 05:24:17 +00:00
Enrico Granata 7aafb6a1d5 Fix a bug where one-lining display of child values would ignore the user's choice of format
llvm-svn: 254349
2015-12-01 00:04:52 +00:00
Zachary Turner 6f12d3335d Unpack the output on the client, completing the cycle.
llvm-svn: 254341
2015-11-30 22:31:24 +00:00
Zachary Turner 24a95f852d Have swig_bot actually run swig, and send back the output.
llvm-svn: 254340
2015-11-30 22:31:13 +00:00
Adrian McCarthy fe06b5ad04 Fix hang in global static initialization
Differential Revision: http://reviews.llvm.org/D15092

llvm-svn: 254338
2015-11-30 22:18:43 +00:00
Ewan Crawford 8b244e21d7 [RS] Support RenderScript struct allocations
This patch adds functionality for dumping allocations of struct elements. This involves:

    + Jitting the runtime for details on all the struct fields.

    + Finding the name of the struct type by looking for a global variable of the same type, which will have been reflected back to the java host code.

    + Using this struct type name to pass into expression evaluation for pretty printing the data for the dump command.

llvm-svn: 254294
2015-11-30 10:29:49 +00:00
Pavel Labath abadc22172 [LLGS] Don't forward I/O when process is stopped
Summary:
This makes sure we do not attempt to send output over the gdb-remote protocol when the client is
not expecting it (i.e., after sending the stop-reply packet). Normally, this should not happen
(the process cannot generate output when it is stopped), but due to the fact that pty
communication is asynchronous in the linux kernel (llvm.org/pr25652), we may sometimes get this
output too late. Instead, we just hold the output, and send it next time we resume. This is not
ideal, but at least it makes sure we do not violate the remote protocol. Given that this happens
extremely rarely it's not worth trying to work around it with sleeps or something like that.

I also remove the m_stdio_communication_mutex, as all of LLGS is now single-threaded anyway.

Reviewers: tberghammer, ovyalov

Subscribers: lldb-commits

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

llvm-svn: 254200
2015-11-27 13:33:29 +00:00
Tamas Berghammer a88453b069 Re-add an xfail removed by r254163
The test is flakey but it fails too often with gcc 4.9.2 on x86_64 to
be marked only as expected flakey.

llvm-svn: 254194
2015-11-27 10:50:33 +00:00
Tamas Berghammer fd29986946 Fix TestRegisters.py on arm
Previously it tried to write a bit in the FPSCR register marked as
do not modify what failed on some device.

llvm-svn: 254166
2015-11-26 17:43:24 +00:00
Tamas Berghammer e4fbec4a37 Remove some xfail-s fixed by r253026
These tests were fixed by r253026 but they was failing on the linux
build bot because of a system setup problem. Remove xfail from them
after we fixed the build bot.

llvm-svn: 254163
2015-11-26 16:11:57 +00:00
Tamas Berghammer 54b0a1f8eb Make some of the tests in TestRegisters.py arm compatible
Differential revision: http://reviews.llvm.org/D15010

llvm-svn: 254153
2015-11-26 15:02:35 +00:00
Tamas Berghammer b4e95a50d7 Add 64/128 bit arm neon register definitions on linux
Differential revision: http://reviews.llvm.org/D14985

llvm-svn: 254152
2015-11-26 15:02:31 +00:00
Zachary Turner 5de07b078d Be *stupider* about what constitutes a supported language binding.
We were trying to be super smart and find all the supported language
bindings.  This led to us scanning the directory and treating all
subdirectories as language binding directories.  This makes it
hard to add unrelated code in this folder.

Besides, we only support one at the moment - Python.  And when new
ones are added it will be trivial to just add their names to a list.

So this patch gets stupider about how to look for language binding
subfolders.  Just put them in a list, and use the list.

llvm-svn: 254078
2015-11-25 17:49:47 +00:00
Pavel Labath 02559bbfd7 Enable TestMiBreak on Linux
test reliably passed last 100 buildbot runs. Enable it and see what happens.

llvm-svn: 254072
2015-11-25 16:29:04 +00:00
Zachary Turner 933626229b Another hack to fix the build bot.
This script really should not be assuming every subdirectory is
a language directory for swig generation.  Using a hack to get
this working for now, but this should be solved once this script
is re-written similar to how prepare_bindings was.

llvm-svn: 254037
2015-11-24 23:11:54 +00:00
Zachary Turner f6a30d3172 Fix build after swig_bot_lib changes.
llvm-svn: 254033
2015-11-24 22:27:02 +00:00
Zachary Turner 48102bd186 swig-bot - Close the socket when shutting down.
llvm-svn: 254026
2015-11-24 21:35:58 +00:00
Zachary Turner 9befc01064 Include config settings in the archive, and extract on the remote.
llvm-svn: 254025
2015-11-24 21:35:50 +00:00
Zachary Turner cc3609362e Make swig_bot server support Ctrl+C
llvm-svn: 254024
2015-11-24 21:35:40 +00:00
Zachary Turner 0a2899ca82 swig_bot remote path connection / preliminary implementation.
With this patch, the client will package up all the required
inputs into a compressed zip file, establish a connection to the
server, send the input to the server, and wait for the server to
send a response (in this case the response is just echoed back to
the client).

This gets the network communication in place, and in a subsequent
patch I will follow up with the code that actually runs swig on
the server and sends back the output instead of echoing back the
input.

llvm-svn: 254023
2015-11-24 21:35:32 +00:00
Zachary Turner 2db36097b4 First implementation of swig_bot.py
This version supports local generation only.  It's intentionally
stupid, and does not support any kind of dependency checking.
If you run the script, it's going to call SWIG.  While this is
a slow process, we are going to combine the use of the swig bot
with checked in static bindings, meaning that it won't be terribly
important to only regenerate the bindings when the input files
have actually changed.

A side benefit of this is that the implementation is drastically
simpler.

This is all experimental at the moment, but it duplicates a lot
of the logic currently found in prepare_bindings.py.  There was
not a good way to reuse some of the logic without invasive changes
on that script, and since this script is still experimental, it
makes sense to just copy them over, and if / when this becomes
more mature, we can get rid of the other ones.

llvm-svn: 254022
2015-11-24 21:35:17 +00:00
Ed Maste 860e29e0c3 Temporarily add expectedFailureFreeBSD to tests that fail to detect Clang on FreeBSD
On FreeBSD we may get Clang via CC=cc or CC=/usr/bin/cc.

llvm.org/pr25626

llvm-svn: 254006
2015-11-24 18:59:51 +00:00
Ed Maste 43bd918475 Add expectedFlakeyFreeBSD to TestBatchMode failing on buildbot
This test was already expectedFlakeyLinux for occasional failures on the
Linux buildbot. It seems the new FreeBSD buildbot fails the same way on
occasion.

llvm.org/pr25172

llvm-svn: 254002
2015-11-24 18:34:17 +00:00
Ed Maste ae82bf7947 Remove expectedFailureFreeBSD decorator from now-passing tests
These pass on my FreeBSD stable/10 desktop and my (not-yet-connected)
FreeBSD 11-CURRENT buildbot

llvm.org/pr20548

llvm-svn: 254001
2015-11-24 18:30:19 +00:00
Ed Maste 99ab4f42b7 Remove expectedFailureFreeBSD from passing ThreadExitTestCase::test_with_dwarf
This passes on my FreeBSD stable/10 desktop and my new FreeBSD
11-current buildbot (which is not yet hooked up to the buildmaster).

llvm.org/pr18190

llvm-svn: 254000
2015-11-24 18:22:37 +00:00
Ed Maste 3868a72d4c Add expectedFailureFreeBSD decorators for new Python fd leak
llvm.org/pr25624

llvm-svn: 253998
2015-11-24 18:05:56 +00:00
Omair Javaid 9d0f44bf8a Disable forcing -marm (A32 instruction set) while running testsuite on arm targets.
Differential revision: http://reviews.llvm.org/D14823

llvm-svn: 253973
2015-11-24 10:35:03 +00:00
Oleksiy Vyalov afd6ce4d29 Prevent ProcessGDBRemote from launching local debug server in case of remote debug server connection failure.
http://reviews.llvm.org/D14895

llvm-svn: 253906
2015-11-23 19:32:24 +00:00
Mohit K. Bhakkad 5a998ed7a6 [LLDB][MIPS] Getting 0 index for H/W watchpoint is not necessarily an error
Reviewers: jaydeep.
Subscribers: bhushan, sagar, nitesh.jain, lldb-commits.
Differential Revision: http://reviews.llvm.org/D14860

llvm-svn: 253864
2015-11-23 12:19:59 +00:00
Jason Molenda e92a74ce64 Add code to PlatformDarwin and HostInfoMacOSX so they return the
correct OS type when running on an apple tv or apple watch.
Also, in TargetList::CreateTargetInternal, check that a platform
is returned by GetPlatformForArchitecture fallback instead of 
adding it to the vector of platforms unconditionally; we can end up
crashing when we call a member function on it later.

<rdar://problem/23601982>, <rdar://problem/21292886>

llvm-svn: 253763
2015-11-21 04:00:43 +00:00
Zachary Turner a3037bd5f9 Create `lldbsuite.support.fs` and move `find_executable` there.
I have plans to reuse this function in another script, so raising
this out of prepare_bindings allows this.

llvm-svn: 253755
2015-11-21 01:39:04 +00:00
Greg Clayton 638b9275d8 Fix Xcode project after recent Windows core file changes.
llvm-svn: 253739
2015-11-20 23:53:53 +00:00
Adrian McCarthy f7d1893f5b Enable saving of mini dumps with lldb process save-core.
Also adds SB API to save a core and tests that use it.

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

llvm-svn: 253734
2015-11-20 23:09:11 +00:00
Sean Callanan aa4d7596f4 Newer versions of the ObjC runtime have an extra field in objc_opt_t.
llvm-svn: 253732
2015-11-20 22:59:57 +00:00
Siva Chandra 7dcad3178b Revert "Make skipIf support the not_in function (second attempt)."
Summary: This reverts commit 70dca28976ee8137acce2cc203dd394f4d761276.

Reviewers: amccarth, zturner

Subscribers: lldb-commits

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

llvm-svn: 253704
2015-11-20 20:30:36 +00:00
Ed Maste d550002c9d Call Platform::SetHostPlatform in the NetBSD platform only on NetBSD
Patch by Kamil Rytarowski

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

llvm-svn: 253699
2015-11-20 19:32:58 +00:00
Enrico Granata 7b57d87ed7 Use the system clang, since this support should now be in; does not un-xfail the test yet
llvm-svn: 253697
2015-11-20 19:25:39 +00:00
Adrian McCarthy f9a2697e13 Revert "FOO"
Accidentally commited before I was done.

This reverts commit 2ec2da4ee52780582d5e9c88b2e982a688fbdbe1.

llvm-svn: 253685
2015-11-20 18:18:21 +00:00
Adrian McCarthy af75dab383 FOO
llvm-svn: 253684
2015-11-20 18:15:14 +00:00
Adrian McCarthy 4d5d1dd6d5 Make skipIf support the not_in function (second attempt).
llvm-svn: 253683
2015-11-20 18:14:24 +00:00
Zachary Turner 4c152690be Remove `lldb.root` and just look for the file we care about.
llvm-svn: 253679
2015-11-20 17:40:57 +00:00
Tamas Berghammer a8dd275609 Use thumb instruction set for ldb-server on android arm
Differential revision: http://reviews.llvm.org/D14816

llvm-svn: 253657
2015-11-20 10:51:39 +00:00
Siva Chandra d2e90129d9 Revert "Make skipIf support the not_in function."
Summary:
This reverts commit 251965377bdfb6227eea42c12a792c059e4e8a4b
as a test marked "skipIf(compiler='gcc')" runs when testing with GCC.

Reviewers: amccarth

Subscribers: lldb-commits

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

llvm-svn: 253631
2015-11-20 01:54:24 +00:00
Adrian McCarthy 257da8ea50 Make skipIf support the not_in function.
llvm-svn: 253623
2015-11-20 00:11:38 +00:00
Greg Clayton 9d47212194 Fix a crasher in SymbolContext::SortTypeList() where something that was iterating over a std::multimap was actually mutating the list.
<rdar://problem/23605600>

llvm-svn: 253618
2015-11-19 23:10:45 +00:00
Greg Clayton 11922d2c1d Fixed Xcode build by adding the PlatformNetBSD code.
llvm-svn: 253616
2015-11-19 23:04:09 +00:00
Siva Chandra fc33b110bc Revert "Plug-in PlatformNetBSD initializer and terminator"
Summary:
This reverts commit 2354cd73101e58540b8b39783df462d06023309f as it
introduced a bunch regressions on the linux bot.

Reviewers: emaste, krytarowski

Subscribers: lldb-commits

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

llvm-svn: 253615
2015-11-19 22:58:48 +00:00
Enrico Granata 46252398f0 Fix up LLDB for a change in the way clang represents anonymous unions such that the 'frame variable' command can still find the members of such union as if they were top-level variables in the current scope
llvm-svn: 253613
2015-11-19 22:28:58 +00:00
Enrico Granata 55d99f0e7c Cleanup work required to get the ASAN tests to run in the new test suite infrastructure; the tests are now xfailed on Darwin pending investigation
llvm-svn: 253604
2015-11-19 21:45:07 +00:00
Ed Maste 3190d17b12 Plug-in PlatformNetBSD initializer and terminator
Patch by Kamil Rytarowski

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

llvm-svn: 253601
2015-11-19 21:30:22 +00:00
Enrico Granata 0cf8c0468d Fix an issue where LLDB would not launch argdumper correctly if there were spaces in the path to it
llvm-svn: 253599
2015-11-19 21:17:56 +00:00
Zachary Turner 7aac24805b Pass -fms-compatibility-version when building test inferiors.
-fms-compatibility-version defaults to VS 2013.  When using
VS 2015, this will lead to compilation failures of the test
inferiors in the C++ standard library for language conformance
reasons.

The fix here is to simply pass -fms-compatibility-version=19.0 when
we detect that a VS 2015 compiler is present.  Even though we're
actually using clang to do the compilation, clang uses this same
detection algorithm to determine the location of the standard
library.  So this check is tantanmount to saying "If clang is going
to find MSVC 2015's standard library, then pass 19.0 for
-fms-compatibility-version.

llvm-svn: 253589
2015-11-19 19:10:54 +00:00
Todd Fiala f6508db485 Revert "prepare_bindings.py: enable static bindings"
This reverts commit 40f789f2dc6bb80fd25a33f91e452d081ed9d0ee.

llvm-svn: 253575
2015-11-19 16:56:12 +00:00
Sagar Thakur 9bf1528573 [LLDB][MIPS] Fix lldbplatformutil.py Failure
Patch by Nitesh Jain

Summary: This patch check whether first register is readable.

Subscribers: lldb-commits, mohit.bhakkad, sagar, bhushan
Reviewers: clayborg, ovyalov, jaydeep
Differential: http://reviews.llvm.org/D14635
llvm-svn: 253555
2015-11-19 11:01:21 +00:00
Jason Molenda f638ffddba I like how PlatformAndroid/PlatformLinux log when their platforms
try to CreateInstance, and log the results.  I copied that for the
Mac platforms.

llvm-svn: 253538
2015-11-19 03:15:37 +00:00
Enrico Granata 293207dd57 Pass the ExecutionContext as well, since it is actually useful
llvm-svn: 253537
2015-11-19 02:50:27 +00:00
Enrico Granata d4129b47d0 Allow the language plugins a say in how the function name is rendered as part of frame formatting
llvm-svn: 253531
2015-11-19 01:11:53 +00:00
Todd Fiala 223f4bb9b2 Remove superseded buildSwigWrapperClasses.py and buildSwigPython.py classes
This closes:
http://reviews.llvm.org/D14783

llvm-svn: 253513
2015-11-18 22:21:47 +00:00
Siva Chandra c7ac7d7a9b [TestExitDuringStep] Adjust after a recent type map change.
Reviewers: zturner

Subscribers: lldb-commits

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

llvm-svn: 253505
2015-11-18 21:22:29 +00:00
Zachary Turner cc2e76d57f Fix CMake dependency on lldb.py
llvm-svn: 253501
2015-11-18 21:09:55 +00:00
Enrico Granata 3de08c5f0c Reapply r253423 and r253424 (which cleanup the data formatters iteration model, as well as the type X list commands), along with a change by Zachary Turner to bypass a MSVC bug with SFINAE
llvm-svn: 253493
2015-11-18 19:42:44 +00:00
Todd Fiala a52e2c8376 Remove the scripts/Python/build-swig-Python.sh script.
This logically goes with my previous commit.

llvm-svn: 253491
2015-11-18 19:37:51 +00:00
Todd Fiala f6b2aa5882 remove defunct scripts/build-swig-wrapper-classes.sh; switch autoconf build to prepare_bindings.py.
Xcode moved off of build-swig-wrapper-classes.sh earlier this week.

llvm-svn: 253490
2015-11-18 19:34:03 +00:00
Ying Chen ca922bb9b9 Support unix-abstract-connect scheme as platform url in lldb testsuite
Reviewers: ovyalov

Subscribers: lldb-commits

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

llvm-svn: 253488
2015-11-18 19:03:20 +00:00
Zachary Turner 48ef8d4c37 Fix some issues with swig & string conversion.
This patch fixes two issues:

1) Popen needs to be used with universal_newlines=True by default.
   This elicits automatic decoding from bytes -> string in Py3,
   and has no negative effects in other Py versions.
2) The swig typemaps for converting between string and (char*, int)
   did not work correctly when the length of the string was 0,
   indicating an error.  In this case we would try to construct a
   string from uninitialized data.
3) Ironically, the bug mentioned in #2 led to a test passing on
   Windows that was actually broken, because the test was written
   such that the assertion was never even getting checked, so it
   passed by default.  So we additionally fix this test to also
   fail if the method errors.  By fixing this test it's now broken
   on Windows, so we also xfail it.

llvm-svn: 253487
2015-11-18 18:40:16 +00:00
Todd Fiala 7d1da7e91c Switched cmake build from using buildSwigWrapperClases.py to the cleaned up version.
This change does not introduce static bindings.  It is simply using
the pylinted cleaned up code in prepare_bindings.py.

If this breaks anyting, I'll revert immediately and figure out what
needs to be addressed.  I'm looking to wrap up
the cleanup aspect of the code change (pylinted, removal of code that
implements existing python stdlib code, fixes for Xcode adoption, etc.).

llvm-svn: 253478
2015-11-18 17:36:15 +00:00
Tamas Berghammer 68aa90a11e Revert 2 commits breaking the MSVC build
Revert "Remove a few vestigial typedefs from the old world"
This reverts commit 05872cda2a00fbd988c4fc761b1f87fe9edce224.

Revert "Cleanup the type X list commands to use the new ForEach goodness"
This reverts commit 85b1d83819a22cdc9ef12f58fd4fa92b473a4f81.

llvm-svn: 253455
2015-11-18 12:11:34 +00:00
Todd Fiala d434a1d3e0 prepare_bindings.py: enable static bindings
Added a new flag, --allow-static-binding.  When specified,
if (and only if) the swig binary cannot be found, then the
LLDBWrapPython.cpp and lldb.py from the
scripts/Python/{static-binding-dir} are copied into the place where
swig would have generated them.

{static-binding-dir} defaults to static-binding, and can be
overridden with the --static-binding-dir command line argument.

The static bindings checked in are from r253424.

llvm-svn: 253448
2015-11-18 08:52:33 +00:00
Sagar Thakur 64dab75c41 [LLDB][MIPS] Fix TestDisassembleBreakpoint.py for MIPS
Patch by Nitesh Jain

Summary: The break is opcode for breakpoint instruction.

Subscribers: lldb-commits, mohit.bhakkad, sagar, bhushan
Reviewers: clayborg, ovyalov, jaydeep
Differential: http://reviews.llvm.org/D14634
llvm-svn: 253445
2015-11-18 08:18:03 +00:00
Sagar Thakur 78086742f3 [MIPS][LLDB]Fix TestBreakpointCondition.py for MIPS
Patch by Nitesh Jain

Summary: The self.getArchitecture() returns the architecture based on the value of -A flag passed to dotest.py script.
There are many possible values for MIPS to this option (like mips32r2, mips32r6, mips64, mips64r2,.... ).
This patch uses re.match(mips,arch) to check if architecture string starts with mips.

Subscribers: lldb-commits, mohit.bhakkad, sagar, bhushan, jaydeep
Reviewers: clayborg, ovyalov
Differential: http://reviews.llvm.org/D14493
llvm-svn: 253444
2015-11-18 08:12:34 +00:00
Enrico Granata 0481df6af4 Remove a few vestigial typedefs from the old world
llvm-svn: 253424
2015-11-18 01:44:36 +00:00
Enrico Granata a76e894bd5 Cleanup the type X list commands to use the new ForEach goodness
llvm-svn: 253423
2015-11-18 01:37:49 +00:00
Enrico Granata a2afcc9911 Cleanup indentation
llvm-svn: 253383
2015-11-17 21:55:09 +00:00
Enrico Granata 32936810c3 Cleanup the type X clear commands, so that one base class can implement all of them
llvm-svn: 253381
2015-11-17 21:43:55 +00:00
Enrico Granata be2e5fac68 Move this back to a pid_t; this file is OSX only anyway, and the signedness of pid_t is actually a thing we want here
llvm-svn: 253364
2015-11-17 19:35:26 +00:00
Todd Fiala 6eac09ecda Remove --swig-executable `which swig` from Xcode prepare_bindings.py call.
This is no longer needed with --find-swig, and although innocuous on systems with
swig in the path, it blows up when there is no swig in the path.  This should
have been removed in the prior check-in.

llvm-svn: 253353
2015-11-17 18:10:54 +00:00
Todd Fiala 090084193f Reinstate Xcode project usage of prepare_bindings.py, with new --find-swig option set.
llvm-svn: 253347
2015-11-17 17:13:09 +00:00
Todd Fiala 9af81570c7 Added --find-swig option to allow searching for swig in path or other likely locations.
llvm-svn: 253346
2015-11-17 17:13:06 +00:00
Todd Fiala 9db6bd229c Revert out Xcode hookup of r253317.
The green dragon OS X builder doesn't have swig on the path.
I need to enable behavior where we can look for it
in some well known spots.

llvm-svn: 253319
2015-11-17 07:56:42 +00:00
Todd Fiala 84c72b6d75 Add Pythonic language binding wrapper generation script.
This is only used by Xcode at the moment.  It replaces the
buildSwigWrapperClasses.py and related per-script-language
scripts.  It also fixes a couple bugs in those w/r/t Xcode
usage:

* the presence of the GCC_PREPROCESSOR_DEFINITIONS env var
  should not be short-circuiting generation of the language
  binding; rather, only if LLDB_DISABLE_PYTHON is present
  within that environment variable.

* some logic around what to do when building in "non-Makefile"
  mode.  I've switched the handling of that to be on a
  "--framework" flag - if specified, we build an OS X-style
  framework; otherwise, we go with non.

Putting this up now only attached to the Xcode build so
others can look at it but not be affected by it yet.
After this, I'll tackle the finalizer, along with trying
it locally on Linux.

llvm-svn: 253317
2015-11-17 07:17:38 +00:00
Jim Ingham 055a08a488 Add the ability (through the SB API & command line) to specify an address
breakpoint as "file address" so that the address breakpoint will track that
module even if it gets loaded in a different place.  Also fixed the Address
breakpoint resolver so that it handles this tracking correctly.

llvm-svn: 253308
2015-11-17 03:39:13 +00:00
Zachary Turner ba1057022c Python 3 - Skip a certain test for a particular (swig,python) combo.
Current versions of SWIG have a bug with Python 3 that causes
Python to assert when iterating over a generator.  This patch
skips the test for the right combination of Python version and
SWIG version.  I'm attempting to upstream a patch to SWIG to
fix this in a subsequent as-of-yet unreleased version, but
I don't know how long that will take.

llvm-svn: 253273
2015-11-16 23:58:20 +00:00
Ying Chen 0c35282c65 Re-Apply "Add a "not_in()" function you can apply to the list type arguments to expectedFailureAll ..." with fix
Summary:
- Re-Commit r253106
- Initialize self.debug_info in Base::setUp()
- Fix argument order when calling check_list_or_lambda for compiler

Reviewers: jingham

Subscribers: lldb-commits

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

llvm-svn: 253272
2015-11-16 23:41:02 +00:00
Zachary Turner abdb839228 Add the ability to xfail or skip based on swig / python version.
llvm-svn: 253263
2015-11-16 22:40:30 +00:00
Zachary Turner eddf19f995 Insert the SWIG version into LLDB's __init__.py
The goal here is to allow us to add skip / xfail decorators
based on SWIG version.

llvm-svn: 253262
2015-11-16 22:40:20 +00:00
Zachary Turner 32ac147b00 Python3 - Fix some issues related to `PythonFile` class.
Python 3 has lots of new debug asserts, and some of these were
firing on PythonFile.  Specifically related to handling of invalid
files.

llvm-svn: 253261
2015-11-16 22:40:12 +00:00
Pavel Labath 311cc7d133 Revert "Add a "not_in()" function you can apply to the list type arguments to expectedFailureAll to reverse"
This reverts commit r253106.

llvm-svn: 253197
2015-11-16 11:11:10 +00:00
Bruce Mitchener b5c891908d Add more autotools/gmake NetBSD glue
Summary: This diff approaches building the project natively on NetBSD with the autoconf/gmake framework.

Patch by Kamil Rytarowski. Thanks!

Reviewers: emaste, clayborg

Subscribers: tberghammer, joerg, brucem, lldb-commits

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

llvm-svn: 253153
2015-11-15 02:00:09 +00:00
Bruce Mitchener 60cd65aac2 Allow to override python-config executable name from command line
Summary: pkgsrc (on NetBSD) ships with python2.7-config.

Patch by Kamil Rytarowski. Thanks!

Reviewers: emaste, clayborg

Subscribers: brucem, lldb-commits, joerg

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

llvm-svn: 253152
2015-11-15 01:56:21 +00:00
Bruce Mitchener eb0a6f4308 Use library discovery for curses and panel
Summary:
This approach is tunable with custom paths for curses library.

It also detects whether there are requirements met.

I make use of it on NetBSD.

Patch by Kamil Rytarowski. Thanks!

Reviewers: clayborg

Subscribers: brucem, joerg, lldb-commits

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

llvm-svn: 253151
2015-11-15 01:53:23 +00:00
Enrico Granata 4fc8416181 Uniquify all the type X delete commands via one common base class
This removes a lot of code, which is A Good Thing(TM)

llvm-svn: 253140
2015-11-14 18:44:37 +00:00
Enrico Granata f7aaf04743 Some cleanup of the type X delete command
llvm-svn: 253137
2015-11-14 18:17:33 +00:00
Enrico Granata b56d01033e The existing logic to loop over formatters is very pre-C++11, using void* batons, and function pointers, and raw memory allocations instead of safer more modern constructs
This is a first pass at a cleanup of that code, modernizing the "type X clear" commands, and providing the basic infrastructure I plan to use all over
More cleanup will come over the next few days

llvm-svn: 253125
2015-11-14 05:44:23 +00:00
Enrico Granata 54c22c2245 Fixes for uniformity in type clear and delete commands
llvm-svn: 253113
2015-11-14 01:09:07 +00:00
Sean Callanan 92655f58bc Always initialize expression variables' flags field.
llvm-svn: 253112
2015-11-14 01:05:33 +00:00
Enrico Granata e86e425945 Add a few useful accessors on the data formatters containers
llvm-svn: 253111
2015-11-14 00:58:37 +00:00
Enrico Granata 6f6f7396ba Minor cleanup to the type format list command
llvm-svn: 253110
2015-11-14 00:58:21 +00:00
Jim Ingham 6d048942c5 Add a "not_in()" function you can apply to the list type arguments to expectedFailureAll to reverse
the sense of the test.

llvm-svn: 253106
2015-11-14 00:20:33 +00:00
Sean Callanan a2c156edad Fixed a testcase problem where disassembly would fail for nameless functions.
llvm-svn: 253101
2015-11-13 23:00:33 +00:00
Jim Ingham dfe0e99517 Change the test to use the instruction list to get the consecutive addresses to break on. Rerunning
was being foiled by ASLR.

llvm-svn: 253094
2015-11-13 22:19:08 +00:00
Enrico Granata 89d8ef7ee3 Upstream some data formatter related cleanups
llvm-svn: 253093
2015-11-13 21:55:41 +00:00
Zachary Turner 8f186f8574 Change the null check to an assert.
llvm-svn: 253092
2015-11-13 21:53:03 +00:00
Enrico Granata c26332abbd Fix indentation
llvm-svn: 253089
2015-11-13 21:37:47 +00:00
Zachary Turner c12392c956 Remove debugging code left in by accident.
llvm-svn: 253088
2015-11-13 21:35:07 +00:00
Enrico Granata 920c587e64 Fix indentation
llvm-svn: 253087
2015-11-13 21:34:39 +00:00
Zachary Turner 0ee8282f4a Add a null check against the ThreadPlan
I'm seeing some cases where the ThreadPlan is null.  It could
be a sign of a valid race condition, but at least we shouldn't
crash.

llvm-svn: 253086
2015-11-13 21:28:53 +00:00