aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
diff options
context:
space:
mode:
authorTatyana Krasnukha <tatyana@synopsys.com>2020-07-21 21:04:36 +0300
committerTatyana Krasnukha <tatyana@synopsys.com>2020-07-29 21:27:24 +0300
commitebaa8b1c60749883c6449a7c16096f1c40ccf4bc (patch)
tree5f9c03dcdcbed0575aa747a73f1328fda831f962 /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
parentb352e62feadd0aabaa7373b6fb40701f00a6aa91 (diff)
downloadllvm-ebaa8b1c60749883c6449a7c16096f1c40ccf4bc.zip
llvm-ebaa8b1c60749883c6449a7c16096f1c40ccf4bc.tar.gz
llvm-ebaa8b1c60749883c6449a7c16096f1c40ccf4bc.tar.bz2
[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
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index 1fed8e0..8dea8b9 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -3204,14 +3204,8 @@ Status ProcessGDBRemote::DisableBreakpointSite(BreakpointSite *bp_site) {
break;
case BreakpointSite::eExternal: {
- GDBStoppointType stoppoint_type;
- if (bp_site->IsHardware())
- stoppoint_type = eBreakpointHardware;
- else
- stoppoint_type = eBreakpointSoftware;
-
- if (m_gdb_comm.SendGDBStoppointTypePacket(stoppoint_type, false, addr,
- bp_op_size))
+ if (m_gdb_comm.SendGDBStoppointTypePacket(eBreakpointSoftware, false,
+ addr, bp_op_size))
error.SetErrorToGenericError();
} break;
}