Pull GetSoftwareBreakpointPCOffset into base class
authorPavel Labath <pavel@labath.sk>
Sun, 30 Sep 2018 15:58:52 +0000 (15:58 +0000)
committerPavel Labath <pavel@labath.sk>
Sun, 30 Sep 2018 15:58:52 +0000 (15:58 +0000)
commit99f436b0554a0ba1bf276eae93d83db3a7f674f2
tree0014d8715349f5b3784187521642f74536cb8c77
parentc37e58cc19272304e88611a4b838b01890d982cf
Pull GetSoftwareBreakpointPCOffset into base class

Summary:
This function encodes the knowledge of whether the PC points to the
breakpoint instruction of the one following it after the breakpoint is
"hit". This behavior mainly(*) depends on the architecture and not on the
OS, so it makes sense for it to be implemented in the base class, where
it can be shared between different implementations (Linux and NetBSD
atm).

(*) It is possible for an OS to expose a different API, perhaps by doing
some fixups in the kernel. In this case, the implementation can override
this function to implement custom behavior.

Reviewers: krytarowski, zturner

Subscribers: lldb-commits

Differential Revision: https://reviews.llvm.org/D52532

llvm-svn: 343409
lldb/include/lldb/Host/common/NativeProcessProtocol.h
lldb/source/Host/common/NativeProcessProtocol.cpp
lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp
lldb/source/Plugins/Process/Linux/NativeProcessLinux.h
lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.cpp