teak-llvm/lldb/packages/Python/lldbsuite/test
Michał Górny 7644d8ba4d [lldb] [Process/NetBSD] Fix handling concurrent watchpoint events
Fix handling concurrent watchpoint events so that they are reported
correctly in LLDB.

If multiple watchpoints are hit concurrently, the NetBSD kernel reports
them as series of SIGTRAPs with a thread specified, and the debugger
investigates DR6 in order to establish which watchpoint was hit.  This
is normally fine.

However, LLDB disables and reenables the watchpoint on all threads after
each hit, which results in the hit status from DR6 being wiped.
As a result, it can't establish which watchpoint was hit in successive
SIGTRAP processing.

In order to workaround this problem, clear DR6 only if the breakpoint
is overwritten with a new one.  More specifically, move cleaning DR6
from ClearHardwareWatchpoint() to SetHardwareWatchpointWithIndex(),
and do that only if the newly requested watchpoint is different
from the one being set previously.  This ensures that the disable-enable
logic of LLDB does not clear watchpoint hit status for the remaining
threads.

This also involves refactoring of watchpoint logic.  With the old logic,
clearing watchpoint involved wiping dr6 & dr7, and setting it setting
dr{0..3} & dr7.  With the new logic, only enable bit is cleared
from dr7, and the remaining bits are cleared/overwritten while setting
new watchpoint.

Differential Revision: https://reviews.llvm.org/D70025
2019-11-25 20:11:59 +01:00
..
android/platform [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
api [lldb] [testsuite] Mark TestSBCommandReturnObject as failing on Windows 2019-10-04 20:49:44 +00:00
arm Add arm64_32 support to lldb, an ILP32 codegen 2019-10-16 19:14:49 +00:00
benchmarks [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
commands [lldb] [Process/NetBSD] Copy watchpoints to newly-created threads 2019-11-25 20:11:59 +01:00
driver/batch_mode TestBatchMode.py: add missing @skipIfRemote 2019-11-05 12:22:59 -08:00
functionalities [lldb] [Process/NetBSD] Fix handling concurrent watchpoint events 2019-11-25 20:11:59 +01:00
iohandler/completion Skip (more) PExpect tests under ASAN, I can't get them to work reliably. 2019-10-19 00:30:30 +00:00
issue_verification [dotest] Delete trivial inline test makefiles 2019-09-05 06:55:23 +00:00
lang Complete complete types early when importing types from Clang module DWARF. 2019-11-22 09:58:16 -08:00
linux Canonicalize variable usage in testsuite Makefiles 2019-09-25 00:36:00 +00:00
macosx Replace tabs with spaces. (NFC) 2019-11-11 12:22:55 -08:00
make [-gmodules] Let LLDB log a warning if the Clang module hash mismatches. 2019-11-15 11:52:13 -08:00
plugins [test] Use a different module cache for Shell and API tests. 2019-10-10 17:27:09 +00:00
python_api [lldb] [Process/NetBSD] Fix handling concurrent watchpoint events 2019-11-25 20:11:59 +01:00
sample_test Canonicalize variable usage in testsuite Makefiles 2019-09-25 00:36:00 +00:00
sanity [test] Fix various module cache bugs and inconsistencies 2019-08-29 18:37:05 +00:00
source-manager [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
terminal [test] Mark TestEditline as skipped with ASan. 2019-11-21 13:09:40 -08:00
test_runner [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
tools [lldb] [Process/NetBSD] Improve threading support 2019-11-25 20:11:58 +01:00
types [Test] Split up TestIntegerTypes.py 2019-11-21 11:24:14 -08:00
__init__.py
.categories
bench.py [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
concurrent_base.py [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
configuration.py [test] Use a different module cache for Shell and API tests. 2019-10-10 17:27:09 +00:00
darwin_log.py [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
decorators.py [test] Fix apple_simulator_test decorator when simulators are unavailable 2019-11-06 15:14:01 -08:00
dotest_args.py [test] Use a different module cache for Shell and API tests. 2019-10-10 17:27:09 +00:00
dotest.py [lldb] [test] Enable lldb-server tests on NetBSD, and set XFAILs 2019-11-18 11:21:16 +01:00
lldb_pylint_helper.py Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
lldbbench.py
lldbdwarf.py Fix whitespace in the python test suite. 2018-07-27 22:20:59 +00:00
lldbinline.py [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
lldbpexpect.py [lldb][test] Prevent \n in calls to lldb's expect() test helper. 2019-11-19 15:17:35 -08:00
lldbplatform.py [dotest] Remove dead code 2019-07-26 01:58:18 +00:00
lldbplatformutil.py [LLDB] Add core definition for armv8l and armv7l 2019-11-13 05:40:09 +05:00
lldbtest_config.py [dotest] Add the ability to set environment variables for the inferior. 2019-06-26 16:12:08 +00:00
lldbtest.py Testuite: Support Asan test with remote testing 2019-11-06 14:28:48 -08:00
lldbutil.py dotest: Add a way for the run_to_* helpers to register dylibs 2019-11-15 15:17:27 -08:00
lock.py [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
README-TestSuite Reflow readme 2018-12-17 21:18:12 +00:00
redo.py
test_categories.py [lldb][NFC] Cleanup mentions and code related to lldb-mi 2019-07-19 15:55:23 +00:00
test_result.py [dotest] Remove -q (quiet) flag. 2019-08-28 16:28:58 +00:00