]>
Commit | Line | Data |
---|---|---|
c60c0f5f | 1 | /* Interface for functions using gregset and fpregset types. |
0fb0cc75 | 2 | Copyright (C) 2000, 2002, 2007, 2008, 2009 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 | |
a9762ec7 | 8 | the Free Software Foundation; either version 3 of the License, or |
c60c0f5f MS |
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 | |
a9762ec7 | 17 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
c60c0f5f | 18 | |
bd415eab MK |
19 | #ifndef GREGSET_H |
20 | #define GREGSET_H | |
21 | ||
c60c0f5f MS |
22 | #ifndef GDB_GREGSET_T |
23 | #define GDB_GREGSET_T gregset_t | |
24 | #endif | |
25 | ||
26 | #ifndef GDB_FPREGSET_T | |
27 | #define GDB_FPREGSET_T fpregset_t | |
28 | #endif | |
29 | ||
bd415eab | 30 | typedef GDB_GREGSET_T gdb_gregset_t; |
c60c0f5f MS |
31 | typedef GDB_FPREGSET_T gdb_fpregset_t; |
32 | ||
7f7fe91e UW |
33 | struct regcache; |
34 | ||
c60c0f5f MS |
35 | /* A gregset is a data structure supplied by the native OS containing |
36 | the general register values of the debugged process. Usually this | |
37 | includes integer registers and control registers. An fpregset is a | |
38 | data structure containing the floating point registers. These data | |
39 | structures were originally a part of the /proc interface, but have | |
a4b6fc86 | 40 | been borrowed or copied by other GDB targets, eg. GNU/Linux. */ |
c60c0f5f | 41 | |
bd415eab | 42 | /* Copy register values from the native target gregset/fpregset |
c60c0f5f MS |
43 | into GDB's internal register cache. */ |
44 | ||
7f7fe91e UW |
45 | extern void supply_gregset (struct regcache *regcache, |
46 | const gdb_gregset_t *gregs); | |
47 | extern void supply_fpregset (struct regcache *regcache, | |
48 | const gdb_fpregset_t *fpregs); | |
c60c0f5f MS |
49 | |
50 | /* Copy register values from GDB's register cache into | |
bd415eab | 51 | the native target gregset/fpregset. If regno is -1, |
c60c0f5f MS |
52 | copy all the registers. */ |
53 | ||
7f7fe91e UW |
54 | extern void fill_gregset (const struct regcache *regcache, |
55 | gdb_gregset_t *gregs, int regno); | |
56 | extern void fill_fpregset (const struct regcache *regcache, | |
57 | gdb_fpregset_t *fpregs, int regno); | |
bd415eab | 58 | |
32872fa7 | 59 | #ifdef FILL_FPXREGSET |
084c156a | 60 | /* GNU/Linux i386: Copy register values between GDB's internal register cache |
32872fa7 DJ |
61 | and the i386 extended floating point registers. */ |
62 | ||
63 | #ifndef GDB_FPXREGSET_T | |
64 | #define GDB_FPXREGSET_T elf_fpxregset_t | |
65 | #endif | |
66 | ||
67 | typedef GDB_FPXREGSET_T gdb_fpxregset_t; | |
68 | ||
7f7fe91e UW |
69 | extern void supply_fpxregset (struct regcache *regcache, |
70 | const gdb_fpxregset_t *fpxregs); | |
71 | extern void fill_fpxregset (const struct regcache *regcache, | |
72 | gdb_fpxregset_t *fpxregs, int regno); | |
32872fa7 | 73 | #endif |
db4a10fa | 74 | |
bd415eab | 75 | #endif |