GDB (API)
/home/stan/gdb/src/gdb/aarch64-tdep.h
Go to the documentation of this file.
00001 /* Common target dependent code for GDB on AArch64 systems.
00002 
00003    Copyright (C) 2009-2013 Free Software Foundation, Inc.
00004    Contributed by ARM Ltd.
00005 
00006    This file is part of GDB.
00007 
00008    This program is free software; you can redistribute it and/or modify
00009    it under the terms of the GNU General Public License as published by
00010    the Free Software Foundation; either version 3 of the License, or
00011    (at your option) any later version.
00012 
00013    This program is distributed in the hope that it will be useful,
00014    but WITHOUT ANY WARRANTY; without even the implied warranty of
00015    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016    GNU General Public License for more details.
00017 
00018    You should have received a copy of the GNU General Public License
00019    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
00020 
00021 
00022 #ifndef AARCH64_TDEP_H
00023 #define AARCH64_TDEP_H
00024 
00025 /* Forward declarations.  */
00026 struct gdbarch;
00027 struct regset;
00028 
00029 /* AArch64 Dwarf register numbering.  */
00030 #define AARCH64_DWARF_X0   0
00031 #define AARCH64_DWARF_SP  31
00032 #define AARCH64_DWARF_V0  64
00033 
00034 /* Register numbers of various important registers.  */
00035 enum aarch64_regnum
00036 {
00037   AARCH64_X0_REGNUM,            /* First integer register */
00038 
00039   /* Frame register in AArch64 code, if used.  */
00040   AARCH64_FP_REGNUM = AARCH64_X0_REGNUM + 29,
00041   AARCH64_LR_REGNUM = AARCH64_X0_REGNUM + 30,   /* Return address */
00042   AARCH64_SP_REGNUM,            /* Stack pointer */
00043   AARCH64_PC_REGNUM,            /* Program counter */
00044   AARCH64_CPSR_REGNUM,          /* Contains status register */
00045   AARCH64_V0_REGNUM,            /* First floating point / vector register */
00046 
00047   /* Last floating point / vector register */
00048   AARCH64_V31_REGNUM = AARCH64_V0_REGNUM + 31,
00049   AARCH64_FPSR_REGNUM,          /* Floating point status register */
00050   AARCH64_FPCR_REGNUM,          /* Floating point control register */
00051 
00052   /* Other useful registers.  */
00053 
00054   /* Last integer-like argument */
00055   AARCH64_LAST_X_ARG_REGNUM = AARCH64_X0_REGNUM + 7,
00056   AARCH64_STRUCT_RETURN_REGNUM = AARCH64_X0_REGNUM + 8,
00057   AARCH64_LAST_V_ARG_REGNUM = AARCH64_V0_REGNUM + 7
00058 };
00059 
00060 /* Size of integer registers.  */
00061 #define X_REGISTER_SIZE  8
00062 #define B_REGISTER_SIZE  1
00063 #define H_REGISTER_SIZE  2
00064 #define S_REGISTER_SIZE  4
00065 #define D_REGISTER_SIZE  8
00066 #define V_REGISTER_SIZE 16
00067 #define Q_REGISTER_SIZE 16
00068 
00069 /* Total number of general (X) registers.  */
00070 #define AARCH64_X_REGISTER_COUNT 32
00071 
00072 /* Target-dependent structure in gdbarch.  */
00073 struct gdbarch_tdep
00074 {
00075   /* Lowest address at which instructions will appear.  */
00076   CORE_ADDR lowest_pc;
00077 
00078   /* Offset to PC value in jump buffer.  If this is negative, longjmp
00079      support will be disabled.  */
00080   int jb_pc;
00081 
00082   /* And the size of each entry in the buf.  */
00083   size_t jb_elt_size;
00084 
00085   /* Cached core file helpers.  */
00086   struct regset *gregset;
00087   struct regset *fpregset;
00088 
00089   /* Types for AdvSISD registers.  */
00090   struct type *vnq_type;
00091   struct type *vnd_type;
00092   struct type *vns_type;
00093   struct type *vnh_type;
00094   struct type *vnb_type;
00095 };
00096 
00097 #endif /* aarch64-tdep.h */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines