xref: /freebsd-src/contrib/llvm-project/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD.h (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
1d409305fSDimitry Andric //===-- NativeRegisterContextFreeBSD.h --------------------------*- C++ -*-===//
2d409305fSDimitry Andric //
3d409305fSDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4d409305fSDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
5d409305fSDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6d409305fSDimitry Andric //
7d409305fSDimitry Andric //===----------------------------------------------------------------------===//
8d409305fSDimitry Andric 
9d409305fSDimitry Andric #ifndef lldb_NativeRegisterContextFreeBSD_h
10d409305fSDimitry Andric #define lldb_NativeRegisterContextFreeBSD_h
11d409305fSDimitry Andric 
12d409305fSDimitry Andric #include "Plugins/Process/Utility/NativeRegisterContextRegisterInfo.h"
13d409305fSDimitry Andric 
14d409305fSDimitry Andric namespace lldb_private {
15d409305fSDimitry Andric namespace process_freebsd {
16d409305fSDimitry Andric 
17d409305fSDimitry Andric class NativeProcessFreeBSD;
18*0fca6ea1SDimitry Andric class NativeThreadFreeBSD;
19d409305fSDimitry Andric 
20d409305fSDimitry Andric class NativeRegisterContextFreeBSD
21d409305fSDimitry Andric     : public virtual NativeRegisterContextRegisterInfo {
22d409305fSDimitry Andric public:
23d409305fSDimitry Andric   // This function is implemented in the NativeRegisterContextFreeBSD_*
24d409305fSDimitry Andric   // subclasses to create a new instance of the host specific
25d409305fSDimitry Andric   // NativeRegisterContextFreeBSD. The implementations can't collide as only one
26d409305fSDimitry Andric   // NativeRegisterContextFreeBSD_* variant should be compiled into the final
27d409305fSDimitry Andric   // executable.
28d409305fSDimitry Andric   static NativeRegisterContextFreeBSD *
29d409305fSDimitry Andric   CreateHostNativeRegisterContextFreeBSD(const ArchSpec &target_arch,
30*0fca6ea1SDimitry Andric                                          NativeThreadFreeBSD &native_thread);
31d409305fSDimitry Andric   virtual llvm::Error
32d409305fSDimitry Andric   CopyHardwareWatchpointsFrom(NativeRegisterContextFreeBSD &source) = 0;
33d409305fSDimitry Andric 
34d409305fSDimitry Andric protected:
35d409305fSDimitry Andric   virtual NativeProcessFreeBSD &GetProcess();
36d409305fSDimitry Andric   virtual ::pid_t GetProcessPid();
37d409305fSDimitry Andric };
38d409305fSDimitry Andric 
39d409305fSDimitry Andric } // namespace process_freebsd
40d409305fSDimitry Andric } // namespace lldb_private
41d409305fSDimitry Andric 
42d409305fSDimitry Andric #endif // #ifndef lldb_NativeRegisterContextFreeBSD_h
43