regset.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /* Manage register sets.
  2. Copyright (C) 2003-2022 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 REGSET_H
  15. #define REGSET_H 1
  16. struct gdbarch;
  17. struct regcache;
  18. /* Data structure describing a register set. */
  19. typedef void (supply_regset_ftype) (const struct regset *, struct regcache *,
  20. int, const void *, size_t);
  21. typedef void (collect_regset_ftype) (const struct regset *,
  22. const struct regcache *,
  23. int, void *, size_t);
  24. struct regset
  25. {
  26. /* Pointer to a "register map", for private use by the methods
  27. below. Typically describes how the regset's registers are
  28. arranged in the buffer collected to or supplied from. */
  29. const void *regmap;
  30. /* Function supplying values in a register set to a register cache. */
  31. supply_regset_ftype *supply_regset;
  32. /* Function collecting values in a register set from a register cache. */
  33. collect_regset_ftype *collect_regset;
  34. unsigned flags;
  35. };
  36. /* Values for a regset's 'flags' field. */
  37. #define REGSET_VARIABLE_SIZE 1 /* Accept a larger regset section size
  38. in a core file without warning. */
  39. #endif /* regset.h */