]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gregset.h
2011-02-26 Michael Snyder <msnyder@vmware.com>
[thirdparty/binutils-gdb.git] / gdb / gregset.h
CommitLineData
c60c0f5f 1/* Interface for functions using gregset and fpregset types.
7b6bb8da 2 Copyright (C) 2000, 2002, 2007, 2008, 2009, 2010, 2011
4c38e0a4 3 Free Software Foundation, Inc.
c60c0f5f
MS
4
5 This file is part of GDB.
6
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
a9762ec7 9 the Free Software Foundation; either version 3 of the License, or
c60c0f5f
MS
10 (at your option) any later version.
11
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.
16
17 You should have received a copy of the GNU General Public License
a9762ec7 18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
c60c0f5f 19
bd415eab
MK
20#ifndef GREGSET_H
21#define GREGSET_H
22
c60c0f5f
MS
23#ifndef GDB_GREGSET_T
24#define GDB_GREGSET_T gregset_t
25#endif
26
27#ifndef GDB_FPREGSET_T
28#define GDB_FPREGSET_T fpregset_t
29#endif
30
bd415eab 31typedef GDB_GREGSET_T gdb_gregset_t;
c60c0f5f
MS
32typedef GDB_FPREGSET_T gdb_fpregset_t;
33
7f7fe91e
UW
34struct regcache;
35
c60c0f5f
MS
36/* A gregset is a data structure supplied by the native OS containing
37 the general register values of the debugged process. Usually this
38 includes integer registers and control registers. An fpregset is a
39 data structure containing the floating point registers. These data
40 structures were originally a part of the /proc interface, but have
a4b6fc86 41 been borrowed or copied by other GDB targets, eg. GNU/Linux. */
c60c0f5f 42
bd415eab 43/* Copy register values from the native target gregset/fpregset
c60c0f5f
MS
44 into GDB's internal register cache. */
45
7f7fe91e
UW
46extern void supply_gregset (struct regcache *regcache,
47 const gdb_gregset_t *gregs);
48extern void supply_fpregset (struct regcache *regcache,
49 const gdb_fpregset_t *fpregs);
c60c0f5f
MS
50
51/* Copy register values from GDB's register cache into
bd415eab 52 the native target gregset/fpregset. If regno is -1,
c60c0f5f
MS
53 copy all the registers. */
54
7f7fe91e
UW
55extern void fill_gregset (const struct regcache *regcache,
56 gdb_gregset_t *gregs, int regno);
57extern void fill_fpregset (const struct regcache *regcache,
58 gdb_fpregset_t *fpregs, int regno);
bd415eab
MK
59
60#endif