[lldb] Don't use hardware index to determine whether a breakpoint site is hardware
authorTatyana Krasnukha <tatyana@synopsys.com>
Tue, 21 Jul 2020 18:04:36 +0000 (21:04 +0300)
committerTatyana Krasnukha <tatyana@synopsys.com>
Wed, 29 Jul 2020 18:27:24 +0000 (21:27 +0300)
commitebaa8b1c60749883c6449a7c16096f1c40ccf4bc
tree5f9c03dcdcbed0575aa747a73f1328fda831f962
parentb352e62feadd0aabaa7373b6fb40701f00a6aa91
[lldb] Don't use hardware index to determine whether a breakpoint site is hardware

Most process plugins (if not all) don't set hardware index for breakpoints. They even
are not able to determine this index.

This patch makes StoppointLocation::IsHardware pure virtual and lets BreakpointSite
override it using more accurate BreakpointSite::Type.

It also adds assertions to be sure that a breakpoint site is hardware when this is required.

Differential Revision: https://reviews.llvm.org/D84257
lldb/include/lldb/Breakpoint/BreakpointLocation.h
lldb/include/lldb/Breakpoint/BreakpointSite.h
lldb/include/lldb/Breakpoint/StoppointLocation.h
lldb/source/Breakpoint/BreakpointLocation.cpp
lldb/source/Breakpoint/Watchpoint.cpp
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/test/API/functionalities/breakpoint/hardware_breakpoints/hardware_breakpoint_on_multiple_threads/TestHWBreakMultiThread.py