amd64-bsd-nat.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* Native-dependent code for modern AMD64 BSD's.
  2. Copyright (C) 2018-2022 Free Software Foundation, Inc.
  3. This file is part of GDB.
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 3 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  14. #ifndef AMD64_BSD_NAT_H
  15. #define AMD64_BSD_NAT_H
  16. #include "x86-bsd-nat.h"
  17. /* Helper functions. See definitions. */
  18. extern void amd64bsd_fetch_inferior_registers (struct regcache *regcache,
  19. int regnum);
  20. extern void amd64bsd_store_inferior_registers (struct regcache *regcache,
  21. int regnum);
  22. /* A prototype *BSD/AMD64 target. */
  23. template<typename BaseTarget>
  24. class amd64_bsd_nat_target : public x86bsd_nat_target<BaseTarget>
  25. {
  26. public:
  27. void fetch_registers (struct regcache *regcache, int regnum) override
  28. { amd64bsd_fetch_inferior_registers (regcache, regnum); }
  29. void store_registers (struct regcache *regcache, int regnum) override
  30. { amd64bsd_store_inferior_registers (regcache, regnum); }
  31. };
  32. #endif /* i386-bsd-nat.h */