aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2004-06-26 11:47:53 +0000
committerMark Kettenis <kettenis@gnu.org>2004-06-26 11:47:53 +0000
commitcb4610693dc34ce904d1c6f1fb7f49cc2149dbd1 (patch)
tree5e848d8c2c0627a997d18349ab53da9aea58e756
parentecba89de449427ffe53a5e63b3e88c9a7d3ad530 (diff)
downloadgdb-cb4610693dc34ce904d1c6f1fb7f49cc2149dbd1.zip
gdb-cb4610693dc34ce904d1c6f1fb7f49cc2149dbd1.tar.gz
gdb-cb4610693dc34ce904d1c6f1fb7f49cc2149dbd1.tar.bz2
* amd64fbsd-nat.c: Don't include <sys/procfs.h> and "gregset.h".
(gregset_t, fpregset_t): Remove typedefs. (REG_OFFSET): Rename argument. (amd64bsd_r_reg_offset): Rename from reg_offset. (supply_gregset, fill_gregset, supply_fpregset, fill_fpregset): Remove functions. (_initialize_amd64fbsd_nat): Use amd64fbsd64_r_reg_offset instead of reg_offset. * Makefile.in (amd64fbsd-nat.o): Update dependencies.
-rw-r--r--gdb/ChangeLog10
-rw-r--r--gdb/Makefile.in2
-rw-r--r--gdb/amd64fbsd-nat.c68
3 files changed, 18 insertions, 62 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 22d15e6..3600061 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,15 @@
2004-06-26 Mark Kettenis <kettenis@gnu.org>
+ * amd64fbsd-nat.c: Don't include <sys/procfs.h> and "gregset.h".
+ (gregset_t, fpregset_t): Remove typedefs.
+ (REG_OFFSET): Rename argument.
+ (amd64bsd_r_reg_offset): Rename from reg_offset.
+ (supply_gregset, fill_gregset, supply_fpregset, fill_fpregset):
+ Remove functions.
+ (_initialize_amd64fbsd_nat): Use amd64fbsd64_r_reg_offset instead
+ of reg_offset.
+ * Makefile.in (amd64fbsd-nat.o): Update dependencies.
+
* amd64-nat.c (amd64_supply_native_gregset): Fix comment.
* vax-tdep.c: Tweak comment.
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index ad7f933..01d98ee 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1565,7 +1565,7 @@ alpha-tdep.o: alpha-tdep.c $(defs_h) $(doublest_h) $(frame_h) \
amd64bsd-nat.o: amd64bsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
$(gdb_assert_h) $(amd64_tdep_h) $(amd64_nat_h)
amd64fbsd-nat.o: amd64fbsd-nat.c $(defs_h) $(inferior_h) $(regcache_h) \
- $(gdb_assert_h) $(gregset_h) $(amd64_tdep_h) $(amd64_nat_h)
+ $(gdb_assert_h) $(amd64_tdep_h) $(amd64_nat_h)
amd64fbsd-tdep.o: amd64fbsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \
$(gdbcore_h) $(regcache_h) $(osabi_h) $(gdb_string_h) \
$(amd64_tdep_h) $(solib_svr4_h)
diff --git a/gdb/amd64fbsd-nat.c b/gdb/amd64fbsd-nat.c
index 61ce73c..e0f008c 100644
--- a/gdb/amd64fbsd-nat.c
+++ b/gdb/amd64fbsd-nat.c
@@ -31,30 +31,17 @@
#include <sys/sysctl.h>
#include <machine/reg.h>
-#ifdef HAVE_SYS_PROCFS_H
-#include <sys/procfs.h>
-#endif
-
-#ifndef HAVE_GREGSET_T
-typedef struct reg gregset_t;
-#endif
-
-#ifndef HAVE_FPREGSET_T
-typedef struct fpreg fpregset_t;
-#endif
-
-#include "gregset.h"
#include "amd64-tdep.h"
#include "amd64-nat.h"
-/* Offset to the gregset_t location where REG is stored. */
-#define REG_OFFSET(reg) offsetof (gregset_t, reg)
+/* Offset in `struct reg' where MEMBER is stored. */
+#define REG_OFFSET(member) offsetof (struct reg, member)
-/* At reg_offset[REGNUM] you'll find the offset to the gregset_t
- location where the GDB register REGNUM is stored. Unsupported
- registers are marked with `-1'. */
-static int reg_offset[] =
+/* At amd64fbsd64_r_reg_offset[REGNUM] you'll find the offset in
+ `struct reg' location where the GDB register REGNUM is stored.
+ Unsupported registers are marked with `-1'. */
+static int amd64fbsd64_r_reg_offset[] =
{
REG_OFFSET (r_rax),
REG_OFFSET (r_rbx),
@@ -104,47 +91,6 @@ static int amd64fbsd32_r_reg_offset[I386_NUM_GREGS] =
};
-/* Transfering the registers between GDB, inferiors and core files. */
-
-/* Fill GDB's register array with the general-purpose register values
- in *GREGSETP. */
-
-void
-supply_gregset (gregset_t *gregsetp)
-{
- amd64_supply_native_gregset (current_regcache, gregsetp, -1);
-}
-
-/* Fill register REGNUM (if it is a general-purpose register) in
- *GREGSETPS with the value in GDB's register array. If REGNUM is -1,
- do this for all registers. */
-
-void
-fill_gregset (gregset_t *gregsetp, int regnum)
-{
- amd64_collect_native_gregset (current_regcache, gregsetp, regnum);
-}
-
-/* Fill GDB's register array with the floating-point register values
- in *FPREGSETP. */
-
-void
-supply_fpregset (fpregset_t *fpregsetp)
-{
- amd64_supply_fxsave (current_regcache, -1, fpregsetp);
-}
-
-/* Fill register REGNUM (if it is a floating-point register) in
- *FPREGSETP with the value in GDB's register array. If REGNUM is -1,
- do this for all registers. */
-
-void
-fill_fpregset (fpregset_t *fpregsetp, int regnum)
-{
- amd64_collect_fxsave (current_regcache, regnum, fpregsetp);
-}
-
-
/* Provide a prototype to silence -Wmissing-prototypes. */
void _initialize_amd64fbsd_nat (void);
@@ -154,7 +100,7 @@ _initialize_amd64fbsd_nat (void)
int offset;
amd64_native_gregset32_reg_offset = amd64fbsd32_r_reg_offset;
- amd64_native_gregset64_reg_offset = reg_offset;
+ amd64_native_gregset64_reg_offset = amd64fbsd64_r_reg_offset;
/* To support the recognition of signal handlers, i386bsd-tdep.c
hardcodes some constants. Inclusion of this file means that we