diff options
| author | Pavel Labath <pavel@labath.sk> | 2018-09-09 06:01:12 +0000 |
|---|---|---|
| committer | Pavel Labath <pavel@labath.sk> | 2018-09-09 06:01:12 +0000 |
| commit | f8b825f689d6c84ae2d0f5e40697115053c734f2 (patch) | |
| tree | 2fb0c982ab3f22fb7b88596c3301109ea8cd192b /lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h | |
| parent | 9bd24527082ff753f43ef4e211013e3c5a0a459e (diff) | |
| download | bcm5719-llvm-f8b825f689d6c84ae2d0f5e40697115053c734f2.tar.gz bcm5719-llvm-f8b825f689d6c84ae2d0f5e40697115053c734f2.zip | |
Re-commit "Modernize NativeProcessProtocol::GetSoftwareBreakpointTrapOpcode"
This recommits r341487, which was reverted due to failing tests with
clang. It turned out I had incorrectly expected that the literal arrays
passed to ArrayRef constructor will have static (permanent) storage.
This was only the case with gcc, while clang was constructing them on
stack, leading to dangling pointers when the function returns.
The fix is to explicitly assign static storage duration to the opcode
arrays.
llvm-svn: 341758
Diffstat (limited to 'lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h')
| -rw-r--r-- | lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h b/lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h index 142f74ecf19..a08da8efa80 100644 --- a/lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h +++ b/lldb/source/Plugins/Process/NetBSD/NativeProcessNetBSD.h @@ -93,16 +93,6 @@ public: static Status PtraceWrapper(int req, lldb::pid_t pid, void *addr = nullptr, int data = 0, int *result = nullptr); -protected: - // --------------------------------------------------------------------- - // NativeProcessProtocol protected interface - // --------------------------------------------------------------------- - - Status - GetSoftwareBreakpointTrapOpcode(size_t trap_opcode_size_hint, - size_t &actual_opcode_size, - const uint8_t *&trap_opcode_bytes) override; - private: MainLoop::SignalHandleUP m_sigchld_handle; ArchSpec m_arch; |

