17f2ac410Schristos /* Native-dependent code for modern AMD64 BSD's. 27f2ac410Schristos 3*6881a400Schristos Copyright (C) 2018-2023 Free Software Foundation, Inc. 47f2ac410Schristos 57f2ac410Schristos This file is part of GDB. 67f2ac410Schristos 77f2ac410Schristos This program is free software; you can redistribute it and/or modify 87f2ac410Schristos it under the terms of the GNU General Public License as published by 97f2ac410Schristos the Free Software Foundation; either version 3 of the License, or 107f2ac410Schristos (at your option) any later version. 117f2ac410Schristos 127f2ac410Schristos This program is distributed in the hope that it will be useful, 137f2ac410Schristos but WITHOUT ANY WARRANTY; without even the implied warranty of 147f2ac410Schristos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 157f2ac410Schristos GNU General Public License for more details. 167f2ac410Schristos 177f2ac410Schristos You should have received a copy of the GNU General Public License 187f2ac410Schristos along with this program. If not, see <http://www.gnu.org/licenses/>. */ 197f2ac410Schristos 207f2ac410Schristos #ifndef AMD64_BSD_NAT_H 217f2ac410Schristos #define AMD64_BSD_NAT_H 227f2ac410Schristos 237f2ac410Schristos #include "x86-bsd-nat.h" 247f2ac410Schristos 257f2ac410Schristos /* Helper functions. See definitions. */ 267f2ac410Schristos extern void amd64bsd_fetch_inferior_registers (struct regcache *regcache, 277f2ac410Schristos int regnum); 287f2ac410Schristos extern void amd64bsd_store_inferior_registers (struct regcache *regcache, 297f2ac410Schristos int regnum); 307f2ac410Schristos 317f2ac410Schristos /* A prototype *BSD/AMD64 target. */ 327f2ac410Schristos 337f2ac410Schristos template<typename BaseTarget> 347f2ac410Schristos class amd64_bsd_nat_target : public x86bsd_nat_target<BaseTarget> 357f2ac410Schristos { 367f2ac410Schristos public: 377f2ac410Schristos void fetch_registers (struct regcache *regcache, int regnum) override 387f2ac410Schristos { amd64bsd_fetch_inferior_registers (regcache, regnum); } 397f2ac410Schristos 407f2ac410Schristos void store_registers (struct regcache *regcache, int regnum) override 417f2ac410Schristos { amd64bsd_store_inferior_registers (regcache, regnum); } 427f2ac410Schristos }; 437f2ac410Schristos 447f2ac410Schristos #endif /* i386-bsd-nat.h */ 45