gdb/sparc-linux-nat.c - gdb

Functions defined

Source code

  1. /* Native-dependent code for GNU/Linux SPARC.
  2.    Copyright (C) 2005-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. #include "defs.h"
  15. #include "regcache.h"

  16. #include <sys/procfs.h>
  17. #include "gregset.h"

  18. #include "sparc-tdep.h"
  19. #include "sparc-nat.h"
  20. #include "inferior.h"
  21. #include "target.h"
  22. #include "linux-nat.h"

  23. void
  24. supply_gregset (struct regcache *regcache, const prgregset_t *gregs)
  25. {
  26.   sparc32_supply_gregset (sparc_gregmap, regcache, -1, gregs);
  27. }

  28. void
  29. supply_fpregset (struct regcache *regcache, const prfpregset_t *fpregs)
  30. {
  31.   sparc32_supply_fpregset (sparc_fpregmap, regcache, -1, fpregs);
  32. }

  33. void
  34. fill_gregset (const struct regcache *regcache, prgregset_t *gregs, int regnum)
  35. {
  36.   sparc32_collect_gregset (sparc_gregmap, regcache, regnum, gregs);
  37. }

  38. void
  39. fill_fpregset (const struct regcache *regcache,
  40.                prfpregset_t *fpregs, int regnum)
  41. {
  42.   sparc32_collect_fpregset (sparc_fpregmap, regcache, regnum, fpregs);
  43. }

  44. void _initialize_sparc_linux_nat (void);

  45. void
  46. _initialize_sparc_linux_nat (void)
  47. {
  48.   struct target_ops *t;

  49.   /* Fill in the generic GNU/Linux methods.  */
  50.   t = linux_target ();

  51.   sparc_fpregmap = &sparc32_bsd_fpregmap;

  52.   /* Add our register access methods.  */
  53.   t->to_fetch_registers = sparc_fetch_inferior_registers;
  54.   t->to_store_registers = sparc_store_inferior_registers;

  55.   /* Register the target.  */
  56.   linux_nat_add_target (t);
  57. }