Commit | Line | Data |
---|---|---|
c60c0f5f | 1 | /* Interface for functions using gregset and fpregset types. |
6aba47ca | 2 | Copyright (C) 2000, 2002, 2007 Free Software Foundation, Inc. |
c60c0f5f MS |
3 | |
4 | This file is part of GDB. | |
5 | ||
6 | This program is free software; you can redistribute it and/or modify | |
7 | it under the terms of the GNU General Public License as published by | |
8 | the Free Software Foundation; either version 2 of the License, or | |
9 | (at your option) any later version. | |
10 | ||
11 | This program is distributed in the hope that it will be useful, | |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | GNU General Public License for more details. | |
15 | ||
16 | You should have received a copy of the GNU General Public License | |
17 | along with this program; if not, write to the Free Software | |
197e01b6 EZ |
18 | Foundation, Inc., 51 Franklin Street, Fifth Floor, |
19 | Boston, MA 02110-1301, USA. */ | |
c60c0f5f | 20 | |
bd415eab MK |
21 | #ifndef GREGSET_H |
22 | #define GREGSET_H | |
23 | ||
c60c0f5f MS |
24 | #ifndef GDB_GREGSET_T |
25 | #define GDB_GREGSET_T gregset_t | |
26 | #endif | |
27 | ||
28 | #ifndef GDB_FPREGSET_T | |
29 | #define GDB_FPREGSET_T fpregset_t | |
30 | #endif | |
31 | ||
bd415eab | 32 | typedef GDB_GREGSET_T gdb_gregset_t; |
c60c0f5f MS |
33 | typedef GDB_FPREGSET_T gdb_fpregset_t; |
34 | ||
7f7fe91e UW |
35 | struct regcache; |
36 | ||
c60c0f5f MS |
37 | /* A gregset is a data structure supplied by the native OS containing |
38 | the general register values of the debugged process. Usually this | |
39 | includes integer registers and control registers. An fpregset is a | |
40 | data structure containing the floating point registers. These data | |
41 | structures were originally a part of the /proc interface, but have | |
a4b6fc86 | 42 | been borrowed or copied by other GDB targets, eg. GNU/Linux. */ |
c60c0f5f | 43 | |
bd415eab | 44 | /* Copy register values from the native target gregset/fpregset |
c60c0f5f MS |
45 | into GDB's internal register cache. */ |
46 | ||
7f7fe91e UW |
47 | extern void supply_gregset (struct regcache *regcache, |
48 | const gdb_gregset_t *gregs); | |
49 | extern void supply_fpregset (struct regcache *regcache, | |
50 | const gdb_fpregset_t *fpregs); | |
c60c0f5f MS |
51 | |
52 | /* Copy register values from GDB's register cache into | |
bd415eab | 53 | the native target gregset/fpregset. If regno is -1, |
c60c0f5f MS |
54 | copy all the registers. */ |
55 | ||
7f7fe91e UW |
56 | extern void fill_gregset (const struct regcache *regcache, |
57 | gdb_gregset_t *gregs, int regno); | |
58 | extern void fill_fpregset (const struct regcache *regcache, | |
59 | gdb_fpregset_t *fpregs, int regno); | |
bd415eab | 60 | |
32872fa7 | 61 | #ifdef FILL_FPXREGSET |
084c156a | 62 | /* GNU/Linux i386: Copy register values between GDB's internal register cache |
32872fa7 DJ |
63 | and the i386 extended floating point registers. */ |
64 | ||
65 | #ifndef GDB_FPXREGSET_T | |
66 | #define GDB_FPXREGSET_T elf_fpxregset_t | |
67 | #endif | |
68 | ||
69 | typedef GDB_FPXREGSET_T gdb_fpxregset_t; | |
70 | ||
7f7fe91e UW |
71 | extern void supply_fpxregset (struct regcache *regcache, |
72 | const gdb_fpxregset_t *fpxregs); | |
73 | extern void fill_fpxregset (const struct regcache *regcache, | |
74 | gdb_fpxregset_t *fpxregs, int regno); | |
32872fa7 | 75 | #endif |
db4a10fa | 76 | |
bd415eab | 77 | #endif |