xref: /netbsd-src/external/gpl3/gdb.old/dist/gdb/i386-bsd-nat.h (revision 6881a4007f077b54e5f51159c52b9b25f57deb0d)
1699b0f92Schristos /* Native-dependent code for modern i386 BSD's.
2699b0f92Schristos 
3*6881a400Schristos    Copyright (C) 2004-2023 Free Software Foundation, Inc.
4699b0f92Schristos 
5699b0f92Schristos    This file is part of GDB.
6699b0f92Schristos 
7699b0f92Schristos    This program is free software; you can redistribute it and/or modify
8699b0f92Schristos    it under the terms of the GNU General Public License as published by
9699b0f92Schristos    the Free Software Foundation; either version 3 of the License, or
10699b0f92Schristos    (at your option) any later version.
11699b0f92Schristos 
12699b0f92Schristos    This program is distributed in the hope that it will be useful,
13699b0f92Schristos    but WITHOUT ANY WARRANTY; without even the implied warranty of
14699b0f92Schristos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15699b0f92Schristos    GNU General Public License for more details.
16699b0f92Schristos 
17699b0f92Schristos    You should have received a copy of the GNU General Public License
18699b0f92Schristos    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
19699b0f92Schristos 
20699b0f92Schristos #ifndef I386_BSD_NAT_H
21699b0f92Schristos #define I386_BSD_NAT_H
22699b0f92Schristos 
237f2ac410Schristos #include "x86-bsd-nat.h"
24699b0f92Schristos 
257f2ac410Schristos /* Helper functions.  See definitions.  */
267f2ac410Schristos extern void i386bsd_fetch_inferior_registers (struct regcache *regcache,
277f2ac410Schristos 					      int regnum);
287f2ac410Schristos extern void i386bsd_store_inferior_registers (struct regcache *regcache,
297f2ac410Schristos 					      int regnum);
307f2ac410Schristos 
317f2ac410Schristos /* A prototype *BSD/i386 target.  */
327f2ac410Schristos 
337f2ac410Schristos template<typename BaseTarget>
347f2ac410Schristos class i386_bsd_nat_target : public x86bsd_nat_target<BaseTarget>
357f2ac410Schristos {
367f2ac410Schristos public:
377f2ac410Schristos   void fetch_registers (struct regcache *regcache, int regnum) override
387f2ac410Schristos   { i386bsd_fetch_inferior_registers (regcache, regnum); }
397f2ac410Schristos 
407f2ac410Schristos   void store_registers (struct regcache *regcache, int regnum) override
417f2ac410Schristos   { i386bsd_store_inferior_registers (regcache, regnum); }
427f2ac410Schristos };
43699b0f92Schristos 
44699b0f92Schristos #endif /* i386-bsd-nat.h */
45