NativeRegisterContextNetBSD.h revision 360784
1//===-- NativeRegisterContextNetBSD.h ---------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef lldb_NativeRegisterContextNetBSD_h
10#define lldb_NativeRegisterContextNetBSD_h
11
12#include "lldb/Host/common/NativeThreadProtocol.h"
13
14#include "Plugins/Process/Utility/NativeRegisterContextRegisterInfo.h"
15
16namespace lldb_private {
17namespace process_netbsd {
18
19class NativeProcessNetBSD;
20
21class NativeRegisterContextNetBSD : public NativeRegisterContextRegisterInfo {
22public:
23  NativeRegisterContextNetBSD(NativeThreadProtocol &native_thread,
24                              RegisterInfoInterface *reg_info_interface_p);
25
26  // This function is implemented in the NativeRegisterContextNetBSD_*
27  // subclasses to create a new instance of the host specific
28  // NativeRegisterContextNetBSD. The implementations can't collide as only one
29  // NativeRegisterContextNetBSD_* variant should be compiled into the final
30  // executable.
31  static NativeRegisterContextNetBSD *
32  CreateHostNativeRegisterContextNetBSD(const ArchSpec &target_arch,
33                                        NativeThreadProtocol &native_thread);
34  virtual Status
35  CopyHardwareWatchpointsFrom(NativeRegisterContextNetBSD &source) = 0;
36
37  virtual Status ClearWatchpointHit(uint32_t wp_index) = 0;
38
39protected:
40  Status DoRegisterSet(int req, void *buf);
41  virtual NativeProcessNetBSD &GetProcess();
42  virtual ::pid_t GetProcessPid();
43};
44
45} // namespace process_netbsd
46} // namespace lldb_private
47
48#endif // #ifndef lldb_NativeRegisterContextNetBSD_h
49