teak-llvm/lldb/packages/Python/lldbsuite/test/python_api
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
..
breakpoint [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
class_members [lldb] Also test Get[De]mangledName of SBType in TestSBTypeClassMembers.py 2019-11-19 14:04:02 +01:00
debugger [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
default-constructor remove FILE* bindings from SBInstruction. 2019-10-14 20:59:57 +00:00
disassemble-raw-data Fix TestDisassemble_VST1_64 2019-10-15 07:20:01 +00:00
event [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
exprpath_synthetic
file_handle [LLDB][PythonFile] fix dangerous borrow semantics on python2 2019-10-30 09:46:51 -07:00
findvalue_duplist Canonicalize variable usage in testsuite Makefiles 2019-09-25 00:36:00 +00:00
formatters Canonicalize variable usage in testsuite Makefiles 2019-09-25 00:36:00 +00:00
frame Mark PR44037 tests as XFAIL on AArch64 Linux dwo 2019-11-19 10:49:00 +01:00
function_symbol [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
hello_world TestHelloWorld: Make compatible with remote testing 2019-10-09 21:41:02 +00:00
interpreter Fix test breakage caused by r374424 2019-10-14 18:53:27 +00:00
lldbutil [lldb] [Process/NetBSD] Improve threading support 2019-11-25 20:11:58 +01:00
module_section [lldb][NFC] Make test/python_api/module_section test smaller 2019-11-04 09:25:01 +01:00
name_lookup [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
objc_type Canonicalize variable usage in testsuite Makefiles 2019-09-25 00:36:00 +00:00
process Ah, only skip this for embedded darwin targets. 2019-09-11 01:03:24 +00:00
rdar-12481949 [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
sbdata [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
sblaunchinfo
sbstructureddata [lldb][NFC] Remove unused imports in python tests 2019-08-02 08:06:22 +00:00
sbtype_typeclass
sbvalue_const_addrof [ScriptInterpreter] Limit LLDB's globals to interactive mode. 2019-09-18 00:30:01 +00:00
sbvalue_persist [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
section [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
signals [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
symbol-context [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
target [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
thread [dotest] Avoid the need for LEVEL= makefile boilerplate 2019-09-04 07:46:25 +00:00
type Add support for DW_AT_export_symbols for anonymous structs 2019-10-28 14:26:54 -07:00
value [Python] Implement __next__ for value_iter 2019-09-04 18:59:13 +00:00
value_var_update Canonicalize variable usage in testsuite Makefiles 2019-09-25 00:36:00 +00:00
watchpoint [lldb] [Process/NetBSD] Fix handling concurrent watchpoint events 2019-11-25 20:11:59 +01:00
.categories