xref: /netbsd-src/external/gpl3/gdb.old/dist/gdb/arc-linux-tdep.h (revision 6881a4007f077b54e5f51159c52b9b25f57deb0d)
1*6881a400Schristos /* Target dependent code for GNU/Linux ARC.
2*6881a400Schristos 
3*6881a400Schristos    Copyright 2020-2023 Free Software Foundation, Inc.
4*6881a400Schristos 
5*6881a400Schristos    This file is part of GDB.
6*6881a400Schristos 
7*6881a400Schristos    This program is free software; you can redistribute it and/or modify
8*6881a400Schristos    it under the terms of the GNU General Public License as published by
9*6881a400Schristos    the Free Software Foundation; either version 3 of the License, or
10*6881a400Schristos    (at your option) any later version.
11*6881a400Schristos 
12*6881a400Schristos    This program is distributed in the hope that it will be useful,
13*6881a400Schristos    but WITHOUT ANY WARRANTY; without even the implied warranty of
14*6881a400Schristos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15*6881a400Schristos    GNU General Public License for more details.
16*6881a400Schristos 
17*6881a400Schristos    You should have received a copy of the GNU General Public License
18*6881a400Schristos    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
19*6881a400Schristos 
20*6881a400Schristos #ifndef ARC_LINUX_TDEP_H
21*6881a400Schristos #define ARC_LINUX_TDEP_H
22*6881a400Schristos 
23*6881a400Schristos #include "gdbarch.h"
24*6881a400Schristos #include "regset.h"
25*6881a400Schristos 
26*6881a400Schristos #define ARC_LINUX_SIZEOF_V2_REGSET (3 * ARC_REGISTER_SIZE)
27*6881a400Schristos 
28*6881a400Schristos /* Reads registers from the NT_PRSTATUS data array into the regcache.  */
29*6881a400Schristos 
30*6881a400Schristos void arc_linux_supply_gregset (const struct regset *regset,
31*6881a400Schristos 			       struct regcache *regcache, int regnum,
32*6881a400Schristos 			       const void *gregs, size_t size);
33*6881a400Schristos 
34*6881a400Schristos /* Reads regsiters from the NT_ARC_V2 data array into the regcache.  */
35*6881a400Schristos 
36*6881a400Schristos void arc_linux_supply_v2_regset (const struct regset *regset,
37*6881a400Schristos 				 struct regcache *regcache, int regnum,
38*6881a400Schristos 				 const void *v2_regs, size_t size);
39*6881a400Schristos 
40*6881a400Schristos /* Writes registers from the regcache into the NT_PRSTATUS data array.  */
41*6881a400Schristos 
42*6881a400Schristos void arc_linux_collect_gregset (const struct regset *regset,
43*6881a400Schristos 				const struct regcache *regcache,
44*6881a400Schristos 				int regnum, void *gregs, size_t size);
45*6881a400Schristos 
46*6881a400Schristos /* Writes registers from the regcache into the NT_ARC_V2 data array.  */
47*6881a400Schristos 
48*6881a400Schristos void arc_linux_collect_v2_regset (const struct regset *regset,
49*6881a400Schristos 				  const struct regcache *regcache,
50*6881a400Schristos 				  int regnum, void *v2_regs, size_t size);
51*6881a400Schristos 
52*6881a400Schristos #endif /* ARC_LINUX_TDEP_H */
53