Commit | Line | Data |
---|---|---|
c60c0f5f | 1 | /* Interface for functions using gregset and fpregset types. |
618f726f | 2 | Copyright (C) 2000-2016 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 | ||
1b7c1b10 PA |
22 | #ifdef HAVE_SYS_PROCFS_H |
23 | #include <sys/procfs.h> | |
24 | #endif | |
25 | ||
c60c0f5f MS |
26 | #ifndef GDB_GREGSET_T |
27 | #define GDB_GREGSET_T gregset_t | |
28 | #endif | |
29 | ||
30 | #ifndef GDB_FPREGSET_T | |
31 | #define GDB_FPREGSET_T fpregset_t | |
32 | #endif | |
33 | ||
bd415eab | 34 | typedef GDB_GREGSET_T gdb_gregset_t; |
c60c0f5f MS |
35 | typedef GDB_FPREGSET_T gdb_fpregset_t; |
36 | ||
7f7fe91e UW |
37 | struct regcache; |
38 | ||
c60c0f5f MS |
39 | /* A gregset is a data structure supplied by the native OS containing |
40 | the general register values of the debugged process. Usually this | |
41 | includes integer registers and control registers. An fpregset is a | |
42 | data structure containing the floating point registers. These data | |
43 | structures were originally a part of the /proc interface, but have | |
a4b6fc86 | 44 | been borrowed or copied by other GDB targets, eg. GNU/Linux. */ |
c60c0f5f | 45 | |
bd415eab | 46 | /* Copy register values from the native target gregset/fpregset |
c60c0f5f MS |
47 | into GDB's internal register cache. */ |
48 | ||
7f7fe91e UW |
49 | extern void supply_gregset (struct regcache *regcache, |
50 | const gdb_gregset_t *gregs); | |
51 | extern void supply_fpregset (struct regcache *regcache, | |
52 | const gdb_fpregset_t *fpregs); | |
c60c0f5f MS |
53 | |
54 | /* Copy register values from GDB's register cache into | |
bd415eab | 55 | the native target gregset/fpregset. If regno is -1, |
c60c0f5f MS |
56 | copy all the registers. */ |
57 | ||
7f7fe91e UW |
58 | extern void fill_gregset (const struct regcache *regcache, |
59 | gdb_gregset_t *gregs, int regno); | |
60 | extern void fill_fpregset (const struct regcache *regcache, | |
61 | gdb_fpregset_t *fpregs, int regno); | |
bd415eab MK |
62 | |
63 | #endif |