gdb/frv-tdep.h - gdb

Data types defined

Source code

  1. /* Architecture-dependent code for the Fujitsu FR-V, for GDB, the GNU Debugger.
  2.    Copyright (C) 2004-2015 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. /* Enumerate the possible ABIs for FR-V.  */
  15. enum frv_abi
  16.   {
  17.     FRV_ABI_EABI,
  18.     FRV_ABI_FDPIC
  19.   };

  20. /* Register numbers.  The order in which these appear define the
  21.    remote protocol, so take care in changing them.  */
  22. enum {
  23.   /* Register numbers 0 -- 63 are always reserved for general-purpose
  24.      registers.  The chip at hand may have less.  */
  25.   first_gpr_regnum = 0,
  26.   sp_regnum = 1,
  27.   fp_regnum = 2,
  28.   struct_return_regnum = 3,
  29.   last_gpr_regnum = 63,

  30.   /* Register numbers 64 -- 127 are always reserved for floating-point
  31.      registers.  The chip at hand may have less.  */
  32.   first_fpr_regnum = 64,
  33.   last_fpr_regnum = 127,

  34.   /* The PC register.  */
  35.   pc_regnum = 128,

  36.   /* Register numbers 129 on up are always reserved for special-purpose
  37.      registers.  */
  38.   first_spr_regnum = 129,
  39.   psr_regnum = 129,
  40.   ccr_regnum = 130,
  41.   cccr_regnum = 131,
  42.   fdpic_loadmap_exec_regnum = 132,
  43.   fdpic_loadmap_interp_regnum = 133,
  44.   tbr_regnum = 135,
  45.   brr_regnum = 136,
  46.   dbar0_regnum = 137,
  47.   dbar1_regnum = 138,
  48.   dbar2_regnum = 139,
  49.   dbar3_regnum = 140,
  50.   scr0_regnum = 141,
  51.   scr1_regnum = 142,
  52.   scr2_regnum = 143,
  53.   scr3_regnum = 144,
  54.   lr_regnum = 145,
  55.   lcr_regnum = 146,
  56.   iacc0h_regnum = 147,
  57.   iacc0l_regnum = 148,
  58.   fsr0_regnum = 149,
  59.   acc0_regnum = 150,
  60.   acc7_regnum = 157,
  61.   accg0123_regnum = 158,
  62.   accg4567_regnum = 159,
  63.   msr0_regnum = 160,
  64.   msr1_regnum = 161,
  65.   gner0_regnum = 162,
  66.   gner1_regnum = 163,
  67.   fner0_regnum = 164,
  68.   fner1_regnum = 165,
  69.   last_spr_regnum = 165,

  70.   /* The total number of registers we know exist.  */
  71.   frv_num_regs = last_spr_regnum + 1,

  72.   /* Pseudo registers */
  73.   first_pseudo_regnum = frv_num_regs,

  74.   /* iacc0 - the 64-bit concatenation of iacc0h and iacc0l.  */
  75.   iacc0_regnum = first_pseudo_regnum + 0,
  76.   accg0_regnum = first_pseudo_regnum + 1,
  77.   accg7_regnum = accg0_regnum + 7,

  78.   last_pseudo_regnum = accg7_regnum,
  79.   frv_num_pseudo_regs = last_pseudo_regnum - first_pseudo_regnum + 1,
  80. };

  81. /* Return the FR-V ABI associated with GDBARCH.  */
  82. enum frv_abi frv_abi (struct gdbarch *gdbarch);

  83. /* Fetch the interpreter and executable loadmap addresses (for shared
  84.    library support) for the FDPIC ABI.  Return 0 if successful, -1 if
  85.    not.  (E.g, -1 will be returned if the ABI isn't the FDPIC ABI.)  */
  86. int frv_fdpic_loadmap_addresses (struct gdbarch *gdbarch,
  87.                                  CORE_ADDR *interp_addr, CORE_ADDR *exec_addr);

  88. /* Given a function entry point, find and return the GOT address for the
  89.    containing load module.  */
  90. CORE_ADDR frv_fdpic_find_global_pointer (CORE_ADDR addr);

  91. /* Given a function entry point, find and return the canonical descriptor
  92.    for that function, if one exists.  If no canonical descriptor could
  93.    be found, return 0.  */
  94. CORE_ADDR frv_fdpic_find_canonical_descriptor (CORE_ADDR entry_point);


  95. /* Given an objfile, return the address of its link map.  This value is
  96.    needed for TLS support.  */
  97. CORE_ADDR frv_fetch_objfile_link_map (struct objfile *objfile);

  98. struct target_so_ops;
  99. extern struct target_so_ops frv_so_ops;