GDB (API)
/home/stan/gdb/src/gdb/sh-tdep.h
Go to the documentation of this file.
00001 /* Target-specific definition for a Renesas Super-H.
00002    Copyright (C) 1993-2013 Free Software Foundation, Inc.
00003 
00004    This file is part of GDB.
00005 
00006    This program is free software; you can redistribute it and/or modify
00007    it under the terms of the GNU General Public License as published by
00008    the Free Software Foundation; either version 3 of the License, or
00009    (at your option) any later version.
00010 
00011    This program is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014    GNU General Public License for more details.
00015 
00016    You should have received a copy of the GNU General Public License
00017    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
00018 
00019 #ifndef SH_TDEP_H
00020 #define SH_TDEP_H
00021 
00022 /* Contributed by Steve Chamberlain sac@cygnus.com.  */
00023 
00024 /* Registers for all SH variants.  Used also by sh3-rom.c.  */
00025 enum
00026   {
00027     R0_REGNUM = 0,
00028     STRUCT_RETURN_REGNUM = 2,
00029     ARG0_REGNUM = 4,
00030     ARGLAST_REGNUM = 7,
00031     FP_REGNUM = 14,
00032     PC_REGNUM = 16,
00033     PR_REGNUM = 17,
00034     GBR_REGNUM = 18,
00035     VBR_REGNUM = 19,
00036     MACH_REGNUM = 20,
00037     MACL_REGNUM = 21,
00038     SR_REGNUM = 22,
00039     FPUL_REGNUM = 23,
00040     /* Floating point registers */
00041     FPSCR_REGNUM = 24,
00042     FR0_REGNUM = 25,
00043     FLOAT_ARG0_REGNUM = 29,
00044     FLOAT_ARGLAST_REGNUM = 36,
00045     FP_LAST_REGNUM = 40,
00046     /* sh3,sh4 registers */
00047     SSR_REGNUM = 41,
00048     SPC_REGNUM = 42,
00049     /* DSP registers */
00050     DSR_REGNUM = 24,
00051     A0G_REGNUM = 25,
00052     A0_REGNUM = 26,
00053     A1G_REGNUM = 27,
00054     A1_REGNUM = 28,
00055     M0_REGNUM = 29,
00056     M1_REGNUM = 30,
00057     X0_REGNUM = 31,
00058     X1_REGNUM = 32,
00059     Y0_REGNUM = 33,
00060     Y1_REGNUM = 34,
00061     MOD_REGNUM = 40,
00062     RS_REGNUM = 43,
00063     RE_REGNUM = 44,
00064     DSP_R0_BANK_REGNUM = 51,
00065     DSP_R7_BANK_REGNUM = 58,
00066     /* sh2a register */
00067     R0_BANK0_REGNUM = 43,
00068     MACHB_REGNUM = 58,
00069     IVNB_REGNUM = 59,
00070     PRB_REGNUM = 60,
00071     GBRB_REGNUM = 61,
00072     MACLB_REGNUM = 62,
00073     BANK_REGNUM = 63,
00074     IBCR_REGNUM = 64,
00075     IBNR_REGNUM = 65,
00076     TBR_REGNUM = 66,
00077     PSEUDO_BANK_REGNUM = 67,
00078     /* Floating point pseudo registers */
00079     DR0_REGNUM = 68,
00080     DR_LAST_REGNUM = 75,
00081     FV0_REGNUM = 76,
00082     FV_LAST_REGNUM = 79
00083   };
00084 
00085 /* This structure describes a register in a core-file.  */
00086 struct sh_corefile_regmap
00087 {
00088   int regnum;
00089   unsigned int offset;
00090 };
00091 
00092 struct gdbarch_tdep
00093 {
00094   /* Non-NULL when debugging from a core file.  Provides the offset
00095      where each general-purpose register is stored inside the associated
00096      core file section.  */
00097   struct sh_corefile_regmap *core_gregmap;
00098   /* Non-NULL when debugging from a core file and when FP registers are
00099      available.  Provides the offset where each FP register is stored
00100      inside the associated core file section.  */
00101   struct sh_corefile_regmap *core_fpregmap;
00102 };
00103 
00104 extern struct regset sh_corefile_gregset;
00105 
00106 void sh_corefile_supply_regset (const struct regset *regset,
00107                                 struct regcache *regcache,
00108                                 int regnum, const void *regs, size_t len);
00109 void sh_corefile_collect_regset (const struct regset *regset,
00110                                  const struct regcache *regcache,
00111                                  int regnum, void *regs, size_t len);
00112 #endif /* SH_TDEP_H */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines