Commit Graph

3491 Commits

Author SHA1 Message Date
Zachary Turner 7c9e1c0bef XFAIL the last Windows test that calls a function in the target.
llvm-svn: 245749
2015-08-21 22:11:31 +00:00
Zachary Turner 6df0cbc040 Skip TestCreateAfterAttach on Windows.
As with every other platform, this test occasionally hangs on
Windows.

llvm-svn: 245748
2015-08-21 22:11:21 +00:00
Zachary Turner 28ee0cd30e XFAIL Tests that require C++ exceptions on Windows.
clang-cl does not yet support C++ exceptions, so these tests will
not even compile.

Re-enabling these tests is tracked by llvm.org/pr24538

llvm-svn: 245747
2015-08-21 22:11:09 +00:00
Pavel Labath b3b1f467ce Increase timeout in TestExpressionInSyscall
test times out on the windows->android buildbot (probably due to android emulator being slow)

llvm-svn: 245691
2015-08-21 10:52:02 +00:00
Pavel Labath 57f4f1737f Add repro test case for bug #24530
llvm-svn: 245687
2015-08-21 10:38:31 +00:00
Zachary Turner 075c6ee843 Change TestBSDArchives to expectedFailureWindows.
llvm-svn: 245631
2015-08-20 22:25:45 +00:00
Zachary Turner 1844284403 [Windows] XFAIL tests that require calling a function in target.
This has known issues on Windows.  Fixing this is tracked by
http://llvm.org/pr21765

llvm-svn: 245630
2015-08-20 22:09:35 +00:00
Zachary Turner 02ca878711 XFAIL breakpoint tests on Windows
llvm.org/pr24528 tracks fixing this test.

llvm-svn: 245629
2015-08-20 22:09:08 +00:00
Zachary Turner 9509c356db XFAIL TestBSDArchives.py on Windows
llvm.org/pr24527 tracks this bug.  Makefile.rules does not know
how to build static libraries on Windows.

llvm-svn: 245628
2015-08-20 22:08:57 +00:00
Zachary Turner 6313884914 XFAIL TestAnonymous.test_expr_null_with_dwarf on Windows.
This bug is tracked in llvm.org/pr21550, and also reproduces on
FreeBSD apparently.

llvm-svn: 245627
2015-08-20 22:08:48 +00:00
Pavel Labath c6a144b0aa Increase timeout in TestCallWithTimeout to reduce flakyness
The test was flaky on the android buildbot, because the 10ms test completed before we got a
chance to interrupt it. I increase the duration to 50ms to hopefully get more consistent results.

llvm-svn: 245555
2015-08-20 12:12:09 +00:00
Pavel Labath 090152bd1f Skip TestCreateDuringInstructionStep on android aarch64
we are unable to step through _M_start_thread due to atomic instruction sequences.

llvm-svn: 245552
2015-08-20 11:37:19 +00:00
Pavel Labath 0e1d729b75 [NativeProcessLinux] Fix a bug in instruction-stepping over thread creation
Summary:
There was a bug in NativeProcessLinux, where doing an instruction-level single-step over the
thread-creation syscall resulted in loss of control over the inferior. This happened because
after the inferior entered the thread-creation maintenance stop, we unconditionally performed a
PTRACE_CONT, even though the original intention was to do a PTRACE_SINGLESTEP. This is fixed by
storing the original state of the thread before the stop (stepping or running) and then
performing the appropriate action when resuming.

I also get rid of the callback in the ThreadContext structure, which stored the lambda used to
resume the thread, but which was not used consistently.

A test verifying the correctness of the new behavior is included.

Reviewers: ovyalov, tberghammer

Subscribers: lldb-commits

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

llvm-svn: 245545
2015-08-20 09:06:12 +00:00
Chaoren Lin 99f25befee XTIMEOUT TestIntegerTypesExpr for Darwin.
llvm-svn: 245532
2015-08-20 01:26:57 +00:00
Paul Herman 6e0fe6fbf5 Fix tests to work on remote targets.
llvm-svn: 245515
2015-08-19 22:44:48 +00:00
Paul Herman 641e1987d6 Fix evaluation of global operators in C++
llvm-svn: 245508
2015-08-19 21:44:56 +00:00
Paul Herman 493bb398e7 Improve tests regarding imported namespaces and chained calls in C++
llvm-svn: 245505
2015-08-19 21:23:01 +00:00
Chaoren Lin b0138025ec XTIMEOUT TestChangeProcessGroup for Linux.
llvm-svn: 245477
2015-08-19 18:39:25 +00:00
Chaoren Lin febef1b017 XTIMEOUT TestEvents and TestThreadStates for Windows to Android.
llvm-svn: 245464
2015-08-19 17:22:12 +00:00
Chaoren Lin d904371271 XTIMEOUT TestExitDuringStep for Darwin.
llvm-svn: 245460
2015-08-19 17:13:02 +00:00
Pavel Labath 4b48595adf Increase timeout in TestCallThatRestarts
the test was failing on android because processing 30 signals involved a lot of round-trips,
which was not possible in the 0.5s default timeout. After the increase the test seems to pass
reliably.

llvm-svn: 245448
2015-08-19 15:24:02 +00:00
Pavel Labath 14e21925a5 Add TestCrashDuringStep
this tests that a crash that happens during instruction step is reported correctly.

llvm-svn: 245440
2015-08-19 14:15:45 +00:00
Pavel Labath 78856474fb On Linux, clear the signal mask of the launched inferior
Summary:
Due to fork()/execve(), the launched inferior inherits the signal mask of its parent (lldb-server). But because lldb-server modifies its signal mask (It blocks SIGCHLD, for example), the inferior starts with some signals being initially blocked.

One consequence is that TestCallThatRestarts.ExprCommandThatRestartsTestCase (test/expression_command/call-restarts) fails because sigchld_handler() in lotta-signals.c is not called, due to the SIGCHLD signal being blocked.

To prevent the signal masking done by lldb-server from affecting the created inferior, the signal mask of the inferior is now cleared before the execve().

Patch by: Yacine Belkadi

Reviewers: ovyalov, labath

Subscribers: lldb-commits

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

llvm-svn: 245436
2015-08-19 13:47:57 +00:00
Chaoren Lin 9a379c19a9 XFAIL TestCppScope for Darwin.
llvm-svn: 245418
2015-08-19 06:21:09 +00:00
Chaoren Lin 464be90e6d Fix TestCppNsImport and TestCppScope for remote tests.
llvm-svn: 245412
2015-08-19 04:08:56 +00:00
Chaoren Lin 46fc8168c2 XFAIL TestCppChainedCalls for GCC.
llvm-svn: 245407
2015-08-19 02:55:33 +00:00
Paul Herman 10bc1a4e83 Fix resolution conflict between global and class static variables in C++
llvm-svn: 245381
2015-08-18 22:46:57 +00:00
Paul Herman b058fb47db Test chaned function calls and imported namespaces in C++
llvm-svn: 245380
2015-08-18 22:43:37 +00:00
Zachary Turner 913f776ff9 Fix TestArrayTypes on Windows.
Whether or not frames print their tid in hex or decimal is apparently
hardcoded to depend on the operating system.  For now a comment was
added that this should be changed to a more sane check (for example
a setting), and the OS check is updated to do the right thing for
Windows.

llvm-svn: 245371
2015-08-18 22:25:40 +00:00
Oleksiy Vyalov 6e295cd179 Mark TestCModules as XFAIL on OSX.
http://reviews.llvm.org/D11962

llvm-svn: 245357
2015-08-18 21:20:25 +00:00
Zachary Turner 2878bf44b1 [Windows] XFAIL tests that depend on expression name lookup.
Name lookup doesn't work properly with Windows targets.  This is
most likely due to issues with name mangling, although there is at
least one set of debug info related issues as well, since some of
the name lookup requests appear to be failing on types rather than
symbols.

Specifically, this patch XFAILS the following set of tests:

TestChar1632T.py
TestRdar12991846.py
TestConstVariables.py
TestCallCPPFunction.py
TestCallStopAndContinue.py
TestCallUserDefinedFunction.py
TestCModules.py
TestCPPThis.py
TestExprs2.py
TestOverloadedFunctions.py
TestRvalueReferences.py

And fixing the underlying issue is tracked in http://llvm.org/pr24489

llvm-svn: 245338
2015-08-18 20:01:28 +00:00
Siva Chandra 9851b1f62b [ValueObjectSynthetic and ValueObjectDynamicValue] Override GetDeclaration
Summary:
Returns the declaration of the parent (non-synthetic or static) value.


Reviewers: granata.enrico, clayborg

Subscribers: lldb-commits

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

llvm-svn: 245319
2015-08-18 17:56:06 +00:00
Chaoren Lin dea51da7a5 Revert part of "Convert all use of pthreads in tests to c++11 threads."
TestExprDoesntBlock started failing because deadlocks behave differently with
pthread_mutex and std::mutex.

This reverts part of commit r245234.

llvm-svn: 245262
2015-08-18 00:27:08 +00:00
Zachary Turner 8778fea0bb Convert all use of pthreads in tests to c++11 threads.
This eliminates portability issues among platforms that don't have
a pthreads implementation.

Differential Revision: http://reviews.llvm.org/D12043
Reviewed By: Greg Clayton

llvm-svn: 245234
2015-08-17 20:12:04 +00:00
Zachary Turner 398f9ed95c Enable settings test for i686 as well as i386.
llvm-svn: 245128
2015-08-14 23:29:32 +00:00
Zachary Turner 793d997585 Make skipUnlessArch decorator actually skip instead of XFAIL.
llvm-svn: 245127
2015-08-14 23:29:24 +00:00
Zachary Turner 6e19fe9954 XFAIL some data formatter tests on Windows.
Fixing these bugs is tracked by http://llvm.org/pr24462.

llvm-svn: 245126
2015-08-14 23:29:17 +00:00
Zachary Turner c714b07433 Disable libstdc++ and libcxx data formatter tests on Windows.
Neither of these libraries has been ported to Windows.  Eventually
if they are ever ported we can re-enable these tests.  But more
immediately what we need to do is add new data formatters for
MSVC's STL implementation.  This is tracked in
http://llvm.org/pr24460.

llvm-svn: 245125
2015-08-14 23:28:49 +00:00
Greg Clayton ecc7443384 Don't test the output of "target modules dump symfile a.out" as this isn't something we should be testing for. This makes this test pass again.
llvm-svn: 245078
2015-08-14 18:18:07 +00:00
Zachary Turner 4cceca7c15 Update dosep to print unexpected successes at the end.
llvm-svn: 245066
2015-08-14 16:45:32 +00:00
Zachary Turner 9ff56b2ec7 Remove Unicode byte-order mark from python files.
This was caused by a bug in the PTVS source file editor, which has
since been fixed and awaiting a new release.  For now people using
this editor need to remember to manually remove this before
committing a file.

llvm-svn: 244963
2015-08-13 22:05:54 +00:00
Zachary Turner ba2ab8e92b Disable lldb-mi tests on Windows.
Most were already XFAIL'ed, but the reason for the XFAIL is that
we don't have a suitable pexpect implementation on Windows.  This
isn't going to change unintentionally, so there is no reason to
XFAIL them as opposed to just skip them.

llvm.org/pr22274 tracks finding a suitable pexpect module for
Windows, which should fix many of these issues.  llvm.org/pr24452
tracks the larger issue of making the entire lldb-mi test suite
work on Windows, of which finding a pexpect module is just one
component.

llvm-svn: 244951
2015-08-13 20:50:17 +00:00
Zachary Turner 3b8446712e XFAIL Watchpoint tests on Windows.
https://llvm.org/pr24446 tracks getting these tests re-enabled.

llvm-svn: 244950
2015-08-13 20:49:43 +00:00
Ravitheja Addepally 4778e410d0 Set orig_eax to -1 for Linux x86 platforms
Summary:
For Linux x86 based environments the orig_eax/orig_rax
register should be set to -1 to prevent the instruction pointer
to be decremented, which was the cause for the SIGILL exception.

Fix for Bug 23659

Reviewers: zturner, ashok.thirumurthi, mikesart, jingham, clayborg

Subscribers: clayborg, labath

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

llvm-svn: 244875
2015-08-13 09:05:11 +00:00
Chaoren Lin b6325d0cad Make dosep.py PEP8 compliant. NFC.
Reviewers: zturner, clayborg

Subscribers: lldb-commits

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

llvm-svn: 244784
2015-08-12 18:02:54 +00:00
Chaoren Lin e80372a43a Refactor dosep to use list comprehension. NFC.
Reviewers: zturner

Subscribers: lldb-commits

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

llvm-svn: 244783
2015-08-12 18:02:53 +00:00
Chaoren Lin 5a59e46460 Don't print number of failures and percentage if no tests ran.
Reviewers: zturner

Subscribers: lldb-commits

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

llvm-svn: 244782
2015-08-12 18:02:51 +00:00
Chaoren Lin ffc63b044c Make dosep output status by overwriting the same line.
Summary: Update to D11816.

Reviewers: zturner

Subscribers: zturner, lldb-commits

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

llvm-svn: 244781
2015-08-12 18:02:49 +00:00
Greg Clayton 8c3f9c9868 Don't crash if the file we want to touch doesn't exist.
llvm-svn: 244663
2015-08-11 21:01:32 +00:00
Ilia K d7f932a8c8 Add size field to library load event (MI)
Summary:
(This revision supersedes the abandon: http://reviews.llvm.org/D9716)
Size field is used to let the debugger attribute an address to a specific library when symbols are not available. 
For example:
	OpenGLESApp4.app!Cube_draw() Line 74	C
 	OpenGLESApp4.app!-[GameViewController glkView:drawInRect:](GameViewController * self, SEL _cmd, GLKView * view, CGRect rect) Line 89	C++
 	GLKit!<redacted>	
 	QuartzCore!<redacted>	
 	QuartzCore!<redacted>	
 	QuartzCore!<redacted>	
 	QuartzCore!<redacted>	
 	QuartzCore!<redacted>	
 	UIKit!<redacted>	
 	UIKit!<redacted>	
 	UIKit!<redacted>	
 	UIKit!<redacted>	
 	FrontBoardServices!<redacted>	
 	CoreFoundation!<redacted>	

Patch from paulmay@microsoft.com

Reviewers: ChuckR, abidh, ki.stfu

Subscribers: greggm, lldb-commits

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

llvm-svn: 244573
2015-08-11 06:07:14 +00:00
Zachary Turner 38e64175db Allow dosep.py to print dotest.py output on success.
Previously all test output was reported by each individual
instance of dotest.py.  After a recent patch, dosep gets dotest
outptu via a pipe, and selectively decides which output to
print.

This breaks certain scripts which rely on having full output
of each dotest instance to do various parsing and/or log-scraping.

While we make no promises about the format of dotest output, it's
easy to restore this to the old behavior for now, although it is
behind a flag.  To re-enable full output, run dosep.py with the -s
option.

Differential Revision: http://reviews.llvm.org/D11816
Reviewed By: Chaoren Lin

llvm-svn: 244469
2015-08-10 17:46:11 +00:00
Chaoren Lin dd44c26d34 Flush stderr on dosep status update for Windows.
llvm-svn: 244069
2015-08-05 17:36:54 +00:00
Chaoren Lin 845f40ada6 XFAIL TestInferiorAssert for Android API <= 16.
llvm-svn: 243922
2015-08-03 23:59:41 +00:00
Dawn Perchik c18daf29ae [lldb-mi] Fix evaluation for children of created variable object.
Move code in CMICmdCmdVarListChildren::Execute() up so that the child
object will always be added when the MI command -var-list-children is
entered (instead of only when the print-value was all or simple).  This
patch fixes evaluation of expressions like varobj.member for a created
varobj with children.

Reviewed by: abidh
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11659

llvm-svn: 243782
2015-07-31 21:00:00 +00:00
Hafiz Abid Qadeer 311d08f8de Escape new line and tabs in the result of variable evaluation.
Expression evaluation error messages may have embedded new lines
and tabs. These should be escaped in the result string.

Patch by paulmaybee. Reviewed in http://reviews.llvm.org/D11570.

llvm-svn: 243741
2015-07-31 09:24:39 +00:00
Tamas Berghammer 3e64245698 Mark TestMiBreak as falkey on Linux
llvm-svn: 243628
2015-07-30 09:09:22 +00:00
Mohit K. Bhakkad c356d8be53 [LLDB][MIPS] Added expected failure for "test disassembler settings"
Patch by Nitesh Jain

Reviewers: clayborg, ovyalov.
Subscribers: jaydeep, bhushan, mohit.bhakkad, sagar, emaste, lldb-commits.
Differential Revision: http://reviews.llvm.org/D11562

llvm-svn: 243622
2015-07-30 05:45:56 +00:00
Ilia K 6b8ade52b9 Clean up test/tools/lldb-mi/variable/main.cpp after r243619
llvm-svn: 243621
2015-07-30 05:39:31 +00:00
Ilia K 6940581e45 Fix bug in expression display when determining if a pointer should be treated as a string
Summary:
Currently if the "first child" of the pointer is a char type then the pointer is displayed as a string. This test succeeds incorrectly when the pointer is to a structured type with a char type as its first field. Fix this by switching the test to retrieve the pointee type and checking that it is a char type.


Reviewers: abidh, ChuckR, ki.stfu

Subscribers: greggm, lldb-commits

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

llvm-svn: 243619
2015-07-30 05:32:41 +00:00
Oleksiy Vyalov abb5a35d05 Make DWARF at_comp_dir symbolic links configurable via plugin.symbol-file.dwarf.comp-dir-symlink-paths setting.
http://reviews.llvm.org/D11586

llvm-svn: 243580
2015-07-29 22:18:16 +00:00
Dawn Perchik 6a40cd71f6 [lldb-mi] Fix tests added in r243484 for breakpoints using file:func syntax.
llvm-svn: 243510
2015-07-29 01:01:14 +00:00
Dawn Perchik a16faba6b0 [lldb-mi] XFAIL new test added in r243484.
llvm-svn: 243504
2015-07-29 00:22:53 +00:00
Dawn Perchik fc6eb071ab Fix comment in TestExprOptions to match change of language from ObjC to ObjC++.
llvm-svn: 243488
2015-07-28 22:19:42 +00:00
Dawn Perchik c69780d797 [lldb-mi] Fix setting of breakpoints using file:func syntax.
Reviewed by: ki.stfu
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11499

llvm-svn: 243484
2015-07-28 21:40:57 +00:00
Enrico Granata 8eb9c3068c Fix a bug where the std::list synthetic child provider would not clean its cache correctly on update, causing stale children to be returned in some circumstances
Fixes rdar://20560680

llvm-svn: 243472
2015-07-28 20:19:45 +00:00
Ilia K b56c50f0ec Support escapes and quotes in string and character values.
Summary:
Escape characters in strings and strings containing quotes were not appearing correctly in expression values.

Patch from paulmay@microsoft.com

Reviewers: abidh, ChuckR, paulmaybee

Subscribers: greggm, lldb-commits

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

llvm-svn: 243383
2015-07-28 05:43:47 +00:00
Greg Clayton a90d0992b7 Fix test suite. For now we can't disable C++ for expressions since the return value is returned as a reference and this test fails on MacOSX.
llvm-svn: 243342
2015-07-27 23:02:14 +00:00
Chaoren Lin 5ce142b429 Only test ObjC expression options on Darwin.
Reviewers: dawn, emaste, vharron, clayborg

Subscribers: lldb-commits

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

llvm-svn: 243329
2015-07-27 21:15:01 +00:00
Ed Maste 6cfb894892 XFAIL test_with_dwarf_formatters_api on FreeBSD
llvm.org/pr24282

llvm-svn: 243309
2015-07-27 19:20:42 +00:00
Ed Maste 7c98da6451 XFAIL TestExprOptions on FreeBSD.
r243230 XFAILed it for Linux; it also fails on FreeBSD.

llvm-svn: 243307
2015-07-27 19:10:16 +00:00
Dawn Perchik c9a0d3be69 [lldb-mi] Fix breakpoints on functions when C++ namespaces are used.
The command "-break-insert ns::foo" for function 'foo' in namespace 'ns'
was being parsed as file:function.  This patch fixes these cases by adding
checks for '::'. (Note: '::func' is not parsed correctly by lldb due to
llvm.org/pr24271).

Reviewed by: ki.stfu
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11396

llvm-svn: 243281
2015-07-27 17:03:34 +00:00
Chaoren Lin 424848cabe XFAIL TestExprOptions on Linux.
llvm-svn: 243230
2015-07-25 22:06:48 +00:00
Jim Ingham 9435b3c298 Shorten the lldb timeout, we were seeing occasional failure because
lldb didn't wake up before the target function got a chance to complete.

<rdar://problem/21990308>

llvm-svn: 243193
2015-07-25 00:52:38 +00:00
Dawn Perchik 15663c530e Specify a language to use when parsing expressions.
This patch adds the option -l/--language to the expression command, for
use when setting the language options or choosing an alternate FE. If
not specified, the target.language setting is used.

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

llvm-svn: 243187
2015-07-25 00:19:39 +00:00
Siva Chandra d26eb907bc Add option eTypeOptionHideEmptyAggregates.
Summary:
For certain data structures, when the synthetic child provider returns
zero children, a summary like "Empty instance of <typename>" could be
more appropriate than something like "size=0 {}". This new option helps
hide the trailing "{}".

This is also exposed with a -h option for the command "type summary add".

Reviewers: granata.enrico

Subscribers: lldb-commits

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

llvm-svn: 243166
2015-07-24 21:30:58 +00:00
Tamas Berghammer 5aa27e1acc Improve C++ function name handling and step-in avoid regerxp handling
If the function is a template then the return type is part of the
function name. This CL fixes the parsing of these function names in
the case when the return type contains ':'.

The name of free functions in C++ don't have context part. Fix the
logic geting the function name without arguments out from a full
function name to handle this case.

Change the handling of step-in-avoid-regexp to match the value against
the function name without it's arguments and return value. This is
required because the default regex ("^std::") would match any template
function returning an std object.

Fifferential revision: http://reviews.llvm.org/D11461

llvm-svn: 243099
2015-07-24 08:54:22 +00:00
Tamas Berghammer e2da072617 Remove XFAIL from ReturnValueTestCase after rL242972
llvm-svn: 243000
2015-07-23 09:49:59 +00:00
Dawn Perchik 509933ca56 Fix comment in test.
llvm-svn: 242979
2015-07-23 02:15:55 +00:00
Chaoren Lin 0b8bb3da08 Xtimeout TestProcessAttach for Linux.
llvm-svn: 242932
2015-07-22 20:52:17 +00:00
Tamas Berghammer c3a2118c39 XFAIL TestReturnValue on Linux-x86_64 with clang
The coverage of the test got increased and it fails because of it.

llvm-svn: 242910
2015-07-22 16:59:18 +00:00
Tamas Berghammer b6a04a141c Improve SysV ABI for ARM to handle return values with vector return type
This is required to print out the rerun value of funcions returning
types with the following attributes:
__attribute__((__vector_size__(8)));
__attribute__((ext_vector_type(2)));

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

llvm-svn: 242903
2015-07-22 14:53:37 +00:00
Kuba Brecka 5e73d2523f [asan] Display ASan history threads in reverse chronological order
For use-after-free bugs caught by ASan, we show an allocation and a deallocation stack trace. Let's display them in a "most recent event first" order, this patch does that.

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

llvm-svn: 242902
2015-07-22 14:30:56 +00:00
Bruce Mitchener 20370bade9 [lldb-mi tests] Fix typo of sensitive.
llvm-svn: 242900
2015-07-22 13:46:32 +00:00
Tamas Berghammer 050d1e8a34 XFAIL watchpoint tests on Android arm/aarch64
Differential revision: http://reviews.llvm.org/D11409

llvm-svn: 242887
2015-07-22 11:00:06 +00:00
Chaoren Lin f8e102da6a Xfail test_dyld_library_path for Android.
Originally, the source for the hidden lib_d and the regular lib_d were the same
file, so we always got the "correct" source for each. Splitting them up in
D11367 exposed a bug of showing the incorrect source file for the hidden lib_d.

llvm-svn: 242862
2015-07-22 01:17:51 +00:00
Bruce Mitchener e171da5cb7 Fix typos.
Summary: Fix a bunch of typos.

Reviewers: clayborg

Subscribers: lldb-commits

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

llvm-svn: 242856
2015-07-22 00:16:02 +00:00
Dawn Perchik 23b1decbe7 Add support for specifying a language to use when parsing breakpoints.
Target and breakpoints options were added:
    breakpoint set --language lang --name func
    settings set target.language pascal
These specify the Language to use when interpreting the breakpoint's
expression (note: currently only implemented for breakpoints on
identifiers).  If the breakpoint language is not set, the target.language
setting is used.
This support is required by Pascal, for example, to set breakpoint at 'ns.foo'
for function 'foo' in namespace 'ns'.
Tests on the language were also added to Module::PrepareForFunctionNameLookup
for efficiency.

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

llvm-svn: 242844
2015-07-21 22:05:07 +00:00
Chaoren Lin 5699eed608 Xfail TestGdbRemoteAbort for Android API <= 16.
Reviewers: sivachandra

Subscribers: tberghammer, danalbert, srhines, lldb-commits

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

llvm-svn: 242815
2015-07-21 17:50:52 +00:00
Chaoren Lin 29449150e5 Update TestLoadUnload to use base Makefile.
Summary:
The current Makefile scheme only allows one dylib to be specified in each make
invocation, so TestLoadUnload had a custom Makefile that's unrelated to the
base Makefile.rules. This change uses recursive make invocations to bypass the
single dylib restriction. See D11202 for more context.

Reviewers: clayborg

Subscribers: chaoren, lldb-commits

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

llvm-svn: 242813
2015-07-21 17:50:16 +00:00
Ying Chen 93190c4c0b Enable timeout on Windows
Summary: - launch dotest with gtimeout if found on Windows

Reviewers: chaoren

Subscribers: lldb-commits

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

llvm-svn: 242699
2015-07-20 20:04:22 +00:00
Sean Callanan abe140cc31 Eliminated a potential infinite recursion in structure layout when the origin
for a CXXRecordDecl gets pointed at that record.  This can happen when a type is
imported out of and then into the target's AST context without being laid out.

Also added a testcase that covers this scenario.

<rdar://problem/21844453>

llvm-svn: 242687
2015-07-20 16:55:19 +00:00
Chaoren Lin e9bbabcc69 Apply Android -pie switch to buildDefault as well.
Reviewers: ovyalov

Subscribers: tberghammer, danalbert, srhines, lldb-commits

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

llvm-svn: 242598
2015-07-18 00:37:55 +00:00
Chaoren Lin 9070f53079 Detect if necessary to build inferior with -pie for Android.
Summary:
- Add target_is_android check (with cached results).
- Make android_device_api also cache results.
- Also removes the need to pass --env OS=Android when testing against Android.

Reviewers: sivachandra, tberghammer, clayborg, danalbert

Subscribers: chaoren, tberghammer, danalbert, srhines, lldb-commits

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

llvm-svn: 242580
2015-07-17 22:13:29 +00:00
Chaoren Lin 636a0e3836 Check if altsep exists before replace.
llvm-svn: 242576
2015-07-17 21:40:11 +00:00
Chaoren Lin f355eda567 Handle altsep ('/' on Windows) in compiler path for log files.
Reviewers: chying

Subscribers: lldb-commits

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

llvm-svn: 242575
2015-07-17 21:37:26 +00:00
Enrico Granata b873e84bd9 Make this test case be somewhat less verbose when not asked to
llvm-svn: 242573
2015-07-17 21:11:46 +00:00
Enrico Granata 8a1cedddd8 Teach the "extend char types" (char16_t, char32_t and wchar_t) formatters that a *single character* whose value is 0 is actually a valid thing to print out
llvm-svn: 242572
2015-07-17 20:54:52 +00:00
Enrico Granata 01dcaa36de Teach the NSString data formatter to handle embedded NULs in short ASCII strings
llvm-svn: 242559
2015-07-17 19:06:39 +00:00
Enrico Granata f219885fb5 Improve the NSString data formatter so that explicitly-lengthed Unicode strings print embedded NULs correctly
llvm-svn: 242555
2015-07-17 18:22:51 +00:00
Enrico Granata 4cb0ba311a Split the portion of the data-formatter-objc test case that deals with NSString into its own separate test case
llvm-svn: 242552
2015-07-17 17:54:39 +00:00
Tamas Berghammer 022622f1d4 Improve conditional opcode handling in emulation based unwinding
Don't chane the CFI information when a conditional instruction
is emulated (eg.: popeq {r0, pc}) because the CFI for the next
instruction should be the same as the CFI for the current instruction.

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

llvm-svn: 242519
2015-07-17 11:44:14 +00:00
Enrico Granata 8101f570f8 Teach the std::wstring data formatter how to properly display strings with embedded NUL bytes
llvm-svn: 242501
2015-07-17 01:56:25 +00:00
Enrico Granata d07f7550a9 Add StringPrinter support for printing a std::string with embedded NUL bytes
llvm-svn: 242496
2015-07-17 01:03:59 +00:00
Chaoren Lin 594896fc8a Xfail pexpect tests for Windows hosts.
llvm-svn: 242457
2015-07-16 22:24:16 +00:00
Pavel Labath 4a4bb12e0d Add jThreadsInfo support to lldb-server
Summary:
This commit adds initial support for the jThreadsInfo packet to lldb-server. The current
implementation does not expedite inferior memory.  I have also added a description of the new
packet to our protocol documentation (mostly taken from Greg's earlier commit message).

Reviewers: clayborg, ovyalov, tberghammer

Subscribers: lldb-commits

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

llvm-svn: 242402
2015-07-16 14:14:35 +00:00
Tamas Berghammer 628365435d Improve XFAIL for test_lldb_process_load_and_unload_commands
llvm-svn: 242392
2015-07-16 10:00:06 +00:00
Siva Chandra f8877efc8b Add a class ValueObjectConstResultCast.
Summary:
Other changes around the main change include:

1. Add a method Cast to ValueObjectConstResult, ValueObjectConstResultImpl
and ValueObjectConstResultChild.

2. Add an argument |live_address| of type lldb::addr_t to the constructor
of ValueObjectConstResultChild. This is passed on to the backing
ValueObjectConstResultImpl object constructor so that the address of the
child value can be calculated properly.

Reviewers: granata.enrico, clayborg

Subscribers: lldb-commits

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

llvm-svn: 242374
2015-07-16 01:47:12 +00:00
Chaoren Lin 00d4fe43c6 Remove shell-specific code from TestLoadUnload Makefile.
Reviewers: clayborg, sivachandra

Subscribers: lldb-commits

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

llvm-svn: 242332
2015-07-15 21:18:26 +00:00
Ewan Crawford 90ff791141 Expression evaluation, a new ThreadPlanCallFunctionUsingABI for executing a function call on target via register manipulation
For Hexagon we want to be able to call functions during debugging, however currently lldb only supports this when there is JIT support. 
Although emulation using IR interpretation is an alternative, it is currently limited in that it can't make function calls.

In this patch we have extended the IR interpreter so that it can execute a function call on the target using register manipulation. 
To do this we need to handle the Call IR instruction, passing arguments to a new thread plan and collecting any return values to pass back into the IR interpreter. 

The new thread plan is needed to call an alternative ABI interface of "ABI::PerpareTrivialCall()", allowing more detailed information about arguments and return values.

Reviewers: jingham, spyffe

Subscribers: emaste, lldb-commits, ted, ADodds, deepak2427

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

llvm-svn: 242137
2015-07-14 10:56:58 +00:00
Chaoren Lin 98d0a4b39a Refactor Unix signals.
Summary:
- Consolidate Unix signals selection in UnixSignals.
- Make Unix signals available from platform.
- Add jSignalsInfo packet to retrieve Unix signals from remote platform.
- Get a copy of the platform signal for each remote process.
- Update SB API for signals.
- Update signal utility in test suite.

Reviewers: ovyalov, clayborg

Subscribers: chaoren, jingham, labath, emaste, tberghammer, lldb-commits

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

llvm-svn: 242101
2015-07-14 01:09:28 +00:00
Sean Callanan 9ff456c8a2 Fixed a problem where variables in modules were not appropriately discovered by
the expression parser.

<rdar://problem/21395220>

llvm-svn: 241917
2015-07-10 17:34:23 +00:00
Greg Clayton fdbff2afed Don't let a test fail because of a teardown command returning an error. Use a function that doesn't check the return value.
llvm-svn: 241879
2015-07-10 00:30:22 +00:00
Oleksiy Vyalov c8a3e9273c Try to enable TestProcessAttach tests on Linux.
http://reviews.llvm.org/D11013

llvm-svn: 241702
2015-07-08 18:15:32 +00:00
Sean Callanan 83b8ad0eaa Fixed a serious bug in DeportType where the types could retain DeclContexts that
pointed into the artificial function constructed for the expression.  I now make
anything that pointed to the function as its DeclContext be global while the
copy occurs; afterward I restored the old DeclContext.

Added a testcase that make sure that this works properly and doesn't crash
anything.

<rdar://problem/21049838>

llvm-svn: 241695
2015-07-08 18:03:41 +00:00
Sean Callanan 007135e612 Fixed the C modules test case on Darwin by streamlining its code.
We don't need to do the fancy dance with checking whether the iterator
represents a #define -- in fact, that's the wrong thing to do.  The thing to do
is check whether the highest-priority module that did something to the module
#defined or #undefd it.  If it #defined it, then the MacroInfo* will be non-NULL
and we're good to go.

llvm-svn: 241651
2015-07-08 00:13:49 +00:00
Adrian McCarthy 45c4c9b090 Windows doesn't have fork.
llvm-svn: 241640
2015-07-07 22:56:34 +00:00
Adrian McCarthy 137d7ba8b2 Fix _LocalProcess.terminate on Windows.
llvm-svn: 241589
2015-07-07 14:47:34 +00:00
Enrico Granata d529d04fd7 Add a summary for vector types
The summary is - quite simply - a one-line printout of the vector elements

We still need synthetic children:
a) as a source of the elements to print in the summary
b) for graphical IDEs that display structure regardless of the summary settings

rdar://5429347

llvm-svn: 241531
2015-07-07 00:20:57 +00:00
Adrian McCarthy 381dffd655 Normalize line endings.
llvm-svn: 241507
2015-07-06 20:44:08 +00:00
Chaoren Lin bfa848cfa1 Use /proc/$$/stat instead of $PPID.
Summary: $PPID is not available on old shells.

Reviewers: tberghammer, ovyalov

Subscribers: lldb-commits

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

llvm-svn: 241486
2015-07-06 18:56:04 +00:00
Adrian McCarthy 5cbef0e79f Fix step over breakpoint on Windows (which was detected by TestCreateAfterAttach.py).
llvm-svn: 241475
2015-07-06 17:42:09 +00:00
Pavel Labath 05ab2374be Fix dosep.py on windows after r240946
Summary:
On windows, global python variables are not automatically passed to child processes. This commit
makes sure the default timeout value is available to child processes by passing it directly.
I pass the whole dotest_opts value to the children, so we can use the other members as well if we
need to do it in the future.

Reviewers: amccarth

Subscribers: lldb-commits-list

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

llvm-svn: 241459
2015-07-06 15:57:52 +00:00
Tamas Berghammer 931901e56c Make TestStopHook* remote platform compatible
llvm-svn: 241436
2015-07-06 10:46:34 +00:00
Tamas Berghammer b8d2e9e309 Fix final wait in ExprSyscallTestCase for aarch64
llvm-svn: 241435
2015-07-06 10:02:56 +00:00
Tamas Berghammer 1d793622ad Make TestDisassembleBreakpoint arm and aarch64 compatible
llvm-svn: 241338
2015-07-03 10:32:55 +00:00
Bruce Mitchener a868c13c51 Fix typos
Summary: Fixes more typos.

Reviewers: clayborg

Subscribers: lldb-commits-list

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

llvm-svn: 241289
2015-07-02 18:48:40 +00:00
Chaoren Lin 7755b29108 Remove outdated comment.
llvm-svn: 241276
2015-07-02 15:30:59 +00:00
Chaoren Lin d8923e64d8 Change executable name to a.out.
Summary: The long name causes problems with some shells.

Reviewers: sivachandra

Subscribers: lldb-commits

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

llvm-svn: 241222
2015-07-02 01:26:39 +00:00
Sean Callanan 05834cd2ad Reversed r238363, because the message is inconsistent
with all the other assertion messages.

llvm-svn: 241212
2015-07-01 23:56:30 +00:00
Siva Chandra b88703c037 [Python] Allow PyLong values in integer lists (when converting to C lists)
Test Plan: dotest.py -p TestSBData

Reviewers: clayborg, granata.enrico

Reviewed By: clayborg, granata.enrico

Subscribers: lldb-commits

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

llvm-svn: 241208
2015-07-01 23:27:32 +00:00
Ying Chen 9b5eca903b Mark test_sb_api_listener_event_process_state as flakey
llvm-svn: 241203
2015-07-01 22:50:28 +00:00
Ying Chen 0a7202bb5d Run teardown and setup before retry for expectedFlakey tests
Summary:
If test is decorated with expectedFlakey*, run teardown and setup before retry
Don't run retry if the test is already decorated with xfail or skip

Test Plan:
Mark TestMultithreaded.test_sb_api_listener_event_process_state as expectedFlakey
Run ./dotest.py -p TestMultithreaded.py -A x86_64 -C gcc4.9.2

Reviewers: vharron, tberghammer

Subscribers: lldb-commits

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

llvm-svn: 241202
2015-07-01 22:44:27 +00:00
Tamas Berghammer f366af309a Ignore "push/pop {sp}" in emulation based unwinding
These instructions confusing the unwind code because in case of a
push it assumes that the original valu of a register is pushed to
the stack what is not neccessarily true in case of SP. The same is
true for the pop (in the opposite way).

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

llvm-svn: 241051
2015-06-30 09:35:46 +00:00
Ying Chen 401a6f9c60 Revert "Mark test_sb_api_listener_event_process_state as flakey"
This reverts commit a4f5f4da7e164b7ac358a75f2e4254c25718ad4b.
This test fails 100% with gcc4.9.2, revert it first. Will find out why xfail is overruled by xflaky.

llvm-svn: 241014
2015-06-29 22:40:33 +00:00
Tamas Berghammer 2d4920e1ee Mark test_sb_api_listener_event_process_state as flakey
llvm-svn: 240964
2015-06-29 16:28:37 +00:00
Tamas Berghammer 07b9adbfe0 Mark AttachResumeTestCase as flaky
llvm-svn: 240962
2015-06-29 16:12:03 +00:00
Ed Maste bcc976a443 Correct failure decorator in test_fd_leak_multitarget
The random module in Python 2.7.8 and later leaks /dev/[u]random into
children. The test is expected to fail, not be flakey.

This will be fixed in Python 2.7.10 for some operating systems, but not
all e.g. OS X 10.4.

llvm.org/pr23983
bugs.freebsd.org/197376
bugs.python.org/issue23458

llvm-svn: 240958
2015-06-29 15:26:45 +00:00
Pavel Labath fad30cf194 dosep.py: Add ability to set default test timout based on target
Summary:
Current default is 10 minutes, which causes the test suite to run very long in
case of test timeouts. On local linux, each test completes in under 90 seconds in the
slowest configuration (debug build of lldb, using debug clang to build
inferiors). I am changing the default to 4m on local targets, while retaining
the 10m timeout for remote ones.

Reviewers: sivachandra, vharron

Subscribers: tberghammer, lldb-commits

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

llvm-svn: 240946
2015-06-29 14:16:51 +00:00
Siva Chandra a07e1e7f2b Add test for SBValue.GetNonSyntheticValue in presence of synth provider.
Test Plan: dotest.py -p TestFormattersSBAPI

Reviewers: granata.enrico

Reviewed By: granata.enrico

Subscribers: lldb-commits

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

llvm-svn: 240861
2015-06-26 23:57:38 +00:00
Vince Harron c4f98d99e0 Fixed incorrect application of expectedFlakey
llvm-svn: 240803
2015-06-26 18:01:15 +00:00
Vince Harron 7ac3ea424b Added expectedFlakey test decorator
SUMMARY
Flakey tests get two chances to pass

Also, switched a bunch of tests to use new decorator.

TEST PLAN
Add one of these decorators to a test
Edit a test to pass on the first invocation, confirm test appears as pass
Edit a test to pass on the first invocation, pass on the second, confirm test appears as xfail
Edit a test to fail on two consecutive runs, confirm test appears in results as fail/error

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

llvm-svn: 240789
2015-06-26 15:13:21 +00:00
Tamas Berghammer 67ec5458a7 Add branch emulation to aarch64 instruction emulator
The emulation of the branches are required by the new stack
unwinding logic to reinstantiate the prologue at the right place.

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

llvm-svn: 240769
2015-06-26 09:41:32 +00:00
Enrico Granata 2d061e20f6 Fix a bug where we were trying to reconstruct ivars of ObjC types from the runtime in "expression parser mode"
The expression parser mode allows UnknownAnyTy to make it all the way through, but that is bad for ivars because it means type layout fails horribly (as in, clang crashes)

This patch fixes the issue by using the "variables view mode", which masks UnknownAnyTy as empty-type, and pointer-to UnknownAnyTy as void*

This, in turn, allows LLDB to properly reconstruct ivars of IMP type in ObjC type - as per accompanying test case

Fixes rdar://21471326

llvm-svn: 240677
2015-06-25 19:17:04 +00:00
Pavel Labath ecc728bde9 Update TestPrintStackTraces XFAIL once more
it seems the failure happens also with clang. The main thing which triggers the failure is
architecture.

llvm-svn: 240652
2015-06-25 15:25:30 +00:00
Tamas Berghammer 09d74b7140 Fix TestThreadAPI on Linux
On Linux malloc calls itself in some case. Change the test case to
handle this scenario.

llvm-svn: 240651
2015-06-25 15:19:22 +00:00
Pavel Labath 57d7232f40 Enable TestInferiorCrashing and TestRecursiveInferior on android
Summary:
the original bug was fixed (a rogue breakpoint messing up inferior data structures) and the tests
seems to pass now. Since android has a default SEGV handler, I have had to alter the test
expectation in this case.

Test Plan: Tests pass on android arm.

Reviewers: tberghammer

Subscribers: tberghammer, aemerson, lldb-commits

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

llvm-svn: 240638
2015-06-25 12:57:35 +00:00
Pavel Labath 35a24ded0a Make XFAIL on TestPrintStackTraces more specific
the thread creation failure was fixed, but a backtracing problem remains in some situations.

llvm-svn: 240635
2015-06-25 12:16:50 +00:00
Pavel Labath 7811d6a409 Remove XFAIL from TestCreateAfterAttach
The tested functionality is implemented now. The test remains XTIMEOUTed, because it times out
occasionally, probably due to test suite deficiencies.

llvm-svn: 240632
2015-06-25 11:29:26 +00:00
Ilia K 0b9e04b7c4 Expand result with type char* to string in -data-evaluate-expression
Summary:
Expand result with type char* to string in -data-evaluate-expression.
was:
  ```
    -data-evaluate-expression str
    ^done,value="0x00007fffffffece0"
  ```
now:
  ```
    -data-evaluate-expression str
    ^done,value="0x00007fffffffece0 \"hello\""
  ```

All tests pass on Linux.

Test Plan: ./dotest.py -v --executable $BUILDDIR/bin/lldb tools/lldb-mi

Reviewers: abidh

Reviewed By: abidh

Subscribers: lldb-commits, dawn, abidh

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

llvm-svn: 240631
2015-06-25 11:10:12 +00:00
Chaoren Lin 9d3f89a7bb Remove xfail for TestDisassembleBreakpoint.
LLGS no longer returns trap code in memory.

llvm-svn: 240551
2015-06-24 16:41:39 +00:00
Pavel Labath b36f917854 Remove old local-only linux debugging code
Summary:
Currently, the local-only path fails about 50% of the tests, which means that: a) nobody is using
it; and b) the remote debugging path is much more stable. This commit removes the local-only
linux debugging code (ProcessLinux) and makes remote-loopback the only way to debug local
applications (the same architecture as OSX). The ProcessPOSIX code is moved to the FreeBSD
directory, which is now the only user of this class. Hopefully, FreeBSD will soon move to the new
architecture as well and then this code can be removed completely.

Test Plan: Test suite passes via remote stub.

Reviewers: emaste, vharron, ovyalov, clayborg

Subscribers: tberghammer, emaste, lldb-commits

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

llvm-svn: 240543
2015-06-24 14:43:20 +00:00
Dawn Perchik 06ffe15adf Fix FIXME comments in MiBreakTestCase.test_lldbmi_break_insert_settings as suggested by abidh (MI)
llvm-svn: 240444
2015-06-23 19:21:44 +00:00
Dawn Perchik dc975670c1 Add support for displaying the language in the frame-format string.
Enable ${language} to be specified in the frame-format string to see
the current frame's compile unit language in "frame info".

Test Plan:
debug a C++ program, run to main, and run the lldb commands:
    settings set frame-format "frame lang=${language}\n"
    frame info
you should see:
    frame lang=c++
test case added in:
    ./dotest.py --executable lldb -f SettingsCommandTestCase.test_set_frame_format
Reviewers: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D10561

llvm-svn: 240440
2015-06-23 18:35:31 +00:00
Vince Harron e884389ce8 Adding some more flakey tests to the XFAIL list
llvm-svn: 240327
2015-06-22 20:54:14 +00:00
Dawn Perchik 8c6fe230d5 Enhance lldb-mi arguments test (MI)
SUMMARY:
Add additional arguments to lldb-mi args tests to make sure arguments with quotes are handled correctly.

Reviewers: ki.stfu
Subscribers: lldb-commits
Test Plan:
    ./dotest.py --executable lldb -f MiInterpreterExecTestCase.test_lldbmi_settings_set_target_run_args_before
    ./dotest.py --executable lldb -f MiInterpreterExecTestCase.test_lldbmi_settings_set_target_run_args_after
Differential Revision: http://reviews.llvm.org/D10523

llvm-svn: 240325
2015-06-22 20:41:57 +00:00
Siva Chandra 8cf78d1c64 [TestLoadUnload] Build the main inferior exe with -pie.
Test Plan: dotest.py -p TestLoadUnload on Android API >= 21

Reviewers: tberghammer

Subscribers: tberghammer, lldb-commits

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

llvm-svn: 240048
2015-06-18 20:33:56 +00:00
Tamas Berghammer 8b29af1427 Add new test for stress testing stack unwinding
This test case generates new tests from the source files dropped into
its directory. For stress testing stack unwinding it steps through the
code line by line and then tests unwinding from each instruction.

llvm-svn: 240030
2015-06-18 17:17:32 +00:00
Bruce Mitchener 58ef391f3e Fix a variety of typos.
No functional change.

llvm-svn: 239995
2015-06-18 05:27:05 +00:00
Pavel Labath 2f4749309c Add a test for expression evaluation while inferior is blocked in a syscall
Summary: The test is XFAILed for Linux x86_64 and i386 because of bug #23659.

Test Plan: NFC

Reviewers: tberghammer

Subscribers: lldb-commits, emaste

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

llvm-svn: 239973
2015-06-17 23:28:55 +00:00
Dawn Perchik 546cfe8f93 Add negative test for target.move-to-nearest-code=off using source location
Test Plan: ./dotest.py --executable lldb -f MiBreakTestCase.test_lldbmi_break_insert_settings
Reviewed By: clayborg, abidh
Differential Revision: http://reviews.llvm.org/D10486

llvm-svn: 239968
2015-06-17 22:56:03 +00:00
Siva Chandra 4470f3826c [TestLoadUnload] Enable for Android while skipping it for other remotes.
Summary:
This change adds all the necessary infrastructure required to
selectively enable and make TestLoadUnload work for Android. One test,
which tests the module search paths, is still kept disabled for remote
as search paths (because of module caching) are local anyway.

Reviewers: tberghammer

Reviewed By: tberghammer

Subscribers: emaste, lldb-commits, tberghammer

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

llvm-svn: 239965
2015-06-17 22:32:27 +00:00
Enrico Granata 443844c474 Revert r239873 - I actually want to think some more about this
llvm-svn: 239874
2015-06-17 02:11:48 +00:00
Enrico Granata ca201238ae Fix an issue where the oneliner printing of variables would ignore custom formatting
Because vector types use their formats in special ways (i.e. children get generated based on them), this change by itself would cause a regression in printing vector types with some custom formats
Work around that issue by special casing vector types out of this format-passdown mode. I believe there is a more general feature to be designed in this space, but until I see more cases of interest, I am going to leave this as a special case

Fixes rdar://20810062

llvm-svn: 239873
2015-06-17 02:06:24 +00:00
Greg Clayton f7d163a8ea Clear the "thread-format" setting after mucking with it.
llvm-svn: 239863
2015-06-16 23:09:37 +00:00
Tamas Berghammer 7ac23c3ae0 Fix compile error in TestCxxWCharT on Linux
llvm-svn: 239830
2015-06-16 16:58:34 +00:00
Enrico Granata bc2c2b0115 Add a formatter for wchar_t[N] arrays
rdar://21299888

llvm-svn: 239777
2015-06-15 23:01:47 +00:00
Oleksiy Vyalov 18f4c9f5a0 Mark TestMultithreaded as XTIMEOUT on Linux.
llvm-svn: 239450
2015-06-10 01:34:25 +00:00
Chaoren Lin f7160f3fba XFail pexpect tests for Windows hosts.
Reviewers: vharron, zturner

Subscribers: lldb-commits

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

llvm-svn: 239414
2015-06-09 17:39:27 +00:00
Chaoren Lin e6eea5d055 Skip TestInferiorChanged if host platform is windows.
Summary: Opened files on Windows cannot be modified, so this test doesn't make sense.

Reviewers: ovyalov, zturner, flackr, clayborg

Reviewed By: clayborg

Subscribers: lldb-commits

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

llvm-svn: 239359
2015-06-08 22:13:28 +00:00
Bruce Mitchener 1425b47773 [LLDB-MI] Properly detect missing mandatory arguments to MI commands
Summary:
Previously if an MI command had **X** mandatory and **Y** optional arguments you could provide **X** or more optional arguments without providing any of the mandatory arguments, and the argument validation code wouldn't complain.

For example this would pass argument validation even though the mandatory **address** and **count** arguments are missing:

-data-read-memory-bytes --thread 1 --frame 0

Part of the problem was that an empty string was considered a valid value for a mandatory argument, which didn't make much sense.

Patch by Vadim Macagon. Thanks!

Test Plan:
./dotest.py -A x86_64 -C clang --executable $BUILDDIR/bin/lldb tools/lldb-mi/

No unexpected failures on my Ubuntu 14.10 64bit Virtualbox VM.

Reviewers: domipheus, ki.stfu, abidh

Reviewed By: ki.stfu, abidh

Subscribers: brucem, lldb-commits

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

llvm-svn: 239297
2015-06-08 11:15:09 +00:00
Chaoren Lin a4447b338c Update dosep to display dotest command invoked on failure.
llvm-svn: 239258
2015-06-07 18:50:40 +00:00
Chaoren Lin bcd2786a6d Use skipIf instead of skipUnless in TestTerminal for better readability.
llvm-svn: 239220
2015-06-06 14:51:34 +00:00
Chaoren Lin 5d76b1b56e Fix TestAttachDenied and TestChangeProcessGroup for remote Windows to Android.
Summary: Updated `append_to_remote_wd` to work for both remote and local.

Reviewers: clayborg, ovyalov

Reviewed By: ovyalov

Subscribers: tberghammer, lldb-commits

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

llvm-svn: 239203
2015-06-06 00:25:50 +00:00
Chaoren Lin 05763f5752 Update TestGdbRemoteAbort and TestGdbRemoteSegFault to use `get_signal_number`.
Reviewers: clayborg, ovyalov

Reviewed By: ovyalov

Subscribers: lldb-commits

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

llvm-svn: 239201
2015-06-06 00:19:01 +00:00
Chaoren Lin bb2cc9cf56 Unique file names for TestStarted and TestFinished.
Summary: This fixes the issue of multiple test suites opening the same file for writing.

Reviewers: clayborg, zturner

Subscribers: lldb-commits

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

llvm-svn: 239188
2015-06-05 21:08:24 +00:00
Siva Chandra 77f20fc8d3 [TestGdbRemoteAbort] Skip on API 16 Android devices
Summary:
This change also adds the infrastructure required to specify the API
levels for which tests should be skipped.

Reviewers: chying, labath

Reviewed By: labath

Subscribers: tberghammer, lldb-commits

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

llvm-svn: 239183
2015-06-05 19:54:49 +00:00
Siva Chandra 29e0392944 [lldbtest] Use netloc instead of hostname to look up Android device ID.
Summary:
urlparse.ParseResult.hostname has only lowercase characters even if the
input URL had uppercase characters. Since Android device IDs can have
uppercase characters as well, use urlparse.ParseResult.netloc instead
and extract the device ID from it.

This change also improves the error message when lookup of the Android
device's API fails.

Reviewers: chaoren

Reviewed By: chaoren

Subscribers: tberghammer, lldb-commits

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

llvm-svn: 239173
2015-06-05 18:07:10 +00:00
Chaoren Lin 52cf8ecc23 Check before using platform specific attributes.
Summary: `os.uname` in TestUniversal and `os.geteuid` in TestTerminal.

Reviewers: clayborg, zturner

Subscribers: lldb-commits

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

llvm-svn: 239135
2015-06-05 06:28:43 +00:00
Siva Chandra 8af9166efe [TestChangeProcessGroup] Mark the test as xfail for Android API 16
Summary:
This change adds the infrastructure to mark tests as xfail for specific
Android API levels.

Test Plan: dotest.py TestChangeProcessGroup on an Android API 16 device.

Reviewers: chying, labath, chaoren

Reviewed By: labath, chaoren

Subscribers: tberghammer, lldb-commits

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

llvm-svn: 239126
2015-06-05 00:22:49 +00:00
Siva Chandra d772ef3d9f [TestGdbRemoteRegisterState] Do not flip ARM *psr register in the test
Summary:
Not all of that register is readable/writable in user mode. This means
that even if the inferior is stopped, parts of the register could be
changing. So, do not flip this register to check if its value can be
restored.

Reviewers: tberghammer, chaoren

Reviewed By: tberghammer

Subscribers: rengolin, aemerson, lldb-commits

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

llvm-svn: 239104
2015-06-04 22:04:04 +00:00
Ed Maste 8eeb3e290d Skip test failing on FreeBSD buildbot due to pexepect issues
The pexpect exception is not handled by expectedFailureFreeBSD, so just
skip the test for now.

llvm.org/pr22784

llvm-svn: 238977
2015-06-03 21:21:40 +00:00
Ed Maste dc8dd07e17 XFAIL TestPlatformCommand test failing on the FreeBSD buildbot
llvm.org/pr23747

llvm-svn: 238976
2015-06-03 21:21:00 +00:00
Enrico Granata d595733617 Fix a bug where trying to Dump() a ValueObject would use the static/non-synthetic version of the value even if the ValueObject one actually called Dump() on turned out to be dynamic and/or synthetic
This was of course overridable by using DumpValueObjectOptions, but the default should be saner and the previous behavior made for a few fun investigations....

rdar://problem/21065149

llvm-svn: 238961
2015-06-03 20:43:54 +00:00
Greg Clayton b2e0c11982 Fixed "format-string" based settings so they can have quotes on them without leaving the quotes in the format string:
(lldb) settings set thread-format "abc"
(lldb) settings set thread-format 'abc'
(lldb) settings set thread-format abc

We strip the quotes before processing the format string and return an "error: mismatched quotes" if mismatched quotes are given.

<rdar://problem/21210789>

llvm-svn: 238896
2015-06-03 02:02:48 +00:00
Chaoren Lin e79b472162 Update TestConcurrentEvents to use UnixSignals instead of python signals.
Reviewers: clayborg, ovyalov

Reviewed By: ovyalov

Subscribers: lldb-commits

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

llvm-svn: 238872
2015-06-02 21:54:22 +00:00
Greg Clayton 5e3f20d791 Fixed the logic to determine the TRIPLE_VERSION correctly when it isn't specified.
llvm-svn: 238871
2015-06-02 21:42:31 +00:00
Greg Clayton 315b88d0cf Added the ability for the "make" command to take a triple:
% cd lldb/test/lang/c/array_types
% make TRIPLE=x86_64-apple-ios
% make clean
% make TRIPLE=x86_64-apple-ios8.1
% make clean
% make TRIPLE=armv7-apple-ios
% make clean
% make TRIPLE=armv7-apple-ios8.1
% make clean

The TRIPLE variable will automatically set the following variables:
    SDKROOT if it isn't specified manually
    ARCH will be set to the architecture from the triple
    CFLAGS will include the extras needed for the triple which are set in TRIPLE_CFLAGS
    TRIPLE_VENDOR set to the triple vendor ("apple" in the above cases)
    TRIPLE_OS set to the triple OS ("ios" in the above cases)
    TRIPLE_VERSION set to the version that was specified, or automatically set to the SDK version if it is missing

This allows you to change directory into any test case on MacOSX and quickly build for desktop:

% make

iOS simulator:

% make TRIPLE=x86_64-apple-ios

or iOS device:

% make TRIPLE=armv7-apple-ios

llvm-svn: 238869
2015-06-02 21:38:10 +00:00
Chaoren Lin c168c92b78 Use wildcard instead of relying on shell globbing.
Reviewers: clayborg, zturner

Subscribers: lldb-commits

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

llvm-svn: 238859
2015-06-02 19:07:26 +00:00
Chaoren Lin 264e542083 Check that debugger is valid before enumerating targets.
Reviewers: sivachandra

Subscribers: lldb-commits

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

llvm-svn: 238857
2015-06-02 18:31:57 +00:00
Ed Maste e1abaf870f TestGlobalVariables no longer fails on FreeBSD
It has passed since ~ r223393.

llvm.org/21599

llvm-svn: 238856
2015-06-02 18:29:42 +00:00
Chaoren Lin 677acee503 Use new get_signal_number utility function for tests.
Summary:
This fixes TestLldbGdbServer and TestSendSignal from Windows to Android.
This change depends on D10171.

Reviewers: clayborg, ovyalov

Reviewed By: clayborg, ovyalov

Subscribers: tberghammer, lldb-commits

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

llvm-svn: 238852
2015-06-02 17:01:13 +00:00
Chaoren Lin f59d050968 Added utility function to get correct signal number from remote platform.
Summary:
This change adds a utility that uses the `kill -l` command to get the
correct signal number. Falls back to using `SBUnixSignals`, and finally
`signal.SIG<signal>` if all else fails.

Reviewers: tberghammer, clayborg, ovyalov

Reviewed By: clayborg, ovyalov

Subscribers: tberghammer, lldb-commits

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

llvm-svn: 238850
2015-06-02 16:46:28 +00:00
Chaoren Lin 7d76a13bf3 Fix OBJCOPY and AR for Android.
Summary:
Previously, OBJCOPY was empty because of the missing comma,
and ar was just `ar`.

Reviewers: ovyalov, tberghammer

Subscribers: tberghammer, lldb-commits

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

llvm-svn: 238849
2015-06-02 16:43:19 +00:00
Tamas Berghammer 0b11db50dd Mark TestHelloWorld as XTIMEOUT for Linux
It is times out on the build bot ~10% of the times

llvm-svn: 238836
2015-06-02 14:45:25 +00:00
Ed Maste c5603ec44c Skip TestChangeProcessGroup on FreeBSD for now
It consistently times out. The test is already XTIMEOUT'd, but causes
tests to take an extra 5 minutes waiting for the timeout to expire.

llvm.org/pr23731

llvm-svn: 238833
2015-06-02 14:11:25 +00:00
Pavel Labath 8e9c266a77 Un-enable TestEvents test on linux
Test still seems to fail about 1/10 runs. Skipping the test, but it a more greppable fashion.

llvm-svn: 238826
2015-06-02 12:50:25 +00:00
Pavel Labath e0f9708410 Enable TestEvents test on linux
This test was very inconspicuosly skipped on linux, when it was crashing for local debugging. It
seems to work fine with LLGS, so I'm enabling it.

llvm-svn: 238816
2015-06-02 10:19:33 +00:00
Adrian McCarthy 3ae7492b2d Fix TestJoinAfterBreak test on Windows
llvm-svn: 238787
2015-06-01 21:51:50 +00:00
Chaoren Lin 273aea894f Dump error if dotest itself fails and no tests were run.
Reviewers: zturner, clayborg

Subscribers: lldb-commits

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

llvm-svn: 238771
2015-06-01 19:06:01 +00:00
Chaoren Lin 5e3ab2b95f Updated dosep.py to output progress and dump std{out,err} on test failure.
Reviewers: vharron, clayborg, zturner

Subscribers: lldb-commits

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

llvm-svn: 238765
2015-06-01 17:49:25 +00:00