A char can have signed and unsigned encoding but previously lldb always
assumed it is signed. This CL adds a logic to detect the encoding of
'char' types based on the default encoding on the target architecture.
It fixes variable printing and expression evaluation on architectures
where 'char' is signed by default.
Differential revision: http://reviews.llvm.org/D8636
llvm-svn: 233682
char is a special type in C++ which can be signed/unsigned and have to
be distinguished both from "signed char" and from "unsigned char". This
test check for this behaviour during the expression evaluation with
different compiler settings.
Differential revision: http://reviews.llvm.org/D8657
llvm-svn: 233678
Summary: There is an extra eStateConnected before eStateRunning with remote.
Reviewers: clayborg, ovyalov
Reviewed By: clayborg, ovyalov
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D8714
llvm-svn: 233670
lldb-platform's listener socket only had a backlog of one connection.
That means that if more than one client connected simultaneously, the
connection would be refused. The test suite can be run remotely with
dozens of threads connecting simultaneously. Raised this limit to 100
to effectively eliminate lost connections.
Test Plan:
run tests against a remote target
Differential Revision: http://reviews.llvm.org/D8696
llvm-svn: 233652
lldb-server server process was holding on to a connection to every
client that connected. This continued until the process hit it's
file limit and exited.
lldb-server p --listen *:5432 --server
run remote tests against that server more than 1000 times
Differential Revision: http://reviews.llvm.org/D8697
llvm-svn: 233651
Adds @skipIfPlatform and @skipUnlessPlatform decorators which will skip if /
unless the target platform is in the provided platform list.
Test Plan:
ninja check-lldb shows no regressions.
When running cross platform, tests which cannot run on the target platform are
skipped.
Differential Revision: http://reviews.llvm.org/D8665
llvm-svn: 233547
Summary:
This is similar to the change introduced for variable DIEs in r233098. If the
linkage names of functions are missing in the DWARF, then their fully qualified
names (similar to the name that would be got by demangling their linkage name)
is generated using the decl context.
This change fixes TestNamespace when the test case is compiled with GCC, hence
it is enabled for GCC. The test and the test case are also enhanced to cover
variadic functions.
Test Plan: dotest.py -C <clang|gcc> -p TestNamespace
Reviewers: clayborg
Reviewed By: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D8623
llvm-svn: 233336
When no hijack listener is set up, the global event listener will
try to pull events off the queue, racing with the event thread.
By always forcing a hijack listener, even when one was not given,
we guarantee that the listener always gets all events.
This was causing problems in synchronous mode with the process
stop event sometimes never being picked up and causing the debugger
to hang while processing a .lldbinit file.
Reviewed by: Jim Ingham
Differential Revision: http://reviews.llvm.org/D8562
llvm-svn: 233315
Most expected OS failures or skipped tests are about the target platform on
which the test binary is being run, not the host platform launching the tests.
This changes expectedFailureOS and skipIfPlatform to check against the remote
platform when running remote tests.
Test Plan:
Run ./do_sep.py test suite against a remote target on a different platform and
verify that tests which should be excluded on the remote platform are excluded.
Differential Revision: http://reviews.llvm.org/D8611
llvm-svn: 233311
Previously we were using teardown hooks in these two instances to
shutdown processes. TestBase already deletes all targets in its
own teardown, which will kill processes, so these steps weren't
necessary.
llvm-svn: 233308
tear down hooks run as part of Base.tearDown(). Some of these
hooks rely on accessing the debugger instance. So although it
looks awkward, we need to call "del self.dbg" after calling
Base.tearDown().
llvm-svn: 233306
Summary:
This should always be true but sometimes is not, during platform bring
up. As recommended by Jim Ingham, an assertion should be enough here to
help.
This addresses post commit comments in http://reviews.llvm.org/D8554.
Test Plan: Run unit tests.
Reviewers: jasonmolenda, emaste, jingham, clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D8574
llvm-svn: 233298
Tests derive from TestBase, which derives from Base. In the
test setUp() methods, we always call TestBase.setUp() first and
then call implementation-specific setup. Tear down needs to do
the reverse.
This was causing over 20 failures on Windows, and was the culprit
behind about 80% of the files not being cleaned up after test run.
TestBase.tearDown() is responsible for deleting all targets created
during the test run and without this step, on Windows files will
be locked and cannot be deleted. But TestBase.tearDown() was
calling Base.tearDown() before its own cleanup (i.e. deleting the
targets) and in some cases one of the teardown hooks would be to
call make clean. So make clean would be run before the targets
had been deleted, and fail to remove the files, and subsequently
result in a failed test as well.
llvm-svn: 233284
This patch fixes the following:
```
1: test_attach_to_process_by_id_with_dsym (TestProcessAttach.ProcessAttachTestCase)
Test attach by process id ... ok
2: test_attach_to_process_by_id_with_dwarf (TestProcessAttach.ProcessAttachTestCase)
Test attach by process id ... ok
3: test_attach_to_process_by_name_with_dsym (TestProcessAttach.ProcessAttachTestCase)
Test attach by process name ... FAILURE
4: test_attach_to_process_by_name_with_dwarf (TestProcessAttach.ProcessAttachTestCase)
Test attach by process name ... FAILURE
======================================================================
FAIL: test_attach_to_process_by_name_with_dsym (TestProcessAttach.ProcessAttachTestCase)
Test attach by process name
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 462, in wrapper
return func(self, *args, **kwargs)
File "/Users/IliaK/p/llvm/tools/lldb/test/functionalities/process_attach/TestProcessAttach.py", line 35, in test_attach_to_process_by_name_with_dsym
self.process_attach_by_name()
File "/Users/IliaK/p/llvm/tools/lldb/test/functionalities/process_attach/TestProcessAttach.py", line 79, in process_attach_by_name
self.runCmd("process attach -n s" + exe_name)
File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 2008, in runCmd
msg if msg else CMD_MSG(cmd))
AssertionError: False is not True : Command 'process attach -n sProcessAttach' returns successfully
Config=x86_64-clang
======================================================================
FAIL: test_attach_to_process_by_name_with_dwarf (TestProcessAttach.ProcessAttachTestCase)
Test attach by process name
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 479, in wrapper
return func(self, *args, **kwargs)
File "/Users/IliaK/p/llvm/tools/lldb/test/functionalities/process_attach/TestProcessAttach.py", line 41, in test_attach_to_process_by_name_with_dwarf
self.process_attach_by_name()
File "/Users/IliaK/p/llvm/tools/lldb/test/functionalities/process_attach/TestProcessAttach.py", line 79, in process_attach_by_name
self.runCmd("process attach -n s" + exe_name)
File "/Users/IliaK/p/llvm/tools/lldb/test/lldbtest.py", line 2008, in runCmd
msg if msg else CMD_MSG(cmd))
AssertionError: False is not True : Command 'process attach -n sProcessAttach' returns successfully
Config=x86_64-clang
----------------------------------------------------------------------
```
Failure-x86_64-clang-TestProcessAttach.ProcessAttachTestCase.test_attach_to_process_by_name_with_dsym.log:
```
[...]
runCmd: process attach -n ProcessAttach
runCmd failed!
error: attach failed: more than one process named ProcessAttach:
PID PARENT USER TRIPLE ARGUMENTS
====== ====== ========== ======================== ============================
43752 43680 IliaK x86_64-apple-macosx /Users/IliaK/p/llvm/tools/lldb/test/functionalities/process_attach/ProcessAttach
43663 1 IliaK x86_64-apple-macosx /Users/IliaK/p/llvm/tools/lldb/test/functionalities/process_attach/ProcessAttach
[...]
```
llvm-svn: 233272
Summary:
This patch fixes -gdb-exit for locally target. It includes the following changes:
# Fix Process::Finalize
# Use SBProcess::Destroy in -gdb-exit
Reviewers: abidh, zturner, clayborg
Reviewed By: clayborg
Subscribers: lldb-commits, clayborg, abidh
Differential Revision: http://reviews.llvm.org/D8298
llvm-svn: 233255
% lldb /bin/echo
(lldb) r 1 2 3
(lldb) r
You get "1", "2", and "3" as arguments in the next re-run when no args are specified. This is behavior we do to match what GDB did and we need to test that we don't regress on it.
<rdar://problem/20300941>
llvm-svn: 233236