1 /* Native-dependent code for GNU/Linux UltraSPARC.
3 Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010
4 Free Software Foundation, Inc.
6 This file is part of GDB.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
24 #include <sys/procfs.h>
27 #include "sparc64-tdep.h"
28 #include "sparc-tdep.h"
29 #include "sparc-nat.h"
32 #include "linux-nat.h"
34 static const struct sparc_gregset sparc64_linux_ptrace_gregset =
36 16 * 8, /* "tstate" */
49 supply_gregset (struct regcache *regcache, const prgregset_t *gregs)
51 sparc64_supply_gregset (sparc_gregset, regcache, -1, gregs);
55 supply_fpregset (struct regcache *regcache, const prfpregset_t *fpregs)
57 sparc64_supply_fpregset (regcache, -1, fpregs);
61 fill_gregset (const struct regcache *regcache, prgregset_t *gregs, int regnum)
63 sparc64_collect_gregset (sparc_gregset, regcache, regnum, gregs);
67 fill_fpregset (const struct regcache *regcache,
68 prfpregset_t *fpregs, int regnum)
70 sparc64_collect_fpregset (regcache, regnum, fpregs);
73 /* Provide a prototype to silence -Wmissing-prototypes. */
74 void _initialize_sparc64_linux_nat (void);
77 _initialize_sparc64_linux_nat (void)
81 /* Fill in the generic GNU/Linux methods. */
84 /* Add our register access methods. */
85 t->to_fetch_registers = sparc_fetch_inferior_registers;
86 t->to_store_registers = sparc_store_inferior_registers;
88 /* Register the target. */
89 linux_nat_add_target (t);
91 sparc_gregset = &sparc64_linux_ptrace_gregset;