summaryrefslogtreecommitdiff
path: root/gdb/arm-linux-tdep.h
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2006-07-12 20:46:33 +0000
committerDaniel Jacobowitz <dan@debian.org>2006-07-12 20:46:33 +0000
commitd03b3beb90f222f59478304ce4932bdd84558450 (patch)
treed93a7f79b887922316577394e6fe9ac5b9b0443f /gdb/arm-linux-tdep.h
parented2c8dd472c3c299eb842610aeabf786bc3f1435 (diff)
downloadgdb-d03b3beb90f222f59478304ce4932bdd84558450.tar.gz
* Makefile.in (arm_linux_tdep_h): New variable.
(arm-linux-nat.o, arm-linux-tdep.o): Update. * arm-linux-nat.c: Include "arm-linux-tdep.h". (typeNone, typeSingle, typeDouble, typeExtended) (FPWORDS, ARM_CPSR_REGNUM, FPREG, FPA11) (fetch_nwfpe_single, fetch_nwfpe_double, fetch_nwfpe_none) (fetch_nwfpe_extended, fetch_nwfpe_register, store_nwfpe_single) (store_nwfpe_double, store_nwfpe_extended, store_nwfpe_register): Delete. (fetch_fpregister, fetch_fpregs, store_fpregister, store_fpregs): Use gdb_byte buffers, NWFPE_FPSR_OFFSET, supply_nwfpe_register, and collect_nwfpe_register. (fill_gregset, supply_gregset, fill_fpregset, supply_fpregset): Use new regset functions. * arm-linux-tdep.c: Include "regset.h" and "arm-linux-tdep.h". (arm_apcs_32): New declaration. (ARM_LINUX_SIZEOF_GREGSET, arm_linux_supply_gregset) (arm_linux_collect_gregset, typeNone, typeSingle, typeDouble) (typeExtended, supply_nwfpe_register, collect_nwfpe_register) (arm_linux_supply_nwfpe, arm_linux_collect_nwfpe) (arm_linux_regset_from_core_section): New. (arm_linux_init_abi): Register arm_linux_regset_from_core_section. * arm-linux-tdep.h: New file. * arm-tdep.h (struct regset): Declare. (struct gdbarch_tdep): Add gregset, fpregset members. * config/arm/linux.mh (NATDEPFILES): Remove corelow.o and core-regset.o. * config/arm/linux.mt (TDEPFILES): Add corelow.o.
Diffstat (limited to 'gdb/arm-linux-tdep.h')
-rw-r--r--gdb/arm-linux-tdep.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/gdb/arm-linux-tdep.h b/gdb/arm-linux-tdep.h
new file mode 100644
index 00000000000..31d6ba03fc9
--- /dev/null
+++ b/gdb/arm-linux-tdep.h
@@ -0,0 +1,62 @@
+/* GNU/Linux on ARM target support, prototypes.
+
+ Copyright (C) 2006
+ Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
+
+struct regset;
+struct regcache;
+
+#define ARM_CPSR_REGNUM 16
+
+#define ARM_LINUX_SIZEOF_NWFPE (8 * FP_REGISTER_SIZE \
+ + 2 * INT_REGISTER_SIZE \
+ + 8 + INT_REGISTER_SIZE)
+
+/* Support for register format used by the NWFPE FPA emulator. Each
+ register takes three words, where either the first one, two, or
+ three hold a single, double, or extended precision value (depending
+ on the corresponding tag). The register set is eight registers,
+ followed by the fpsr and fpcr, followed by eight tag bytes, and a
+ final word flag which indicates whether NWFPE has been
+ initialized. */
+
+#define NWFPE_FPSR_OFFSET (8 * FP_REGISTER_SIZE)
+#define NWFPE_FPCR_OFFSET (NWFPE_FPSR_OFFSET + INT_REGISTER_SIZE)
+#define NWFPE_TAGS_OFFSET (NWFPE_FPCR_OFFSET + INT_REGISTER_SIZE)
+#define NWFPE_INITFLAG_OFFSET (NWFPE_TAGS_OFFSET + 8)
+
+void arm_linux_supply_gregset (const struct regset *regset,
+ struct regcache *regcache,
+ int regnum, const void *gregs_buf, size_t len);
+void arm_linux_collect_gregset (const struct regset *regset,
+ const struct regcache *regcache,
+ int regnum, void *gregs_buf, size_t len);
+
+void supply_nwfpe_register (struct regcache *regcache, int regno,
+ const gdb_byte *regs);
+void collect_nwfpe_register (const struct regcache *regcache, int regno,
+ gdb_byte *regs);
+
+void arm_linux_supply_nwfpe (const struct regset *regset,
+ struct regcache *regcache,
+ int regnum, const void *regs_buf, size_t len);
+void arm_linux_collect_nwfpe (const struct regset *regset,
+ const struct regcache *regcache,
+ int regnum, void *regs_buf, size_t len);