gdb/gregset.h - gdb

Data types defined

Macros defined

Source code

  1. /* Interface for functions using gregset and fpregset types.
  2.    Copyright (C) 2000-2015 Free Software Foundation, Inc.

  3.    This file is part of GDB.

  4.    This program is free software; you can redistribute it and/or modify
  5.    it under the terms of the GNU General Public License as published by
  6.    the Free Software Foundation; either version 3 of the License, or
  7.    (at your option) any later version.

  8.    This program is distributed in the hope that it will be useful,
  9.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  10.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11.    GNU General Public License for more details.

  12.    You should have received a copy of the GNU General Public License
  13.    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */

  14. #ifndef GREGSET_H
  15. #define GREGSET_H

  16. #ifdef HAVE_SYS_PROCFS_H
  17. #include <sys/procfs.h>
  18. #endif

  19. #ifndef GDB_GREGSET_T
  20. #define GDB_GREGSET_T gregset_t
  21. #endif

  22. #ifndef GDB_FPREGSET_T
  23. #define GDB_FPREGSET_T fpregset_t
  24. #endif

  25. typedef GDB_GREGSET_T gdb_gregset_t;
  26. typedef GDB_FPREGSET_T gdb_fpregset_t;

  27. struct regcache;

  28. /* A gregset is a data structure supplied by the native OS containing
  29.    the general register values of the debugged process.  Usually this
  30.    includes integer registers and control registers.  An fpregset is a
  31.    data structure containing the floating point registers.  These data
  32.    structures were originally a part of the /proc interface, but have
  33.    been borrowed or copied by other GDB targets, eg. GNU/Linux.  */

  34. /* Copy register values from the native target gregset/fpregset
  35.    into GDB's internal register cache.  */

  36. extern void supply_gregset (struct regcache *regcache,
  37.                             const gdb_gregset_t *gregs);
  38. extern void supply_fpregset (struct regcache *regcache,
  39.                              const gdb_fpregset_t *fpregs);

  40. /* Copy register values from GDB's register cache into
  41.    the native target gregset/fpregset.  If regno is -1,
  42.    copy all the registers.  */

  43. extern void fill_gregset (const struct regcache *regcache,
  44.                           gdb_gregset_t *gregs, int regno);
  45. extern void fill_fpregset (const struct regcache *regcache,
  46.                            gdb_fpregset_t *fpregs, int regno);

  47. #endif