diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2019-08-20 20:51:52 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2019-08-20 20:51:52 +0000 |
| commit | 5f29bb8a675e8f96452b632e7129113f7dec850e (patch) | |
| tree | 3d3f2a0d3ad10872a4dcaba8ec8d1d20c87ab147 /source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.h | |
| parent | 88c643b6fec27eec436c8d138fee6346e92337d6 (diff) | |
Notes
Diffstat (limited to 'source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.h')
| -rw-r--r-- | source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.h | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.h b/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.h index c55ddfec6615..0fed16542a95 100644 --- a/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.h +++ b/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.h @@ -1,9 +1,8 @@ //===-- NativeRegisterContextNetBSD_x86_64.h --------------------*- C++ -*-===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// @@ -15,6 +14,7 @@ // clang-format off #include <sys/param.h> #include <sys/types.h> +#include <sys/ptrace.h> #include <machine/reg.h> // clang-format on @@ -22,6 +22,10 @@ #include "Plugins/Process/Utility/RegisterContext_x86.h" #include "Plugins/Process/Utility/lldb-x86-register-enums.h" +#if defined(PT_GETXSTATE) && defined(PT_SETXSTATE) +#define HAVE_XSTATE +#endif + namespace lldb_private { namespace process_netbsd { @@ -67,24 +71,22 @@ public: uint32_t NumSupportedHardwareWatchpoints() override; -protected: - void *GetGPRBuffer() override { return &m_gpr_x86_64; } - void *GetFPRBuffer() override { return &m_fpr_x86_64; } - void *GetDBRBuffer() override { return &m_dbr_x86_64; } - private: // Private member types. - enum { GPRegSet, FPRegSet, DBRegSet }; + enum { GPRegSet, FPRegSet, DBRegSet, XStateRegSet }; // Private member variables. struct reg m_gpr_x86_64; struct fpreg m_fpr_x86_64; struct dbreg m_dbr_x86_64; +#ifdef HAVE_XSTATE + struct xstate m_xstate_x86_64; +#endif int GetSetForNativeRegNum(int reg_num) const; - int ReadRegisterSet(uint32_t set); - int WriteRegisterSet(uint32_t set); + Status ReadRegisterSet(uint32_t set); + Status WriteRegisterSet(uint32_t set); }; } // namespace process_netbsd |
