ppc-linux-tdep.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /* Target-dependent code for GDB, the GNU debugger.
  2. Copyright (C) 2008-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 PPC_LINUX_TDEP_H
  15. #define PPC_LINUX_TDEP_H
  16. #include "ppc-tdep.h" /* For PPC_NUM_REGS. */
  17. struct regset;
  18. /* From ppc-linux-tdep.c ... */
  19. const struct regset *ppc_linux_gregset (int);
  20. const struct regset *ppc_linux_fpregset (void);
  21. /* Get the vector regset that matches the target byte order. */
  22. const struct regset *ppc_linux_vrregset (struct gdbarch *gdbarch);
  23. const struct regset *ppc_linux_vsxregset (void);
  24. /* Get the checkpointed GPR regset that matches the target wordsize
  25. and byteorder of GDBARCH. */
  26. const struct regset *ppc_linux_cgprregset (struct gdbarch *gdbarch);
  27. /* Get the checkpointed vector regset that matches the target byte
  28. order. */
  29. const struct regset* ppc_linux_cvmxregset (struct gdbarch *gdbarch);
  30. /* Extra register number constants. The Linux kernel stores a
  31. "trap" code and the original value of r3 into special "registers";
  32. these need to be saved and restored when performing an inferior
  33. call while the inferior was interrupted within a system call. */
  34. enum {
  35. PPC_ORIG_R3_REGNUM = PPC_NUM_REGS,
  36. PPC_TRAP_REGNUM,
  37. };
  38. /* Return 1 if PPC_ORIG_R3_REGNUM and PPC_TRAP_REGNUM are usable. */
  39. int ppc_linux_trap_reg_p (struct gdbarch *gdbarch);
  40. /* Additional register sets, defined in ppc-linux-tdep.c. */
  41. extern const struct regset ppc32_linux_pprregset;
  42. extern const struct regset ppc32_linux_dscrregset;
  43. extern const struct regset ppc32_linux_tarregset;
  44. extern const struct regset ppc32_linux_ebbregset;
  45. extern const struct regset ppc32_linux_pmuregset;
  46. extern const struct regset ppc32_linux_tm_sprregset;
  47. extern const struct regset ppc32_linux_cfprregset;
  48. extern const struct regset ppc32_linux_cvsxregset;
  49. extern const struct regset ppc32_linux_cpprregset;
  50. extern const struct regset ppc32_linux_cdscrregset;
  51. extern const struct regset ppc32_linux_ctarregset;
  52. #endif /* PPC_LINUX_TDEP_H */