Modernize NativeProcessProtocol::GetSoftwareBreakpointTrapOpcode
authorPavel Labath <pavel@labath.sk>
Wed, 5 Sep 2018 18:08:56 +0000 (18:08 +0000)
committerPavel Labath <pavel@labath.sk>
Wed, 5 Sep 2018 18:08:56 +0000 (18:08 +0000)
commitef1b1b5d1715acf2f5f4b483dcffec4221292d87
tree57c0728f5939b408ff4a52a642940b1543980392
parent13b55bbc2f446b6ff3fae5288c1a0c700d3dc846
Modernize NativeProcessProtocol::GetSoftwareBreakpointTrapOpcode

return the opcode as a Expected<ArrayRef> instead of a
Status+pointer+size combo.

I also move the linux implementation to the base class, as the trap
opcodes are likely to be the same for all/most implementations of the
class (except the arm one, where linux chooses a different opcode than
what the arm spec recommends, which I keep linux-specific).

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