GDB (API)
|
00001 /* Native-dependent code for GNU/Linux SPARC. 00002 Copyright (C) 2005-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 #include "defs.h" 00020 #include "regcache.h" 00021 00022 #include <sys/procfs.h> 00023 #include "gregset.h" 00024 00025 #include "sparc-tdep.h" 00026 #include "sparc-nat.h" 00027 #include "inferior.h" 00028 #include "target.h" 00029 #include "linux-nat.h" 00030 00031 void 00032 supply_gregset (struct regcache *regcache, const prgregset_t *gregs) 00033 { 00034 sparc32_supply_gregset (sparc_gregset, regcache, -1, gregs); 00035 } 00036 00037 void 00038 supply_fpregset (struct regcache *regcache, const prfpregset_t *fpregs) 00039 { 00040 sparc32_supply_fpregset (sparc_fpregset, regcache, -1, fpregs); 00041 } 00042 00043 void 00044 fill_gregset (const struct regcache *regcache, prgregset_t *gregs, int regnum) 00045 { 00046 sparc32_collect_gregset (sparc_gregset, regcache, regnum, gregs); 00047 } 00048 00049 void 00050 fill_fpregset (const struct regcache *regcache, 00051 prfpregset_t *fpregs, int regnum) 00052 { 00053 sparc32_collect_fpregset (sparc_fpregset, regcache, regnum, fpregs); 00054 } 00055 00056 void _initialize_sparc_linux_nat (void); 00057 00058 void 00059 _initialize_sparc_linux_nat (void) 00060 { 00061 struct target_ops *t; 00062 00063 /* Fill in the generic GNU/Linux methods. */ 00064 t = linux_target (); 00065 00066 sparc_fpregset = &sparc32_bsd_fpregset; 00067 00068 /* Add our register access methods. */ 00069 t->to_fetch_registers = sparc_fetch_inferior_registers; 00070 t->to_store_registers = sparc_store_inferior_registers; 00071 00072 /* Register the target. */ 00073 linux_nat_add_target (t); 00074 }