1 /* Generic GNU/Linux target using traditional ptrace register access.
3 Copyright (C) 2000-2018 Free Software Foundation, Inc.
5 This file is part of GDB.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 #ifndef LINUX_NAT_TRAD_H
21 #define LINUX_NAT_TRAD_H
23 #include "linux-nat.h"
25 /* A prototype GNU/Linux target using traditional ptrace register
26 access. A concrete type should override REGISTER_U_OFFSET. */
28 class linux_nat_trad_target : public linux_nat_target
31 void fetch_registers (struct regcache *, int) override;
32 void store_registers (struct regcache *, int) override;
35 /* Return the offset within the user area where a particular
36 register is stored. */
37 virtual CORE_ADDR register_u_offset (struct gdbarch *gdbarch,
38 int regnum, int store) = 0;
41 /* Helpers. See definition. */
42 void fetch_register (struct regcache *regcache, int regnum);
43 void store_register (const struct regcache *regcache, int regnum);
46 #endif /* LINUX_NAT_TRAD_H */