This patch was generating by running `2to3` on the files in the
lldb/test directory. This patch should be NFC, but it does
introduce the `from __future__ import print_function` line, which
will break future uses of the print statement.
llvm-svn: 250763
It was adding all the test infrastructure paths properly, but it
was not adding the lldb module. The current approach only adds the
lldb from the path. That can be improved (in the comments) to add
the one from the related build directory if it can be ascertained.
With this change, lldb tests can be run through pylint/flake8
and have the lldb module found and used as part of the checks.
llvm-svn: 250453
disabled the use of the jThreadGetExtendedInfo packet which is used
to retrieve additional information about a thread, such as the QoS
setting for that thread on darwin systems.
Re-enable the use of the jThreadGetExtendedInfo packet, and add
some quick tests to the TestQueues mac test case which will verify
that we can retrieve the QoS names for these test threads.
<rdar://problem/22925096>
llvm-svn: 250364
Summary:
This commit adds support for binary memory reads ($x) to lldb-server. It also removes the "0x"
prefix from the $x client packet, to make it more compatible with the old $m packet. This allows
us to use almost the same code for handling both packet types. I have verified that debugserver
correctly handles $x packets even without the leading "0x". I have added a test which verifies
that the stub returns the same memory contents for both kinds of memory reads ($x and $m).
Reviewers: tberghammer, jasonmolenda
Subscribers: iancottrell, lldb-commits
Differential Revision: http://reviews.llvm.org/D13695
llvm-svn: 250295
* ArchSpec::MergeFrom() would erroneously promote an unspecified
unknown to a specified unknown when both the ArchSpec and the merged
in ArchSpec were both unspecified unknowns. This no longer happens,
which fixes issues with global module cache lookup in some
situations.
* Added ArchSpec::DumpTriple(Stream&) that now properly prints
unspecified unknowns as '*' and specified unknows as 'unknown'.
This makes it trivial to tell the difference between the two.
Converted printing code over ot using DumpTriple() rather than
building from scratch.
* Fixed up a couple places that were not guaranteeing that an
unspecified unknown was recorded as such.
llvm-svn: 250253
Summary:
Test decorators were ignoring AttributeError exceptions. These were introduced three years ago,
and copied to all decorators. They seem to serve no purpose and removing them produces no errors.
Given that they have prevented us from noticing the problem in r249819, I am removing them.
Reviewers: zturner, tfiala
Subscribers: iancottrell, lldb-commits
Differential Revision: http://reviews.llvm.org/D13583
llvm-svn: 250038
* XFAIL it for android arm/aarch64 as watchpoints aren't supported there
* Remove the dwarf/dsym test separation as they will be generated automatically
llvm-svn: 250024
Summary:
- Changed from 16 bits to 8 bits for Intel Architecture
-- FXSAVE structure now conforms with the layout of FXSAVE
area specified by IA Architecture Software Developer Manual
- Modified Linux and FreeBSD specific files to support this change
-- MacOSX already uses 8 bits for ftag register
- Modified TestRegisters.py and a.cpp:
-- Change allows 8 bit comparison of ftag values
-- Change resolves Bug 24733:
Removed XFAIL for Clang as the test works and passes for
Clang compiler as well
-- Change provides a Generic/Better way of testing Bug 24457
and Bug 25050 by using 'int3' inline assembly in inferior
Signed-off-by: Abhishek Aggarwal <abhishek.a.aggarwal@intel.com>
Reviewers: ovyalov, jingham, clayborg
Subscribers: tfiala, emaste
Differential Revision: http://reviews.llvm.org/D13587
llvm-svn: 250022
Summary: On x86, we only have 4 watchpoint registers.
Reviewers: mohit.bhakkad
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D13608
llvm-svn: 249916
Summary:
Log files produced by dotest have names derived from the test name, and this produces errors in
case we have multiple tests with the same name. Additionally, it's good if the test name explains
what the test is testing (which it clearly doesn't do well if there are multiple tests with
identical names). This commit makes the presence of such tests a hard error.
Reviewers: tberghammer, zturner
Subscribers: iancottrell, lldb-commits
Differential Revision: http://reviews.llvm.org/D13588
llvm-svn: 249828
We want to skip these tests when the target platform is darwin, not
when the host because they have to be enabled in case of darwin ->
android
llvm-svn: 249825
Summary:
In bug 24074, the type information is not shown
correctly. This commit includes the following -
-> Changes for displaying correct type based on
current lexical scope for the command "image
lookup -t"
-> The corresponding testcase.
-> This patch was reverted due to segfaults in
FreeBSD and Mac, I fixed the problems for both now.
Reviewers: emaste, granata.enrico, jingham, clayborg
Differential Revision: http://reviews.llvm.org/D13290
llvm-svn: 249673
Summary: This change fixes pr24916. As associated test has been added.
Reviewers: clayborg
Subscribers: zturner, lldb-commits
Differential Revision: http://reviews.llvm.org/D13224
llvm-svn: 249629
If a string contained characters outside the ASCII range, lldb-mi would
print them as hexadecimal codes. This patch fixes this behaviour by
converting to UTF-8 instead, by having lldb-mi use registered type
summary providers, when they are available. This patch also fixes
incorrect evaluation of some composite types, like std::string, by
having them use a type registered type summary provider.
Based on patch from evgeny.leviant@gmail.com
Reviewed by: ki.stfu, granata.enrico, clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D13058
llvm-svn: 249597
Introduce the notion of Language-based formatter prefix/suffix
This is meant for languages that share certain data types but present them in syntatically different ways, such that LLDB can now have language-based awareness of which of the syntax variations it has to present to the user when formatting those values
This is goodness for new languages and interoperability, but is NFC for existing languages. As such, existing tests cover this
llvm-svn: 249587
Previously we haven't cleaned up the working directory we created on
the remote platform and because of it we run out of storage on some
android device/emulator (caused by the 2x increase of the number of
test cases because of dwo).
llvm-svn: 249541
dwo symbol files are generated when code compiled with the "-gsplit-dwarf"
command option (https://gcc.gnu.org/wiki/DebugFission). This CL modifies
the test system to run tests with inferiors compile with the "-gsplit-dwarf"
Differential revision: http://reviews.llvm.org/D13300
llvm-svn: 249530
Go tests fail on Ubuntu 14.04's go1.2.1. This change puts a minimum
go version in the skipUnlessGoInstalled() decorator of go1.3.0.
Go maintainers are encouraged to modify as needed. For now this fixes
failing tests on Ubuntu 14.04 x86_64 buildbots with stock distro go installed.
llvm-svn: 249446
4-core CPUs have a hard time keeping up with the number of debuggers
we were simultaneously spawning. This leads to a timeout, which
leaves processes hanging around in "suspended mode", which can't be
killed with signals.
llvm-svn: 249421
Rename the python source file for DataFormatterOSTypeTestCase to match
the purpose of the test and to avoid a name conflict with
DataFormatterBoolRefPtr. The name conflict caused a race condition in
the test runner what we have to address separately.
llvm-svn: 249407
TestDiamond and TestSBValueCast were due to a bug in clang. That
bug has been fixed, so xfail is removed. However fixing that bug
exposed another bug in clang, which is not yet fixed. That bug
causes one test to start crashing, and another to fail unexpectedly
so the status of those tests is updated as well.
llvm-svn: 249208
This patch adds a --start option to the lldb-mi -exec-run command for
getting process stopped at entry point after launch. It is equivelent
to the -s option in the lldb command line interpreter:
process launch -s
and is therefore not supported on all hosts and/or targets. To check
if the --start option is supported, see if the corresponding feature
"exec-run-start-option" is in the list of options reported by the lldb-mi
"-list-features" command.
Patch from engineer.developer@gmail.com (Kirill Lapshin)
Reviewed by: ki.stfu
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12977
llvm-svn: 249072
Part of https://llvm.org/bugs/show_bug.cgi?id=25002
In writing the new process_control test included here,
I discovered that the scenario would hang indefinitely,
bypassing the timeout logic.
This fixes the indefinite hang, converting an error
in the new test to a failure. I'll fix the failure
next. This one was heinous enough to fix on its own,
though.
llvm-svn: 248936
This test was timing out because the test inferior was forking a child, which was not terminated
correctly. The test contained provisions to terminate this child, but these were no longer
working. The idea was to wake up upon receiving SIGTERM and then kill the child. However, this
was failing because the test first tried to use SIGHUP, which ended up killing the inferior.
Fix: make sure we catch SIGHUP also.
llvm-svn: 248889
Currently most of the test files have a separate dwarf and a separate
dsym test with almost identical content (only the build step is
different). With adding dwo symbol file handling to the test suit it
would increase this to a 3-way duplication. The purpose of this change
is to eliminate this redundancy with generating 2 test case (one dwarf
and one dsym) for each test function specified (dwo handling will be
added at a later commit).
Main design goals:
* There should be no boilerplate code in each test file to support the
multiple debug info in most of the tests (custom scenarios are
acceptable in special cases) so adding a new test case is easier and
we can't miss one of the debug info type.
* In case of a test failure, the debug symbols used during the test run
have to be cleanly visible from the output of dotest.py to make
debugging easier both from build bot logs and from local test runs
* Each test case should have a unique, fully qualified name so we can
run exactly 1 test with "-f <test-case>.<test-function>" syntax
* Test output should be grouped based on test files the same way as it
happens now (displaying dwarf/dsym results separately isn't
preferable)
Proposed solution (main logic in lldbtest.py, rest of them are test
cases fixed up for the new style):
* Have only 1 test fuction in the test files what will run for all
debug info separately and this test function should call just
"self.build(...)" to build an inferior with the right debug info
* When a class is created by python (the class object, not the class
instance), we will generate a new test method for each debug info
format in the test class with the name "<test-function>_<debug-info>"
and remove the original test method. This way unittest2 see multiple
test methods (1 for each debug info, pretty much as of now) and will
handle the test selection and the failure reporting correctly (the
debug info will be visible from the end of the test name)
* Add new annotation @no_debug_info_test to disable the generation of
multiple tests for each debug info format when the test don't have an
inferior
Differential revision: http://reviews.llvm.org/D13028
llvm-svn: 248883
The timeout mechanism has been implemented in python,
so there is no more dependence on external utilities
for timing out an inferior dotest.py process.
Platform-specific bits are implemented for POSIX-like
and Windows platforms. There is a small class named
ProcessHelper in process_control.py that needs to be
overridden for platforms that fall outside of the
POSIX-like and Windows platforms.
See http://reviews.llvm.org/D13124 for more details.
llvm-svn: 248834
See the script comments for how to modify your
pylintrc file (e.g. $HOME/.pylintrc) to support
always finding the lldb-specific Python library
directories.
With the pylintrc modification using this script,
the lldb python tests and test inferstructure can
be linted on any of potentially multiple lldb source
trees on the system without further work from
the developer.
llvm-svn: 248676
These tests used to hang on the old FreeBSD buildbot, which has been
retired. They do not hang when run locally, but do fail.
llvm.org/pr24939
llvm-svn: 248577
These tests were skipped because they hung the old FreeBSD buildbot.
They pass (and do not hang) when run locally so enable them again. We
will investigate further if they hang again once the new FreeBSD
buildbot is installed.
llvm.org/pr16684
llvm.org/pr18200
llvm.org/pr18230
llvm-svn: 248574
This test used fail intermittently, but now passes consistently on
FreeBSD in local runs. We'll investigate further if it's intermittent
on the FreeBSD buildbot, once it's restored.
llvm.org/pr15039
llvm-svn: 248410
Summary:
With this change DWARFASTParserClang::CompleteTypeFromDWARF returns false if
DWARFASTParserClang::ParseChildMembers returns false. Similarly, it returns
false if any base class is of an incomplete type. This helps in cases like
these:
class Foo
{
public:
std::string str;
};
...
Foo f;
If a file with the above code is compiled with a modern clang but without
the -fno-limit-debug-info (or similar) option, then the DWARF has only
a forward declration for std::string. In which case, the type for
"class Foo" cannot be completed. If LLDB does not detect that a child
member has incomplete type, then it wrongly conveys to clang (the LLDB
compiler) that "class Foo" is complete, and consequently crashes due to
an assertion failure in clang when running commands like "p f" or
"frame var f".
Reviewers: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D13066
llvm-svn: 248401
* --results-formatter-options renamed to --results-formatter-option,
with short version of -O
* Multiple --results-formatter-option=OPTION can be specified. The
comma-separating mechanism has been removed.
* XunitFormatter options modified: -n and -r are now short forms of
--ignore-skip-name and --ignore-skip-reason. Those long option
names were tweaked lightly. They also can be specified multiple
times on the command line. The comma-separating, multiple-pattern-
per-option mechanism has been removed.
One can now specify:
dotest.py --results-file stdout -O-ndsym -O-nlldb-mi
for example, to ignore reporting skips for dsym-related or lldb-mi-related
tests in the xUnit report.
llvm-svn: 248384
Summary:
The following situation occured in TestAttachResume:
The inferior was stoped at a breakpoint and we did a continue, immediately followed by a detach.
Since there was a trap instruction under the IP, the continue did a step-over-breakpoint before
resuming the inferior for real. In some cases, the detach command was executed between these two
events (after the step-over stop, but before continue). Here, public state was running, but
private state was stopped. This caused a problem because HaltForDestroyOrDetach was checking the
public state to see whether it needs to stop the process (call Halt()), but Halt() was checking
the private state and concluded that there is nothing for it to do.
Solution: Instead of Halt() call SendAsyncInterrupt(), which will then cause Halt() to be
executed in the context of the private state thread. I also rename HaltForDestroyOrDetach to
reflect it does not call halt directly.
Reviewers: jingham, clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D13056
llvm-svn: 248371
Summary:
In bug 24074, the type information is not shown
correctly. This commit includes the following -
-> Changes for displaying correct type based on
current lexical scope for the command "image
lookup -t"
-> The corresponding testcase.
Reviewers: jingham, ovyalov, spyffe, richard.mitton, clayborg
Differential Revision: http://reviews.llvm.org/D12404
llvm-svn: 248366
When doing test event collation from dotest inferiors to the parallel test
runner, I had a hard-coded small value for the socket backlog. Fix it to
be 2*num workers so we don't fail socket connections from inferiors.
llvm-svn: 248337