gdb/aarch64-tdep.h - gdb

Data types defined

Macros defined

Source code

  1. /* Common target dependent code for GDB on AArch64 systems.

  2.    Copyright (C) 2009-2015 Free Software Foundation, Inc.
  3.    Contributed by ARM Ltd.

  4.    This file is part of GDB.

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

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

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


  15. #ifndef AARCH64_TDEP_H
  16. #define AARCH64_TDEP_H

  17. /* Forward declarations.  */
  18. struct gdbarch;
  19. struct regset;

  20. /* AArch64 Dwarf register numbering.  */
  21. #define AARCH64_DWARF_X0   0
  22. #define AARCH64_DWARF_SP  31
  23. #define AARCH64_DWARF_V0  64

  24. /* Register numbers of various important registers.  */
  25. enum aarch64_regnum
  26. {
  27.   AARCH64_X0_REGNUM,                /* First integer register */

  28.   /* Frame register in AArch64 code, if used.  */
  29.   AARCH64_FP_REGNUM = AARCH64_X0_REGNUM + 29,
  30.   AARCH64_LR_REGNUM = AARCH64_X0_REGNUM + 30,        /* Return address */
  31.   AARCH64_SP_REGNUM,                /* Stack pointer */
  32.   AARCH64_PC_REGNUM,                /* Program counter */
  33.   AARCH64_CPSR_REGNUM,                /* Contains status register */
  34.   AARCH64_V0_REGNUM,                /* First floating point / vector register */

  35.   /* Last floating point / vector register */
  36.   AARCH64_V31_REGNUM = AARCH64_V0_REGNUM + 31,
  37.   AARCH64_FPSR_REGNUM,                /* Floating point status register */
  38.   AARCH64_FPCR_REGNUM,                /* Floating point control register */

  39.   /* Other useful registers.  */

  40.   /* Last integer-like argument */
  41.   AARCH64_LAST_X_ARG_REGNUM = AARCH64_X0_REGNUM + 7,
  42.   AARCH64_STRUCT_RETURN_REGNUM = AARCH64_X0_REGNUM + 8,
  43.   AARCH64_LAST_V_ARG_REGNUM = AARCH64_V0_REGNUM + 7
  44. };

  45. /* Size of integer registers.  */
  46. #define X_REGISTER_SIZE  8
  47. #define B_REGISTER_SIZE  1
  48. #define H_REGISTER_SIZE  2
  49. #define S_REGISTER_SIZE  4
  50. #define D_REGISTER_SIZE  8
  51. #define V_REGISTER_SIZE 16
  52. #define Q_REGISTER_SIZE 16

  53. /* Total number of general (X) registers.  */
  54. #define AARCH64_X_REGISTER_COUNT 32

  55. /* Target-dependent structure in gdbarch.  */
  56. struct gdbarch_tdep
  57. {
  58.   /* Lowest address at which instructions will appear.  */
  59.   CORE_ADDR lowest_pc;

  60.   /* Offset to PC value in jump buffer.  If this is negative, longjmp
  61.      support will be disabled.  */
  62.   int jb_pc;

  63.   /* And the size of each entry in the buf.  */
  64.   size_t jb_elt_size;

  65.   /* Types for AdvSISD registers.  */
  66.   struct type *vnq_type;
  67.   struct type *vnd_type;
  68.   struct type *vns_type;
  69.   struct type *vnh_type;
  70.   struct type *vnb_type;
  71. };

  72. #endif /* aarch64-tdep.h */