Commit Graph

1125 Commits

Author SHA1 Message Date
Pavel Labath a68e048233 Extend android xfail in TestTopLevelExprs
The test fails on API level 19 as well. I'm going to assume that it
fails on every API level below 23.

llvm-svn: 317474
2017-11-06 12:34:27 +00:00
Pavel Labath e6a661053d Add float/vector registers for ppc64le
Summary: Add read and write functions for VSX, VMX and float registers and fix watchpoint size

Reviewers: clayborg

Reviewed By: clayborg

Subscribers: eugene, labath, clayborg, nemanjai, kbarton, JDevlieghere, anajuliapc, gut, lbianc, lldb-commits

Differential Revision: https://reviews.llvm.org/D39487
Patch by: Alexandre Yukio Yamashita <alexandre.yamashita@eldorado.org.br>

llvm-svn: 317329
2017-11-03 15:22:36 +00:00
Pavel Labath 6cf1aa5f5f Xfail test_stack_info_in_minidump test
The test has been failing since we enabled the i386 ABI plugin on
windows. See pr35193 for details.

llvm-svn: 317326
2017-11-03 14:42:37 +00:00
Pavel Labath 09bdfb32ef Fix classifications on two concurrent event tests
I have classified one as a watchpoint test even though it wasn't and
vice versa. Fix that.

llvm-svn: 317319
2017-11-03 12:13:22 +00:00
Pavel Labath 64b6e5af13 Remove getCategories mechanism of specifying test categories
Summary:
This mechanism was mostly redundant with the file-based .categories
mechanism, and it was interfering with it, as any test which implemented
a getCategories method would not inherit the filesystem categories.

This patch removes it. The existing categories are preserved either by
adding a .categories file, or using the @add_test_categories decorator.

Reviewers: jingham, clayborg, zturner

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D39515

llvm-svn: 317277
2017-11-02 22:13:09 +00:00
Pavel Labath 03304427a9 Remove android watchpoint xfails
Now that the wathpoint tests have their own category, we can easily skip
them on devices which don't have watchpoint support. Therefore, we don't
need an android xfail on each of these tests.

llvm-svn: 317276
2017-11-02 22:12:55 +00:00
Jason Molenda 2350272187 Revert r317182 for https://reviews.llvm.org/D39128
we're still failing on android.  I'll ask Larry to 
ask Pavel for any tips he might be able to give.

llvm-svn: 317183
2017-11-02 03:17:07 +00:00
Jason Molenda edc2def4a6 Commit Lawrence D'Anna's patch to change
SetOututFileHandle to work with IOBase.

I did make one change after checking with Larry --
I renamed SBDebugger::Flush to FlushDebuggerOutputHandles
and added a short docstring to the .i file to make it
a little clearer under which context programs may need
to use this API.

Differential Revision: https://reviews.llvm.org/D39128
<rdar://problem/34870417> 

llvm-svn: 317182
2017-11-02 02:43:27 +00:00
Pavel Labath cf82cc3d54 dotest: consistently call finalize_build_dictionary in debug info variants
dwarf&dwo versions were doing it, but gmodules and dsym weren't. All
this function does right now is pass OS=Android to make when targeting
android. This enables us to run dotest without manually passing --env
OS=Android.

llvm-svn: 317130
2017-11-01 22:01:03 +00:00
Pavel Labath e0d51846f2 Add data formatter for libc++ std::queue
Summary:
std::queue is just a fancy wrapper around another container, so all we
need to do is to delegate to the it.

Reviewers: jingham, EricWF

Subscribers: srhines, mgorny, lldb-commits, eugene

Differential Revision: https://reviews.llvm.org/D35666

llvm-svn: 317099
2017-11-01 15:52:08 +00:00
Pavel Labath 333739d0e2 Add data formatter for libc++ std::tuple
Reviewers: jingham, EricWF

Subscribers: srhines, eugene, lldb-commits, mgorny

Differential Revision: https://reviews.llvm.org/D35615

llvm-svn: 317095
2017-11-01 15:19:52 +00:00
Pavel Labath 22e71a030e Add a "watchpoint" test category and annotate tests appropriately
Most of the watchpoint tests are organized into subtrees, so we can use the
file-based .categories approach to annotate them. The exception are the
concurrent_events tests, which needed to be annotated on a per-test basis.

The motivation behind this is to provide an easy way to disable watchpoint
tests on systems where the watchpoint functionality is not present/unreliable.

llvm-svn: 317004
2017-10-31 15:27:19 +00:00
Pavel Labath 89ac0c7d32 Add data formatter for libc++'s forward_list
Summary:
This adds a data formatter for the implementation of forward_list in
libc++. I've refactored the existing std::list data formatter a bit to
enable more sharing of code (mainly the loop detection stuff).

Reviewers: jingham, EricWF

Subscribers: srhines, eugene, lldb-commits

Differential Revision: https://reviews.llvm.org/D35556

llvm-svn: 316992
2017-10-31 12:27:43 +00:00
Pavel Labath 7344790005 Android.rules: build with "unified android headers"
Unified headers will be the only way to build applications in NDK r16,
and it also works with NDK r15.

This also bumps the minimum supported android version to 16.

llvm-svn: 316985
2017-10-31 10:33:03 +00:00
Pavel Labath 64325c51ad Split makefile for TestTopLevelExprs
this test was using a single makefile to build two executables. This
setup, although not supported by Makefile.rules, happened to
work in most configurations, except when building with the android ndk
r16.

Here I move the building of the second executable to a separate
makefile, which is the solution other tests use for multiple targets.

llvm-svn: 316982
2017-10-31 10:01:30 +00:00
Pavel Labath 86cf0856ae Fix TestMinidump for r316673
The test was asserting that we can only find one frame in the minidump.
Now that we have the default unwind plan from the ABI plugin, we are
able to find 5 more frames using the frame pointer chaining. Correct the
expectation in the test.

llvm-svn: 316688
2017-10-26 19:08:34 +00:00
Pavel Labath 8c80a377ba Makefile.rules: move CFLAGS_EXTRAS to the end of compile line
This makes sure that any options specified there override generic
compiler options.

This fixes TestBreakpointIt.py

llvm-svn: 316629
2017-10-25 23:56:17 +00:00
Pavel Labath 13e37d4d0a Move StopInfoOverride callback to the new architecture plugin
This creates a new Architecture plugin and moves the stop info override
callback to this place. The motivation for this is to remove complex
dependencies from the ArchSpec class because it is used in a lot of
places that (should) know nothing about Process instances and StopInfo
objects.

I also add a test for the functionality covered by the override
callback.

Differential Revision: https://reviews.llvm.org/D31172

llvm-svn: 316609
2017-10-25 21:05:31 +00:00
Pavel Labath c2400fc0d5 Move testcases/arm_emulation to testcases/arm/emulation
This creates space for addidional arm-specific tests. I will be adding
one of those in a follow-up commit.

llvm-svn: 316608
2017-10-25 21:05:10 +00:00
Pavel Labath e3f6eb1a74 Revert "[lldbtests] Handle errors instead of crashing."
The commit breaks the case where you specify just a filename to the
compiler. Previously, it would look up the compiler in your path, now it
complains that the compiler is not found. One of the lldb buildbots is
depending on this. It seems like a nice feature to have, as it means
less typing and being able to avoid hard-coding the system compiler path
in the bot config.

This reverts commit r316393.

llvm-svn: 316451
2017-10-24 16:07:50 +00:00
Davide Italiano 252d7bdc67 [lldbtests] Handle errors instead of crashing.
If you pass an invalid compiler/debugger path on the cmdline to `dotest.py`  this is what you get.

  Traceback (most recent call last):
  [...]
    File "dotest.py", line 7, in <module>
      lldbsuite.test.run_suite()
  [...]

And with the patch applied:

  /home/davide/work/build-lldb/bin/clandasfasg is not a valid path, exiting

Differential Revision:  https://reviews.llvm.org/D39199

llvm-svn: 316393
2017-10-23 23:17:53 +00:00
Pavel Labath f877a0820c Use ipv4 localhost address in lldb-server tests
Since the ipv6 patch, we've experienced occasional flakyness in
lldb-server tests. This was due to the fact that lldb-server was trying
to listen on both v4 and v6 localhost sockets (and consider it a success
if at least one of them succeeded), while the test framework was only
trying to connect to the v4 one.

This change makes sure lldb-server only listens on the v4 socket.

llvm-svn: 316391
2017-10-23 23:15:37 +00:00
Davide Italiano 9e03e17df1 [lldbtest] Simplify removing an unneeded else. NFCI.
llvm-svn: 316355
2017-10-23 17:51:22 +00:00
Leonard Mosescu 17ffd39ed8 Implement interactive command interruption
The core of this change is the new CommandInterpreter::m_command_state,
which models the state transitions for interactive commands, including
an "interrupted" state transition.

In general, command interruption requires cooperation from the code
executing the command, which needs to poll for interruption requests
through CommandInterpreter::WasInterrupted().

CommandInterpreter::PrintCommandOutput() implements an optionally
interruptible printing of the command output, which for large outputs 
was likely the longest blocking part.
(ex. target modules dump symtab on a complex binary could take 10+ minutes)

Differential Revision: https://reviews.llvm.org/D37923

llvm-svn: 315037
2017-10-05 23:41:28 +00:00
Jason Molenda a7e7d90d9f Move install_name_tool to a separate make target.
llvm-svn: 314731
2017-10-02 22:11:22 +00:00
Eugene Zemtsov 74e94836e7 Fix Android remote debugging tests running on Windows
Use make based OS check, instad of relying on shell.

llvm-svn: 314488
2017-09-29 03:25:25 +00:00
Jason Molenda 11ff56c958 Add support for running the lldb testsuite against an apple watch
running watchos.  These tests cannot run on normal customer devices,
but I hope to some day have a public facing bot running against a
device.

llvm-svn: 314355
2017-09-27 22:12:54 +00:00
Jason Molenda ce9606dd4f Remove the details of the libstdc++ implementation that were
in TestDataFormatterSkipSummary.py - I'm building this test
with the default c++ library.

Skip TestMTCSimple.py when running for i386.

llvm-svn: 314155
2017-09-25 21:23:37 +00:00
Jason Molenda 8652b249e6 Initial patchset to get the testsuite running against armv7 and arm64 iOS devices.
Normal customer devices won't be able to run these tests, we're hoping to get
a public facing bot set up at some point.  Both devices pass the testsuite without
any errors or failures.

I have seen some instability with the armv7 test runs, I may submit additional patches
to address this.  arm64 looks good.

I'll be watching the bots for the rest of today; if any problems are introduced by
this patch I'll revert it - if anyone sees a problem with their bot that I don't
see, please do the same.  I know it's a rather large patch.

One change I had to make specifically for iOS devices was that debugserver can't 
create files.  There were several tests that launch the inferior process redirecting
its output to a file, then they retrieve the file.  They were not trying to test
file redirection in these tests, so I rewrote those to write their output to a file
directly.

llvm-svn: 314132
2017-09-25 18:19:39 +00:00
Chris Bieneman 9568a5102e Revert "Initial patchset to get the testsuite running against armv7 and arm64 iOS devices. Normal customer devices won't be able to run these devices, we're hoping to get a public facing bot set up at some point. Both devices pass the testsuite without any errors or failures."
This patch has been causing LLDB test failures on ObjC tests. A test log
may still be available here:

http://lab.llvm.org:8080/green/view/LLDB/job/lldb/1650/

This reverts commit r314038.

llvm-svn: 314122
2017-09-25 17:31:40 +00:00
Jason Molenda 0187a8f6f9 Initial patchset to get the testsuite running against armv7 and arm64 iOS devices.
Normal customer devices won't be able to run these devices, we're hoping to get
a public facing bot set up at some point.  Both devices pass the testsuite without
any errors or failures.

I have seen some instability with the armv7 test runs, I may submit additional patches
to address this.  arm64 looks good.

I'll be watching the bots for the rest of today; if any problems are introduced by
this patch I'll revert it - if anyone sees a problem with their bot that I don't
see, please do the same.  I know it's a rather large patch.

One change I had to make specifically for iOS devices was that debugserver can't 
create files.  There were several tests that launch the inferior process redirecting
its output to a file, then they retrieve the file.  They were not trying to test
file redirection in these tests, so I rewrote those to write their output to a file
directly.

llvm-svn: 314038
2017-09-22 22:34:53 +00:00
Jason Molenda 2d5d71c061 Revert this patch; I was emailing with Eugene and they have some other changes going
in today and don't want the two changes to confuse the situation with the build bots.
I'll commit tomorrow once they're known good.

llvm-svn: 313934
2017-09-21 23:02:56 +00:00
Jason Molenda 182a8083c1 Initial patchset to get the testsuite running against armv7 and arm64 iOS devices.
Normal customer devices won't be able to run these devices, we're hoping to get
a public facing bot set up at some point.

There will be some smaller follow-on patches.  The changes to tools/lldb-server are
verbose and I'm not thrilled with having to skip all of these tests manually.
There are a few places where I'm making the assumption that "armv7", "armv7k", "arm64"
means it's an ios device, and I need to review & clean these up with an OS check
as well.  (Android will show up as "arm" and "aarch64" so by pure luck they shouldn't
cause problems, but it's not an assumption I want to rely on).

I'll be watching the bots for the rest of today; if any problems are introduced by
this patch I'll revert it - if anyone sees a problem with their bot that I don't
see, please do the same.  I know it's a rather large patch.

One change I had to make specifically for iOS devices was that debugserver can't 
create files.  There were several tests that launch the inferior process redirecting
its output to a file, then they retrieve the file.  They were not trying to test
file redirection in these tests, so I rewrote those to write their output to a file
directly.

llvm-svn: 313932
2017-09-21 23:00:19 +00:00
Adrian McCarthy 3887ba8d38 Re-land r313210 - Fix for bug 34532 - A few rough corners related to post-mortem debugging (core/minidump)
The main change is to avoid setting the process state as running when
debugging core/minidumps (details in the bug).  Also included a few small,
related fixes around how the errors propagate in this case.

Fixed the FreeBSD/Windows break: the intention was to keep
Process::WillResume() and Process::DoResume() "in-sync", but this had the
unfortunate consequence of breaking Process sub-classes which don't override
WillResume().

The safer approach is to keep Process::WillResume() untouched and only
override it in the minidump and core implementations.

patch by lemo

Bug: https://bugs.llvm.org/show_bug.cgi?id=34532

Differential Revision: https://reviews.llvm.org/D37651

llvm-svn: 313655
2017-09-19 18:07:33 +00:00
Adrian McCarthy 8f31dc9754 Revert "Fix for bug 34532 - A few rough corners related to post-mortem debugging (core/minidump)"
Broke Windows and FreeBSD (at least).

This reverts commit 628ca7052b4a5dbace0f6205409113e12c8a78fa.

llvm-svn: 313540
2017-09-18 15:59:44 +00:00
Jim Ingham e9632ebab3 Wire up the breakpoint name help string.
llvm-svn: 313327
2017-09-15 00:52:35 +00:00
Jim Ingham b842f2ecf0 Make breakpoint names real entities.
When introduced, breakpoint names were just tags that you could
apply to breakpoints that would allow you to refer to a breakpoint
when you couldn't capture the ID, or to refer to a collection of
breakpoints.  

This change makes the names independent holders of breakpoint options
that you can then apply to breakpoints when you add the name to the
breakpoint.  It adds the "breakpoint name configure" command to set
up or reconfigure breakpoint names.  There is also full support for
then in the SB API, including a new SBBreakpointName class.

The connection between the name and the breakpoints
sharing the name remains live, so if you reconfigure the name, all the
breakpoint options all change as well.  This allows a quick way
to share complex breakpoint behavior among a bunch of breakpoints, and
a convenient way to iterate on the set.

You can also create a name from a breakpoint, allowing a quick way
to copy options from one breakpoint to another.

I also added the ability to make hidden and delete/disable protected
names.  When applied to a breakpoint, you will only be able to list,
delete or disable that breakpoint if you refer to it explicitly by ID.

This feature will allow GUI's that need to use breakpoints for their
own purposes to keep their breakpoints from getting accidentally 
disabled or deleted.

<rdar://problem/22094452>

llvm-svn: 313292
2017-09-14 20:22:49 +00:00
Jim Ingham 3568319679 Commands are -d to break modify, not -C.
The auto-continue test was using the new (better) name
for providing commands (-C) but I haven't checked in that change
yet.  Put the test back to the old way for now.

llvm-svn: 313221
2017-09-14 00:27:36 +00:00
Jim Ingham cc40ef859a Forgot to svn add the test cases for breakpoint auto-continue flag.
Adding that now.

llvm-svn: 313216
2017-09-13 23:43:26 +00:00
Adrian McCarthy 5fc4fa54db Fix for bug 34532 - A few rough corners related to post-mortem debugging (core/minidump)
The main change is to avoid setting the process state as running when
debugging core/minidumps (details in the bug).

Also included a few small, related fixes around how the errors propagate in
this case.

patch by lemo

Bug: https://bugs.llvm.org/show_bug.cgi?id=34532

Differential Revision: https://reviews.llvm.org/D37651

llvm-svn: 313210
2017-09-13 22:57:11 +00:00
Eugene Zemtsov a2aa64760d Fix test_attach_to_process_from_different_dir_by_id test on Windows
On Windows a process can't delete its own current direcotry, that's why the test
needs to return to the original direcotry before removing newdir.

llvm-svn: 313113
2017-09-13 02:44:24 +00:00
Ted Woodward 9927431d81 Fix lldb-mi test data_read_memory_bytes_global
Summary:
Test was skipped because -data-evaluate-expression was thought
to not work on globals. This is not the case - the issue was clang
removes debug info for globals in cpp files that are not used.

Add a reference to the globals in question, and fix memory patter in
test to match memory pattern in testcase.

Reviewers: ki.stfu, abidh

Reviewed By: ki.stfu

Subscribers: aprantl, lldb-commits

Differential Revision: https://reviews.llvm.org/D37533

llvm-svn: 312726
2017-09-07 16:24:39 +00:00
Ed Maste a64594da50 Add test case for attach-by-pid from different cwd
This was failing on FreeBSD prior to r312430.
Patch by Vignesh Balu.

Differential Revision:	https://reviews.llvm.org/D32522

llvm-svn: 312431
2017-09-03 01:44:35 +00:00
Saleem Abdulrasool 5b7cc3600a test: fix missed test
I had built without python bindings and did not find this in the grep
output.  Adjust the test output for the printing format update.

llvm-svn: 311582
2017-08-23 18:05:19 +00:00
Saleem Abdulrasool bf2a8a2878 Process: fix FXSAVE on x86
The FXSAVE member `ftw` (FPU Tag Word) was given the wrong size (8-bit)
instead of the correct width (16-bit) as per the x87 Programmer's
Manual.  Adjust this to ensure that we print out the complete value for
the register.

llvm-svn: 311579
2017-08-23 17:23:12 +00:00
Ed Maste 93cdee661c remove FreeBSD xfail decorator from TestCppNsImport
The Linux xfail decorator was removed in r272326 with the claim that the
test "runs reliably on the linux x86 buildbot." It also runs reliably on
FreeBSD for me.

llvm.org/pr25925

llvm-svn: 310644
2017-08-10 18:26:52 +00:00
Ed Maste 140dd57242 remove FreeBSD xfail decorator from TestCallStdStringFunction
This test is consistently reporting unexpected pass for me on FreeBSD
10 and 12. It was failing on the old FreeBSD buildbot which has now been
retired for some time. Will investigate further if this fails once a new
buildbot is configured and running tests.

llvm.org/pr17807

llvm-svn: 310626
2017-08-10 17:01:51 +00:00
Ed Maste e3842476de remove FreeBSD xfail decorator from TestExitDuringBreak
This test passes for me on FreeBSD 10 and 12(-CURRENT).

llvm.org/pr18190

llvm-svn: 310624
2017-08-10 16:48:36 +00:00
Ed Maste 5e82ca353d Report inferior signals as signals, not exceptions, on FreeBSD
This is the FreeBSD equivalent of r238549.

This serves 2 purposes:

* LLDB should handle inferior process signals SIGSEGV/SIGILL/SIGBUS/
  SIGFPE the way it is suppose to be handled. Prior to this fix these
  signals will neither create a coredump, nor exit from the debugger
  or work for signal handling scenario.
* eInvalidCrashReason need not report "unknown crash reason" if we have
  a valid si_signo

llvm.org/pr23699

Patch by Karnajit Wangkhem

Differential Revision:	https://reviews.llvm.org/D35223

llvm-svn: 310591
2017-08-10 13:47:17 +00:00
Vadim Macagon 48df75fc65 Fix PlatformPythonTestCase.test_platform_list for the build bots
llvm-svn: 310488
2017-08-09 15:49:15 +00:00