X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gdb%2Fi386-bsd-nat.h;h=f84f07690d8a12ca846c9941a13136ece1e137f9;hb=14b3360508b185087b9376487cfc49152af023d8;hp=a0291a0a03063d57aab58404bed5fa2ddc2111a1;hpb=03b62bbbce3dc5f15131d9e78f77d035cd1cffb3;p=binutils-gdb.git diff --git a/gdb/i386-bsd-nat.h b/gdb/i386-bsd-nat.h index a0291a0a030..f84f07690d8 100644 --- a/gdb/i386-bsd-nat.h +++ b/gdb/i386-bsd-nat.h @@ -1,6 +1,6 @@ /* Native-dependent code for modern i386 BSD's. - Copyright (C) 2004-2016 Free Software Foundation, Inc. + Copyright (C) 2004-2022 Free Software Foundation, Inc. This file is part of GDB. @@ -20,9 +20,25 @@ #ifndef I386_BSD_NAT_H #define I386_BSD_NAT_H -/* Create a prototype *BSD/i386 target. The client can override it - with local methods. */ +#include "x86-bsd-nat.h" -extern struct target_ops *i386bsd_target (void); +/* Helper functions. See definitions. */ +extern void i386bsd_fetch_inferior_registers (struct regcache *regcache, + int regnum); +extern void i386bsd_store_inferior_registers (struct regcache *regcache, + int regnum); + +/* A prototype *BSD/i386 target. */ + +template +class i386_bsd_nat_target : public x86bsd_nat_target +{ +public: + void fetch_registers (struct regcache *regcache, int regnum) override + { i386bsd_fetch_inferior_registers (regcache, regnum); } + + void store_registers (struct regcache *regcache, int regnum) override + { i386bsd_store_inferior_registers (regcache, regnum); } +}; #endif /* i386-bsd-nat.h */