xtensa.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* Common Target-dependent code for the Xtensa port of GDB, the GNU debugger.
  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 ARCH_XTENSA_H
  15. #define ARCH_XTENSA_H
  16. /* Xtensa ELF core file register set representation ('.reg' section).
  17. Copied from target-side ELF header <xtensa/elf.h>. */
  18. typedef uint32_t xtensa_elf_greg_t;
  19. typedef struct
  20. {
  21. xtensa_elf_greg_t pc;
  22. xtensa_elf_greg_t ps;
  23. xtensa_elf_greg_t lbeg;
  24. xtensa_elf_greg_t lend;
  25. xtensa_elf_greg_t lcount;
  26. xtensa_elf_greg_t sar;
  27. xtensa_elf_greg_t windowstart;
  28. xtensa_elf_greg_t windowbase;
  29. xtensa_elf_greg_t threadptr;
  30. xtensa_elf_greg_t reserved[7+48];
  31. xtensa_elf_greg_t ar[64];
  32. } xtensa_elf_gregset_t;
  33. #define XTENSA_ELF_NGREG (sizeof (xtensa_elf_gregset_t) \
  34. / sizeof (xtensa_elf_greg_t))
  35. #define C0_NREGS 16 /* Number of A-registers to track in call0 ABI. */
  36. #endif /* ARCH_XTENSA_H */