summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/common/NativeThreadProtocol.cpp
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2018-11-04 10:58:08 +0000
committerPavel Labath <pavel@labath.sk>2018-11-04 10:58:08 +0000
commitbe828518c9ddef8f74ecc4396a48d2c773e8413d (patch)
treea1ccaef3d88ff33ba052aed2c8e1daf820db2227 /lldb/source/Host/common/NativeThreadProtocol.cpp
parent3292ea03d331744f588428513fe345bd339ee2f8 (diff)
downloadbcm5719-llvm-be828518c9ddef8f74ecc4396a48d2c773e8413d.tar.gz
bcm5719-llvm-be828518c9ddef8f74ecc4396a48d2c773e8413d.zip
NativeProcessProtocol: Simplify breakpoint setting code
Summary: A fairly simple operation as setting a breakpoint (writing a breakpoint opcode) at a given address was going through three classes: NativeProcessProtocol which called NativeBreakpointList, which then called SoftwareBrekpoint, only to end up again in NativeProcessProtocol to do the actual writing itself. This is unnecessarily complex and can be simplified by moving all of the logic into NativeProcessProtocol class itself, removing a lot of boilerplate. One of the reeasons for this complexity was that (it seems) NativeBreakpointList class was meant to hold both software and hardware breakpoints. However, that never materialized, and hardware breakpoints are stored in a separate map holding only hardware breakpoints. Essentially, this patch makes software breakpoints follow that approach by replacing the heavy SoftwareBraekpoint with a light struct of the same name, which holds only the data necessary to describe one breakpoint. The rest of the logic is in the main class. As, at the lldb-server level, handling software and hardware breakpoints is very different, this seems like a reasonable state of things. Reviewers: krytarowski, zturner, clayborg Subscribers: mgorny, lldb-commits Differential Revision: https://reviews.llvm.org/D52941 llvm-svn: 346093
Diffstat (limited to 'lldb/source/Host/common/NativeThreadProtocol.cpp')
-rw-r--r--lldb/source/Host/common/NativeThreadProtocol.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/lldb/source/Host/common/NativeThreadProtocol.cpp b/lldb/source/Host/common/NativeThreadProtocol.cpp
index 0c648e40eb5..af43683295b 100644
--- a/lldb/source/Host/common/NativeThreadProtocol.cpp
+++ b/lldb/source/Host/common/NativeThreadProtocol.cpp
@@ -11,7 +11,6 @@
#include "lldb/Host/common/NativeProcessProtocol.h"
#include "lldb/Host/common/NativeRegisterContext.h"
-#include "lldb/Host/common/SoftwareBreakpoint.h"
using namespace lldb;
using namespace lldb_private;
OpenPOWER on IntegriCloud