Commit Graph

13725 Commits

Author SHA1 Message Date
Ed Maste 6558008935 Remove unused variable
Obtained from FreeBSD r292611

llvm-svn: 256724
2016-01-04 02:10:22 +00:00
Ed Maste 81b4c5f236 Strip trailing whitespace
(There are changes in the copies of these four files in the FreeBSD base
system, and I've changed these ones to reduce gratuitous diffs in future
imports.)

llvm-svn: 256723
2016-01-04 01:43:47 +00:00
Chandler Carruth 34f373cd05 [ptr-traits] Add an #include to provide the complete type for Section
which is the pointee in a pointer keyed DenseMap.

Pointer keys in a DenseMap have their low bits used by the map
implementation and in order to do this safely we need to know the
alignment of the pointer. We can only do this if we have the complete
type of the pointee. This is part of larger cleanup across LLVM and
subprojects to allow us to start enforcing this strictly.

llvm-svn: 256616
2015-12-30 03:48:24 +00:00
Zachary Turner 5075c99f27 Update .clang-format file to support break after return type.
This depends on having a recently built version of clang-format
installed, as the patch to support this behavior was only just
recently added to clang-format.

llvm-svn: 256526
2015-12-28 22:09:29 +00:00
David Majnemer 48a065d2ea Update LLDB to account for Clang r256463
llvm-svn: 256464
2015-12-27 07:16:55 +00:00
Craig Topper b347df8757 Include IR/DerivedTypes.h instead of IR/Type.h so to match llvm change r256406.
llvm-svn: 256407
2015-12-25 05:18:31 +00:00
Mohit K. Bhakkad f6ef187b9b [LLDB] Fix Read/Write memory to be compatible with both endians
Reviewers: tberghammer.
Subscribers:  jaydeep, bhushan, sagar, nitesh.jain,lldb-commits.
Differential Revision: http://reviews.llvm.org/D15738

llvm-svn: 256331
2015-12-23 12:34:58 +00:00
Adrian McCarthy 46155dd7a9 Allow test decorators to use lists (and not_in(list)) for arches
Differential Revision: https://mail.google.com/mail/u/0/?zx=w4areffgjbgg#inbox/151cb6afe6169bb0

llvm-svn: 256283
2015-12-22 21:01:21 +00:00
Ed Maste 5784ae2d67 XFAIL TestCppNsImport on FreeBSD
It has an existing XFAIL annotation for GCC >= 4.9 but it also fails on
FreeBSD 10.x with Clang 3.4.1.

llvm.org/pr25925

llvm-svn: 256270
2015-12-22 19:10:09 +00:00
Ed Maste 7637905318 Add expectedFailureFreeBSD to an additional thread state test failing on FreeBSD
This new failure has been noted in the existing PR, llvm.org/pr15824

llvm-svn: 256268
2015-12-22 19:08:46 +00:00
Todd Fiala e4beddce55 skip TestEvents.py on Darwin
This is generating a SIGSEGV somewhere around 1 in 10 runs on OS X.

Skip the whole test to avoid testbot noise until we can get the
SIGSEGV addressed.

Tracking with:
https://llvm.org/bugs/show_bug.cgi?id=25924

llvm-svn: 256257
2015-12-22 17:24:31 +00:00
Todd Fiala 5bdbef649b test infra: fix lldbinline tests to work with rerun
Fixes:
https://llvm.org/bugs/show_bug.cgi?id=25922

llvm-svn: 256255
2015-12-22 17:14:47 +00:00
Adrian McCarthy c2961ab889 Improve error handling for `frame select` command when there are too many arguments.
Bug:  https://llvm.org/bugs/show_bug.cgi?id=25847

It now gives a more specific error message and then returns instead of trying to select the wrong frame.

llvm-svn: 256251
2015-12-22 16:50:28 +00:00
Ed Maste 1ca9cda583 Add expectedFailureFreeBSD to tests failing in the same way as on Linux
llvm.org/pr25819

llvm-svn: 256250
2015-12-22 16:47:04 +00:00
Ed Maste 4d156ae0c8 Remove PC -1 offset from FreeBSD arm64 UpdateAfterBreakpoint
It was a copy-and-paste leftover.

llvm-svn: 256248
2015-12-22 15:57:21 +00:00
Tamas Berghammer cfcdbde3ce Don't pack the structs of the jit debug interface
None of the documentation mentions that the entries are packed structs
and also none of the other implementation I found pack them.

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

llvm-svn: 256244
2015-12-22 15:23:33 +00:00
Enrico Granata c3281bd05c No need for a custom function here; just use what C provides
llvm-svn: 256223
2015-12-22 00:47:36 +00:00
Enrico Granata ef8dde6269 Reduce code duplication
llvm-svn: 256212
2015-12-21 23:10:17 +00:00
Tamas Berghammer fde63cad6b Fix emulation of the thumb str instruction
llvm-svn: 256147
2015-12-21 12:06:36 +00:00
Siva Chandra ea35dbeff2 [TestCPPAuto] On linux, we need -fno-limit-debug-info.
Summary: Also xfailed for GCC as there is an problem with debug info generation.

Reviewers: granata.enrico

Subscribers: lldb-commits

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

llvm-svn: 256067
2015-12-19 00:52:29 +00:00
Todd Fiala bfc2dc7ab7 Xcode: remove --test-subdir test reduction from previous check-in
That was not meant to go in, as it was for testing my last change.

llvm-svn: 256062
2015-12-18 23:22:15 +00:00
Todd Fiala a350a94646 Xcode build: pass in vt100 to the Python test runner.
Some of the Green Dragon tests were failing because they didn't
have a TERM set.

llvm-svn: 256059
2015-12-18 23:12:19 +00:00
Enrico Granata 31ccb51a7f __ne__ is the actual Python operator; __neq__ is a typo
llvm-svn: 256053
2015-12-18 22:46:58 +00:00
Enrico Granata 36f51e4c97 Add support for seeing through clang::AutoType in ClangASTContext
This allows LLDB to deal correctly with expression result variables declared via the C++11 'auto' keyword

rdar://problem/23960490

llvm-svn: 256051
2015-12-18 22:41:25 +00:00
Todd Fiala e78b3e6fcf remove xcshareddata exclusion from .gitignore; add desktop and lldb-python-testsuite shared schemes used by Xcode buildbot
llvm-svn: 256043
2015-12-18 22:08:24 +00:00
Enrico Granata 11799e1529 Turns out, many people define structs named Point that do not share the same names that this formatter uses for fields; use the {} syntax to make it so that a failure to parse the summary doesn't cause the entire printout to fail
llvm-svn: 256042
2015-12-18 22:04:47 +00:00
Enrico Granata 828eb2173b Add a test case that validates that my change in r255603 does the right thing
llvm-svn: 256034
2015-12-18 21:35:21 +00:00
Enrico Granata e242624ca9 Add API to support retrieving the formatters category for a specific language
llvm-svn: 256033
2015-12-18 21:25:24 +00:00
Todd Fiala 9c533783c1 Xcode build: add a lldb-python-test-suite target.
The llvm.org Green Dragon OS X lldb builder will be using this
target to run the LLDB Python test suite.

llvm-svn: 256027
2015-12-18 20:44:45 +00:00
Todd Fiala 2094c03803 mark TestGlobalVariables.py as XFAIL on OS X dwarf.
tracking bug:
https://llvm.org/bugs/show_bug.cgi?id=25872

llvm-svn: 256006
2015-12-18 18:40:33 +00:00
Tamas Berghammer 6517b004b2 Fix the emulation of arm strd instruction
The incorrect instruction emulation caused issues in the stack unwinding
code when strd was used to push 2 register to the stack with writeback.

llvm-svn: 256000
2015-12-18 15:35:08 +00:00
Jim Ingham 277dc3f4d5 Fix formatting for last commit.
llvm-svn: 255973
2015-12-18 02:15:25 +00:00
Jim Ingham a202357197 Make the Language print the description of the Exception Breakpoint resolver. Also
have the breakpoint description print the precondition description if one exists.
No behavior change.

<rdar://problem/22885189>

llvm-svn: 255972
2015-12-18 02:14:04 +00:00
Jason Molenda 545304d323 The lldb side changes to go along with r255711 where a new
"thread-pcs" key is added to the T (questionmark) packet in
gdb-remote protocol so that lldb doesn't need to query the
pc values of every thread before it resumes a process.

The only odd part with this is that I'm sending the pc 
values in big endian order, so we need to know the endianness
of the remote process before we can use them.  All other
register values in gdb-remote protocol are sent in native-endian
format so this requirement doesn't exist.  This addition is a
performance enhancement -- lldb will fall back to querying the
pc of each thread individually if it needs to -- so when
we don't have the byte order for the process yet, we don't
use these values.  Practically speaking, the only way I've 
been able to elicit this condition is for the first
T packet when we attach to a process.

<rdar://problem/21963031> 

llvm-svn: 255942
2015-12-18 00:45:35 +00:00
Todd Fiala 51c8c8f372 Revert "Disable test reruns on arm unless explicitly marked with --rerun-all-issues"
and
Revert "prevent rerun logic from kicking in on test runs including aarch64."

This reverts commits:
r255719
r255747

llvm-svn: 255935
2015-12-17 22:42:50 +00:00
Todd Fiala 1ad3bba747 ResultsFormatter: always lock on handle_event()
Some of the newer structures were not protected.  Now that we have
a recursive lock, we just lock the whole handle_event() call.

llvm-svn: 255917
2015-12-17 19:13:58 +00:00
Ewan Crawford 2e9207150a [RenderScript] Support all RS allocation types
Currently we can just inspect the details of the most common allocation types.
This patch allows us to support all the types defined by the RS runtime in its `RsDataType` enum.
Including handlers, matrices and packed graphical data.

llvm-svn: 255904
2015-12-17 16:40:05 +00:00
Aidan Dodds a15b44c967 Patch cmake to allow detection of python 2.7.9+
Some distributions of python have their version defined as follows in patchlevel.h (note the '+'):
#define PY_VERSION "2.7.9+"
The '+' char needs to be stripped by the cmake regex so that LLDBs python lib detection is successful.

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

llvm-svn: 255893
2015-12-17 14:13:39 +00:00
Ewan Crawford 37395ad211 Inspect DW_AT_const_value global static const variables
This patch adds support for printing global static const variables which are given a DW_AT_const_value DWARF tag by clang.

Fix for bug https://llvm.org/bugs/show_bug.cgi?id=25653

Reviewers: clayborg, tberghammer
Subscribers: emaste, lldb-commits
Differential Revision: http://reviews.llvm.org/D15576

llvm-svn: 255887
2015-12-17 11:59:47 +00:00
Tamas Berghammer 0e59c516c4 XFAIL some tests failing for Windows -> Android
llvm-svn: 255885
2015-12-17 10:58:35 +00:00
Pavel Labath a6c8217c25 Add AccessModifierOffset to clang-format style
Summary:
As we override the indent option of the LLVM style, we need to override the access modifier
offset as well. Otherwise, classes will be formatted like such
class A
{
  public:
    int foo;
};
which is not used anywhere in LLDB. This option makes clang-format style more similar to LLDB and
brings it closer to the original intention of LLVM style, which was to not indent access
modifiers.

Reviewers: zturner, tfiala

Subscribers: lldb-commits

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

llvm-svn: 255882
2015-12-17 09:19:36 +00:00
Todd Fiala 8fbad24d18 test infra: force rerun to use parallel runner
We've now seen the rerun test phase hang in a few
scenarios.  Eliminate the serial test runner (which
is not exercised nearly as much as the others), by
using a multi-worker test runner strategy with a single
worker.  This should rule out whether this is related
to the serial test runner strategy.

llvm-svn: 255880
2015-12-17 06:55:50 +00:00
Kate Stone ef8b4e22f7 Set the minimum stack size for private state thread to 8MB
Demangling complex Boost symbols can exhaust the default stack size.  In practice, any thread that calls into LLDB functionality that touches symbols runs this risk.  Guaranteeing a reasonable minimum for our own private state thread addressees some known scenarios debugging processes that make use of cpp-netlib.

llvm-svn: 255868
2015-12-17 01:37:00 +00:00
Greg Clayton 3feddff744 Don't demangle a name when Mangled::GetName() is called with ePreferMangled. Only demangle if this isn't the the value for the "preference" argument indicating the user wants the demangled name. This will stop a lot of symbols from being demangled when parsing the symbol table in ObjectFileMachO.
llvm-svn: 255864
2015-12-17 01:00:50 +00:00
Greg Clayton 8b8874edbc Don't strip types of their typedefs when getting function types.
llvm-svn: 255863
2015-12-17 00:58:41 +00:00
Dawn Perchik bfd96183ef Rework breakpoint language filtering to use the symbol context's language.
This patch reworks the breakpoint filter-by-language patch to use the
symbol context instead of trying to guess the language solely from the
symbol's name. This has the advantage that symbols compiled with debug
info will have their actual language known. Symbols without debug info
will still do the same "guess"ing because Symbol::GetLanguage() is
implemented using Mangled::GuessLanguage(). The recognition of ObjC
names was merged into Mangled::GuessLanguage.

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

llvm-svn: 255808
2015-12-16 19:40:00 +00:00
Todd Fiala 271186bbb6 Remove the "MacOSX and Linux" and "Linux" targets from Xcode.
I added these long ago, but as we work to simplify the Xcode
project, their lack of use has made them cleanup targets.

llvm-svn: 255775
2015-12-16 16:09:59 +00:00
Ed Maste a6b380652d Wrap Notes in --help output to 80 columns
llvm-svn: 255774
2015-12-16 15:49:38 +00:00
Ed Maste f7fe3b99c7 Include -c, -core in the lldb(1) man page
llvm-svn: 255771
2015-12-16 15:37:21 +00:00
Ed Maste d4ff820fb8 Man page whitespace/formatting change to appease igor(1)
igor is a tool to detect common problems and style conformance issues in
man pages and other documents.  This is a non-content change to address
the items it reported, before making content changes.

See http://www.wonkity.com/~wblock/igor/igor.1.html for more information
about igor(1).

llvm-svn: 255769
2015-12-16 14:59:48 +00:00
Pavel Labath 25e241b006 [test] Add ability to expect timeouts
Summary:
This adds ability to mark test that do not complete due to hangs, crashes, etc., as "expected",
to avoid flagging the build red for a known problem. Functionally, this extends the scope of the
existing expectedFailureXXX decorators to cover these states as well. Once this is in, I will
start replacing the magic list of failing tests in dosep.py with our regular annotations which
should hopefully make code simpler.

Reviewers: tfiala

Subscribers: lldb-commits

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

llvm-svn: 255763
2015-12-16 12:09:45 +00:00
Todd Fiala cd817ba2ef Disable test reruns on arm unless explicitly marked with --rerun-all-issues
Workaround part 2 for:
https://llvm.org/bugs/show_bug.cgi?id=25844

llvm-svn: 255747
2015-12-16 02:46:57 +00:00
Todd Fiala 9ce27bba29 Really fix Xcode build.
Fixes target membership settings from my last check-in.

llvm-svn: 255746
2015-12-16 02:18:56 +00:00
Todd Fiala 7236f32414 Xcode project changes for r255729.
llvm-svn: 255742
2015-12-16 01:20:08 +00:00
Enrico Granata b13293876c Add a symbolic link from the test directory to the actual - elsewhere located - path that contains the test cases - and teach the test suite driver to resolve paths that contain symbolic links to test cases
This is meant to reduce the typing that one needs to do to get from the test subdirectory to actual test cases. Now one can just do

$ ./dotest.py ./testcases/<yaddayaddayadda>

llvm-svn: 255741
2015-12-16 01:15:49 +00:00
Siva Chandra d8335e9ab4 Read macro info from .debug_macro section and use it for expression evaluation.
Summary:
DWARF 5 proposes a reinvented .debug_macro section. This change follows
that spec.

Currently, only GCC produces the .debug_macro section and hence
the added test is annottated with expectedFailureClang.

Reviewers: spyffe, clayborg, tberghammer

Subscribers: lldb-commits

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

llvm-svn: 255729
2015-12-16 00:22:08 +00:00
Todd Fiala 54e120910c prevent rerun logic from kicking in on test runs including aarch64.
This is a workaround for:
llvm.org/pr25844

llvm-svn: 255719
2015-12-15 23:56:26 +00:00
Adrian McCarthy e376ba0331 Propagate socket_error exception from handle_read. Otherwise Ninja crashes.
llvm-svn: 255718
2015-12-15 23:51:27 +00:00
Jason Molenda 7e9bd599a2 Add a new "thread-pcs" key-value pair to the T packet response from
debugserver.  thread-pcs has a comma separated list of base 16
addresses - the current pc value for every thread in the process.
It is a partner of the "threads:" key where a list of thread IDs
is given.  The pc values in thread-pcs correspond one-to-one with
the thread IDs in the threads list.

This is a part of performance work.  When lldb is instruction
stepping / fast stepping over a range of addresses for e.g. a "next"
command, and it steps in to another function, lldb will put a
breakpoint on the return address and continue the process.  Before
it calls continue, it calls Thread::SetupForResume on all the
threads, and SetupForResume needs to get the current pc value for
every thread to see if any are at a breakpoint site.

The result is that issuing a "c" continue requires that we send
"read pc register" packets for every thread.

We may do this sequence of step-into-function / continue-to-get-out
many times for a single user-visible "next" or "step" command, and
with highly multithreaded programs, we are sending many extra
packets to get all the thread values.

I looked at including this data in the "jstopinfo" JSON that
we already have in the T packet.  But there are three problems that
would make this increase the size of the T packet significantly.
First, numbers in JSON are base 10.  Second, a proper JSON would
have something like "thread_pcs": { "34224331112":383772734222, ...}
for thread-id 34224331112 and pc 383772734222 - so we're including
a whole extra copy of the thread id in addition to the pc.  Third,
the JSON text is hex-ascii'fied so the size of it is doubled.
In one example, 

threads:585db8,585dc7,585dc8,585dc9,585dca,585dce;thread-pcs:100001400,7fff8badc6de,7fff8badcff6,7fff8badc6de,7fff8badc6de,7fff8badc6de;

The "thread-pcs" adds 86 characters - 136 characters for both 
threads and thread-pcs.  Doing this in JSON would look like

threads={"5791160":4294972416,"5791175":140735536809694,"5791176":140735536812022,"5791177":140735536809694,"5791178":140735536809694,"5791182":140735536809694}

or 160 characters -- or 320 characters once it is hex-asciified.

Given that it's 86 characters vrs 320, I went with the old style
approach.  I've seen real world programs that have up to 60 threads
in them, so this could result in vastly larger packets if it
was all done in the JSON with hex-ascii expansion.

If we had an all-JSON T packet, where we didn't need to hex-ascii
encode anything, that would have been the better approach.  But
we'd already have a list of threads in JSON at that point so
the additional text wouldn't be too bad.

I'm working on finishing the patches to lldb to use this data;
will commit those once I've had a chance to test them more.  But
I wanted to commit the debugserver bits which are more
straightforward.


<rdar://problem/21963031> 

llvm-svn: 255711
2015-12-15 23:47:44 +00:00
Todd Fiala 3a7fcbb441 test infra: support test reruns in xunit formatter.
llvm-svn: 255705
2015-12-15 23:25:56 +00:00
Greg Clayton 0817da881e First pass at LLDBRPC.framework
llvm-svn: 255697
2015-12-15 23:03:22 +00:00
Enrico Granata f85b008de8 Enable the 'type X list' formatters commands to list formatters in language categories
llvm-svn: 255687
2015-12-15 22:20:19 +00:00
Todd Fiala 6d3de12315 test-infra: refactored new summary results into base ResultsFormatter class
This allows more specialized formatters to still reuse the results
summarization display from the base class.

llvm-svn: 255676
2015-12-15 21:33:38 +00:00
Tamas Berghammer 0ecdae1bdc Merge ENABLE_THREADS and ENABLE_STD_THREADS markers
Both of these markers are used in the test suit for annotating when a
test needs multi threaded support. Previously they had slightly
different meening but they converged to the point where they are used
interchangably. This CL removes the ENABLE_STD_THREADS one to simplify
the test suite and avoid some confusion.

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

llvm-svn: 255641
2015-12-15 12:11:00 +00:00
Sagar Thakur 40fc2e391a [LLDB][MIPS] Added support for MIPS1, MIPS2, MIPS3, MIPS4 and MIPS5 instruction sets
Patch by Nitesh Jain.

Summary: This Patch will allowed LLDB to debug respective instruction sets binaries.

Reviewers: jaydeep, clayborg
Subscribers: lldb-commits, mohit.bhakkad, sagar, bhushan
Differential: http://reviews.llvm.org/D15487
llvm-svn: 255619
2015-12-15 05:50:55 +00:00
Enrico Granata bd5eab8287 Fix a bug where language categories would hold on to their caches even after changes
llvm-svn: 255603
2015-12-15 02:20:48 +00:00
Eugene Zelenko e65b2cf297 Fix Clang-tidy modernize-use-nullptr and readability-simplify-boolean-expr warnings in some files in source/Target/.
Simplify smart pointers checks in conditions. Other minor fixes.

llvm-svn: 255598
2015-12-15 01:33:19 +00:00
Jason Molenda 162b68d86f Add NetBSDSignals.cpp to the xcode project file.
llvm-svn: 255597
2015-12-15 01:26:25 +00:00
Kamil Rytarowski cec6b45aec Welcome to NetBSD signals
Summary:
Signals 1-32 are matching the default UNIX platform.

There are platform specific ones above 32.

From the `/usr/include/sys/signal.h` header:

```
#define SIGPWR          32      /* power fail/restart (not reset when caught) */
#ifdef _KERNEL
#define SIGRTMIN        33      /* Kernel only; not exposed to userland yet */
#define SIGRTMAX        63      /* Kernel only; not exposed to userland yet */
#endif
```

Reviewers: emaste, joerg

Subscribers: lldb-commits

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

llvm-svn: 255592
2015-12-15 00:50:19 +00:00
Jason Molenda 25d5b10b22 When constructing an address range to "step" or "next" through,
find the largest address range (possibly combining multiple 
LineEntry's for this line number) that is contiguous.

This allows lldb's fast-step stepping algorithm to potentially
run for a longer address range than if we have to stop at every
LineEntry indicating a subexpression in the source line.

http://reviews.llvm.org/D15407
<rdar://problem/23270882> 

llvm-svn: 255590
2015-12-15 00:40:30 +00:00
Siva Chandra a386358c36 Make few adjustments after r255542.
Reviewers: zturner

Subscribers: lldb-commits

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

llvm-svn: 255584
2015-12-15 00:26:52 +00:00
Todd Fiala 101ed12712 test infra: catch and print exception info on test runner socket listener
This is the listener's spawned connection, not the listener itself.
(i.e. this is the test runner's receiving side of test event sockets).
A standard socket.error will just issue an INFO statement and continue.
Something other than a socket.error will get an ERROR: printed (and
also continue).

Hopefully this gets us more info and also handles the completely
to-be-expected scenario that the test inferior might go down at
any point.

llvm-svn: 255581
2015-12-14 23:45:38 +00:00
Kate Stone 2a83045ab1 [Test] Addresses failing test when path to make contains spaces
llvm-svn: 255568
2015-12-14 22:59:26 +00:00
Zachary Turner 8a927c4c10 Remove the multiplier loop.
This is leading to some kind of subtle issue related to local
functions and closures, so let's just go back to the old way for
now.

llvm-svn: 255567
2015-12-14 22:58:16 +00:00
Todd Fiala f801290a91 Revert "Temporarily skip TestWithLimitDebugInfo on Darwin and OS X"
This reverts commit 30ed0826a1bb800454088ea1ae16c113a69b92b1.

llvm-svn: 255557
2015-12-14 22:04:20 +00:00
Todd Fiala 6ea44cd89b Temporarily skip TestWithLimitDebugInfo on Darwin and OS X
This test is erroring out on a sequence call to a function.

llvm-svn: 255549
2015-12-14 21:49:39 +00:00
Kate Stone a11959dbf7 [Editline] Redesign automatic indentation fix command for robustness
The FixIndentationCommand implementation has proven to be fragile across various libedit iterations. This patch reworks the command to use the same basic strategy as when moving between lines in a multi-line edit session: when indentation changes are required, exit line editing completely and restart with amended content. This approach won't be susceptible to subtle behavior differences libedit has introduced over time.

llvm-svn: 255548
2015-12-14 21:43:59 +00:00
Omair Javaid 798ea5b6ff Correction in TestFrames.py test for arm targets in thumb mode
Differential revision: http://reviews.llvm.org/D15061

llvm-svn: 255547
2015-12-14 21:41:18 +00:00
Todd Fiala 685a7570ec test infra: enable single-worker rerun phase for flakey tests.
Use of --rerun-all-issues will enable any test method failure, not just
test methods marked with the flakey decorator, to rerun.

Currently this does not change the flakey logic's immediate rerun
attempt.  I want to make sure this doesn't cause any significant issues
before changing that part.

The rerun reporting is only known to work properly with the
default (new) BasicResultsFormatter reporting.  Once we work out
any issues, I'll go back and make sure the curses output handles
it properly as well.

llvm-svn: 255543
2015-12-14 21:28:46 +00:00
Zachary Turner e1eb5e39f5 Make skipIf decorator support not_in() functor.
llvm-svn: 255542
2015-12-14 21:26:49 +00:00
Zachary Turner f098e4fb19 Make debug info specification use categories system.
Reviewed By: Tamas Berghammer, Pavel Labath
Differential Revision: http://reviews.llvm.org/D15428

llvm-svn: 255525
2015-12-14 18:49:16 +00:00
Omair Javaid af9a31aff3 Add failure paths to a few JSONNumber members
Differential revision: http://reviews.llvm.org/D15355

llvm-svn: 255499
2015-12-14 14:52:07 +00:00
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