GDB (API)
|
00001 /* Architecture-dependent code for the Fujitsu FR-V, for GDB, the GNU Debugger. 00002 Copyright (C) 2004-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 /* Enumerate the possible ABIs for FR-V. */ 00020 enum frv_abi 00021 { 00022 FRV_ABI_EABI, 00023 FRV_ABI_FDPIC 00024 }; 00025 00026 /* Register numbers. The order in which these appear define the 00027 remote protocol, so take care in changing them. */ 00028 enum { 00029 /* Register numbers 0 -- 63 are always reserved for general-purpose 00030 registers. The chip at hand may have less. */ 00031 first_gpr_regnum = 0, 00032 sp_regnum = 1, 00033 fp_regnum = 2, 00034 struct_return_regnum = 3, 00035 last_gpr_regnum = 63, 00036 00037 /* Register numbers 64 -- 127 are always reserved for floating-point 00038 registers. The chip at hand may have less. */ 00039 first_fpr_regnum = 64, 00040 last_fpr_regnum = 127, 00041 00042 /* The PC register. */ 00043 pc_regnum = 128, 00044 00045 /* Register numbers 129 on up are always reserved for special-purpose 00046 registers. */ 00047 first_spr_regnum = 129, 00048 psr_regnum = 129, 00049 ccr_regnum = 130, 00050 cccr_regnum = 131, 00051 fdpic_loadmap_exec_regnum = 132, 00052 fdpic_loadmap_interp_regnum = 133, 00053 tbr_regnum = 135, 00054 brr_regnum = 136, 00055 dbar0_regnum = 137, 00056 dbar1_regnum = 138, 00057 dbar2_regnum = 139, 00058 dbar3_regnum = 140, 00059 scr0_regnum = 141, 00060 scr1_regnum = 142, 00061 scr2_regnum = 143, 00062 scr3_regnum = 144, 00063 lr_regnum = 145, 00064 lcr_regnum = 146, 00065 iacc0h_regnum = 147, 00066 iacc0l_regnum = 148, 00067 fsr0_regnum = 149, 00068 acc0_regnum = 150, 00069 acc7_regnum = 157, 00070 accg0123_regnum = 158, 00071 accg4567_regnum = 159, 00072 msr0_regnum = 160, 00073 msr1_regnum = 161, 00074 gner0_regnum = 162, 00075 gner1_regnum = 163, 00076 fner0_regnum = 164, 00077 fner1_regnum = 165, 00078 last_spr_regnum = 165, 00079 00080 /* The total number of registers we know exist. */ 00081 frv_num_regs = last_spr_regnum + 1, 00082 00083 /* Pseudo registers */ 00084 first_pseudo_regnum = frv_num_regs, 00085 00086 /* iacc0 - the 64-bit concatenation of iacc0h and iacc0l. */ 00087 iacc0_regnum = first_pseudo_regnum + 0, 00088 accg0_regnum = first_pseudo_regnum + 1, 00089 accg7_regnum = accg0_regnum + 7, 00090 00091 last_pseudo_regnum = accg7_regnum, 00092 frv_num_pseudo_regs = last_pseudo_regnum - first_pseudo_regnum + 1, 00093 }; 00094 00095 /* Return the FR-V ABI associated with GDBARCH. */ 00096 enum frv_abi frv_abi (struct gdbarch *gdbarch); 00097 00098 /* Fetch the interpreter and executable loadmap addresses (for shared 00099 library support) for the FDPIC ABI. Return 0 if successful, -1 if 00100 not. (E.g, -1 will be returned if the ABI isn't the FDPIC ABI.) */ 00101 int frv_fdpic_loadmap_addresses (struct gdbarch *gdbarch, 00102 CORE_ADDR *interp_addr, CORE_ADDR *exec_addr); 00103 00104 /* Given a function entry point, find and return the GOT address for the 00105 containing load module. */ 00106 CORE_ADDR frv_fdpic_find_global_pointer (CORE_ADDR addr); 00107 00108 /* Given a function entry point, find and return the canonical descriptor 00109 for that function, if one exists. If no canonical descriptor could 00110 be found, return 0. */ 00111 CORE_ADDR frv_fdpic_find_canonical_descriptor (CORE_ADDR entry_point); 00112 00113 00114 /* Given an objfile, return the address of its link map. This value is 00115 needed for TLS support. */ 00116 CORE_ADDR frv_fetch_objfile_link_map (struct objfile *objfile); 00117 00118 struct target_so_ops; 00119 extern struct target_so_ops frv_so_ops; 00120