GDB (API)
/home/stan/gdb/src/gdb/gregset.h
Go to the documentation of this file.
00001 /* Interface for functions using gregset and fpregset types.
00002    Copyright (C) 2000-2013 Free Software Foundation, Inc.
00003 
00004    This file is part of GDB.
00005 
00006    This program is free software; you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License as published by
00008    the Free Software Foundation; either version 3 of the License, or
00009    (at your option) any later version.
00010 
00011    This program is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014    GNU General Public License for more details.
00015 
00016    You should have received a copy of the GNU General Public License
00017    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
00018 
00019 #ifndef GREGSET_H
00020 #define GREGSET_H
00021 
00022 #ifdef HAVE_SYS_PROCFS_H
00023 #include <sys/procfs.h>
00024 #endif
00025 
00026 #ifndef GDB_GREGSET_T
00027 #define GDB_GREGSET_T gregset_t
00028 #endif
00029 
00030 #ifndef GDB_FPREGSET_T
00031 #define GDB_FPREGSET_T fpregset_t
00032 #endif
00033 
00034 typedef GDB_GREGSET_T gdb_gregset_t;
00035 typedef GDB_FPREGSET_T gdb_fpregset_t;
00036 
00037 struct regcache;
00038 
00039 /* A gregset is a data structure supplied by the native OS containing
00040    the general register values of the debugged process.  Usually this
00041    includes integer registers and control registers.  An fpregset is a
00042    data structure containing the floating point registers.  These data
00043    structures were originally a part of the /proc interface, but have
00044    been borrowed or copied by other GDB targets, eg. GNU/Linux.  */
00045 
00046 /* Copy register values from the native target gregset/fpregset
00047    into GDB's internal register cache.  */
00048 
00049 extern void supply_gregset (struct regcache *regcache,
00050                             const gdb_gregset_t *gregs);
00051 extern void supply_fpregset (struct regcache *regcache,
00052                              const gdb_fpregset_t *fpregs);
00053 
00054 /* Copy register values from GDB's register cache into
00055    the native target gregset/fpregset.  If regno is -1, 
00056    copy all the registers.  */
00057 
00058 extern void fill_gregset (const struct regcache *regcache,
00059                           gdb_gregset_t *gregs, int regno);
00060 extern void fill_fpregset (const struct regcache *regcache,
00061                            gdb_fpregset_t *fpregs, int regno);
00062 
00063 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines