Patches for gdb-5.3 to work on the FreeBSD sparc64 port.
Submitted by: jake
This commit is contained in:
parent
6b43c2600c
commit
ffd1e995d7
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=68211
25 changed files with 595 additions and 85 deletions
|
@ -1,10 +1,13 @@
|
|||
--- gdb/config/sparc/fbsd.mh Wed Mar 13 03:20:24 2002
|
||||
+++ gdb/config/sparc/fbsd.mh Tue Oct 15 20:54:37 2002
|
||||
@@ -21,5 +21,6 @@
|
||||
--- gdb/config/sparc/fbsd.mh.orig Wed Mar 13 03:20:24 2002
|
||||
+++ gdb/config/sparc/fbsd.mh Thu Oct 17 05:59:25 2002
|
||||
@@ -19,7 +19,7 @@
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
# Host: FreeBSD/sparc64
|
||||
NATDEPFILES= sparc-nat.o \
|
||||
corelow.o fork-child.o infptrace.o inftarg.o \
|
||||
-NATDEPFILES= sparc-nat.o \
|
||||
- corelow.o fork-child.o infptrace.o inftarg.o \
|
||||
- solib.o solib-svr4.o solib-legacy.o
|
||||
+NATDEPFILES= fork-child.o infptrace.o inftarg.o sparc64nbsd-nat.o \
|
||||
+ solib.o solib-svr4.o solib-legacy.o kvm-fbsd.o
|
||||
NAT_FILE= nm-fbsd.h
|
||||
+NAT_CLIBS= -lkvm
|
||||
|
|
10
devel/gdb53/files/patch-gdb_config_sparc_fbsd.mt
Normal file
10
devel/gdb53/files/patch-gdb_config_sparc_fbsd.mt
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- gdb/config/sparc/fbsd.mt.orig Wed Mar 13 03:20:24 2002
|
||||
+++ gdb/config/sparc/fbsd.mt Thu Oct 17 05:59:59 2002
|
||||
@@ -19,5 +19,6 @@
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
# Target: FreeBSD/sparc64
|
||||
-TDEPFILES= sparc-tdep.o solib.o solib-svr4.o solib-legacy.o
|
||||
+TDEPFILES= sparc-tdep.o sparcnbsd-tdep.o nbsd-tdep.o corelow.o solib.o \
|
||||
+ solib-svr4.o solib-legacy.o
|
||||
TM_FILE= tm-fbsd.h
|
|
@ -1,26 +1,54 @@
|
|||
--- gdb/config/sparc/nm-fbsd.h Fri Mar 1 18:35:24 2002
|
||||
+++ gdb/config/sparc/nm-fbsd.h Tue Oct 15 18:53:19 2002
|
||||
@@ -36,6 +36,7 @@
|
||||
--- gdb/config/sparc/nm-fbsd.h.orig Fri Mar 1 18:35:24 2002
|
||||
+++ gdb/config/sparc/nm-fbsd.h Thu Oct 17 06:00:39 2002
|
||||
@@ -32,36 +32,27 @@
|
||||
#define ATTACH_DETACH
|
||||
|
||||
|
||||
-/* Shared library support. */
|
||||
+#include "regcache.h"
|
||||
+
|
||||
+/* Get generic FreeBSD native definitions. */
|
||||
+
|
||||
+#include "config/nm-fbsd.h"
|
||||
+
|
||||
+/* Shared library support. */
|
||||
|
||||
#define SVR4_SHARED_LIBS
|
||||
|
||||
+#include "config/nm-fbsd.h"
|
||||
#include "solib.h" /* Support for shared libraries. */
|
||||
#include "elf/common.h" /* Additional ELF shared library info. */
|
||||
|
||||
@@ -49,12 +50,9 @@
|
||||
#define GDB_GREGSET_T struct reg
|
||||
#define GDB_FPREGSET_T struct fpreg
|
||||
-/* Make things match up with what is expected in sparc-nat.c. */
|
||||
+/* Before storing, we need to read all the registers. */
|
||||
+
|
||||
+#define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
|
||||
+
|
||||
+#define reg32 reg
|
||||
+#define reg64 reg
|
||||
|
||||
-#define PTRACE_GETREGS PT_GETREGS
|
||||
-#define PTRACE_SETREGS PT_SETREGS
|
||||
-#define PTRACE_GETFPREGS PT_GETFPREGS
|
||||
-#define PTRACE_SETFPREGS PT_SETFPREGS
|
||||
-
|
||||
-#define GDB_GREGSET_T struct reg
|
||||
-#define GDB_FPREGSET_T struct fpreg
|
||||
-
|
||||
-#define regs trapframe
|
||||
-#define r_g1 tf_global[1]
|
||||
-#define r_ps tf_tstate
|
||||
-#define r_pc tf_tpc
|
||||
-#define r_npc tf_tnpc
|
||||
-#define r_y tf_y
|
||||
+#define regs reg
|
||||
+#define r_g1 r_global[1]
|
||||
+#define r_ps r_tstate
|
||||
-
|
||||
-#define FPU_FSR_TYPE unsigned long
|
||||
-#define fp_status fpreg /* our reg.h */
|
||||
-#define fpu fpreg /* our reg.h */
|
||||
-#define fpu_regs fr_regs /* one field of fpu_fr on Solaris */
|
||||
-#define fpu_fr fr_regs /* a union w/in struct fpu on Solaris */
|
||||
-#define fpu_fsr fr_fsr
|
||||
-#define Fpu_fsr fr_fsr
|
||||
+#define fpreg32 fpreg
|
||||
+#define fpreg64 fpreg
|
||||
|
||||
#define FPU_FSR_TYPE unsigned long
|
||||
#define fp_status fpreg /* our reg.h */
|
||||
#endif /* NM_FBSD_H */
|
||||
|
|
17
devel/gdb53/files/patch-gdb_config_sparc_tm-fbsd.h
Normal file
17
devel/gdb53/files/patch-gdb_config_sparc_tm-fbsd.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
--- gdb/config/sparc/tm-fbsd.h.orig Fri Mar 1 18:35:24 2002
|
||||
+++ gdb/config/sparc/tm-fbsd.h Thu Oct 17 06:01:10 2002
|
||||
@@ -22,13 +22,7 @@
|
||||
#define TM_FBSD_H
|
||||
|
||||
#define SVR4_SHARED_LIBS
|
||||
+#include "sparc/tm-sp64.h" /* sets GDB_MULTI_ARCH */
|
||||
#include "solib.h" /* Support for shared libraries. */
|
||||
-#include "sparc/tm-sp64.h"
|
||||
-
|
||||
-/* Number of traps that happen between exec'ing the shell to run an
|
||||
- inferior, and when we finally get to the inferior code. The
|
||||
- default is right for FreeBSD. */
|
||||
-
|
||||
-#undef START_INFERIOR_TRAPS_EXPECTED
|
||||
|
||||
#endif /* TM_FBSD_H */
|
44
devel/gdb53/files/patch-gdb_sparcnbsd-tdep.c
Normal file
44
devel/gdb53/files/patch-gdb_sparcnbsd-tdep.c
Normal file
|
@ -0,0 +1,44 @@
|
|||
--- gdb/sparcnbsd-tdep.c.orig Sat Aug 31 20:28:37 2002
|
||||
+++ gdb/sparcnbsd-tdep.c Thu Oct 17 06:30:25 2002
|
||||
@@ -37,6 +37,8 @@
|
||||
#define REG32_OFFSET_Y (3 * 4)
|
||||
#define REG32_OFFSET_GLOBAL (4 * 4)
|
||||
#define REG32_OFFSET_OUT (12 * 4)
|
||||
+#define REG32_SIZE (20 * 4)
|
||||
+#define FPREG32_SIZE (33 * 4)
|
||||
|
||||
#define REG64_OFFSET_TSTATE (0 * 8)
|
||||
#define REG64_OFFSET_PC (1 * 8)
|
||||
@@ -44,6 +46,11 @@
|
||||
#define REG64_OFFSET_Y (3 * 8)
|
||||
#define REG64_OFFSET_GLOBAL (4 * 8)
|
||||
#define REG64_OFFSET_OUT (12 * 8)
|
||||
+#define REG64_SIZE (36 * 8)
|
||||
+#define FPREG64_SIZE ((64 * 4) \
|
||||
+ + 8 /* fsr */ \
|
||||
+ + 4 /* gsr */ \
|
||||
+ + 4) /* pad */
|
||||
|
||||
void
|
||||
sparcnbsd_supply_reg32 (char *regs, int regno)
|
||||
@@ -375,16 +382,13 @@
|
||||
|
||||
if (gdbarch_ptr_bit (current_gdbarch) == 32)
|
||||
{
|
||||
- reg_size = (20 * 4);
|
||||
- fpreg_size = (33 * 4);
|
||||
+ reg_size = REG32_SIZE;
|
||||
+ fpreg_size = FPREG32_SIZE;
|
||||
}
|
||||
else
|
||||
{
|
||||
- reg_size = (20 * 8);
|
||||
- fpreg_size = (64 * 4)
|
||||
- + 8 /* fsr */
|
||||
- + 4 /* gsr */
|
||||
- + 4; /* pad */
|
||||
+ reg_size = REG64_SIZE;
|
||||
+ fpreg_size = FPREG64_SIZE;
|
||||
}
|
||||
|
||||
switch (which)
|
|
@ -1,10 +1,13 @@
|
|||
--- gdb/config/sparc/fbsd.mh Wed Mar 13 03:20:24 2002
|
||||
+++ gdb/config/sparc/fbsd.mh Tue Oct 15 20:54:37 2002
|
||||
@@ -21,5 +21,6 @@
|
||||
--- gdb/config/sparc/fbsd.mh.orig Wed Mar 13 03:20:24 2002
|
||||
+++ gdb/config/sparc/fbsd.mh Thu Oct 17 05:59:25 2002
|
||||
@@ -19,7 +19,7 @@
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
# Host: FreeBSD/sparc64
|
||||
NATDEPFILES= sparc-nat.o \
|
||||
corelow.o fork-child.o infptrace.o inftarg.o \
|
||||
-NATDEPFILES= sparc-nat.o \
|
||||
- corelow.o fork-child.o infptrace.o inftarg.o \
|
||||
- solib.o solib-svr4.o solib-legacy.o
|
||||
+NATDEPFILES= fork-child.o infptrace.o inftarg.o sparc64nbsd-nat.o \
|
||||
+ solib.o solib-svr4.o solib-legacy.o kvm-fbsd.o
|
||||
NAT_FILE= nm-fbsd.h
|
||||
+NAT_CLIBS= -lkvm
|
||||
|
|
10
devel/gdb6/files/patch-config_sparc_fbsd.mt
Normal file
10
devel/gdb6/files/patch-config_sparc_fbsd.mt
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- gdb/config/sparc/fbsd.mt.orig Wed Mar 13 03:20:24 2002
|
||||
+++ gdb/config/sparc/fbsd.mt Thu Oct 17 05:59:59 2002
|
||||
@@ -19,5 +19,6 @@
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
# Target: FreeBSD/sparc64
|
||||
-TDEPFILES= sparc-tdep.o solib.o solib-svr4.o solib-legacy.o
|
||||
+TDEPFILES= sparc-tdep.o sparcnbsd-tdep.o nbsd-tdep.o corelow.o solib.o \
|
||||
+ solib-svr4.o solib-legacy.o
|
||||
TM_FILE= tm-fbsd.h
|
|
@ -1,26 +1,54 @@
|
|||
--- gdb/config/sparc/nm-fbsd.h Fri Mar 1 18:35:24 2002
|
||||
+++ gdb/config/sparc/nm-fbsd.h Tue Oct 15 18:53:19 2002
|
||||
@@ -36,6 +36,7 @@
|
||||
--- gdb/config/sparc/nm-fbsd.h.orig Fri Mar 1 18:35:24 2002
|
||||
+++ gdb/config/sparc/nm-fbsd.h Thu Oct 17 06:00:39 2002
|
||||
@@ -32,36 +32,27 @@
|
||||
#define ATTACH_DETACH
|
||||
|
||||
|
||||
-/* Shared library support. */
|
||||
+#include "regcache.h"
|
||||
+
|
||||
+/* Get generic FreeBSD native definitions. */
|
||||
+
|
||||
+#include "config/nm-fbsd.h"
|
||||
+
|
||||
+/* Shared library support. */
|
||||
|
||||
#define SVR4_SHARED_LIBS
|
||||
|
||||
+#include "config/nm-fbsd.h"
|
||||
#include "solib.h" /* Support for shared libraries. */
|
||||
#include "elf/common.h" /* Additional ELF shared library info. */
|
||||
|
||||
@@ -49,12 +50,9 @@
|
||||
#define GDB_GREGSET_T struct reg
|
||||
#define GDB_FPREGSET_T struct fpreg
|
||||
-/* Make things match up with what is expected in sparc-nat.c. */
|
||||
+/* Before storing, we need to read all the registers. */
|
||||
+
|
||||
+#define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
|
||||
+
|
||||
+#define reg32 reg
|
||||
+#define reg64 reg
|
||||
|
||||
-#define PTRACE_GETREGS PT_GETREGS
|
||||
-#define PTRACE_SETREGS PT_SETREGS
|
||||
-#define PTRACE_GETFPREGS PT_GETFPREGS
|
||||
-#define PTRACE_SETFPREGS PT_SETFPREGS
|
||||
-
|
||||
-#define GDB_GREGSET_T struct reg
|
||||
-#define GDB_FPREGSET_T struct fpreg
|
||||
-
|
||||
-#define regs trapframe
|
||||
-#define r_g1 tf_global[1]
|
||||
-#define r_ps tf_tstate
|
||||
-#define r_pc tf_tpc
|
||||
-#define r_npc tf_tnpc
|
||||
-#define r_y tf_y
|
||||
+#define regs reg
|
||||
+#define r_g1 r_global[1]
|
||||
+#define r_ps r_tstate
|
||||
-
|
||||
-#define FPU_FSR_TYPE unsigned long
|
||||
-#define fp_status fpreg /* our reg.h */
|
||||
-#define fpu fpreg /* our reg.h */
|
||||
-#define fpu_regs fr_regs /* one field of fpu_fr on Solaris */
|
||||
-#define fpu_fr fr_regs /* a union w/in struct fpu on Solaris */
|
||||
-#define fpu_fsr fr_fsr
|
||||
-#define Fpu_fsr fr_fsr
|
||||
+#define fpreg32 fpreg
|
||||
+#define fpreg64 fpreg
|
||||
|
||||
#define FPU_FSR_TYPE unsigned long
|
||||
#define fp_status fpreg /* our reg.h */
|
||||
#endif /* NM_FBSD_H */
|
||||
|
|
17
devel/gdb6/files/patch-config_sparc_tm-fbsd.h
Normal file
17
devel/gdb6/files/patch-config_sparc_tm-fbsd.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
--- gdb/config/sparc/tm-fbsd.h.orig Fri Mar 1 18:35:24 2002
|
||||
+++ gdb/config/sparc/tm-fbsd.h Thu Oct 17 06:01:10 2002
|
||||
@@ -22,13 +22,7 @@
|
||||
#define TM_FBSD_H
|
||||
|
||||
#define SVR4_SHARED_LIBS
|
||||
+#include "sparc/tm-sp64.h" /* sets GDB_MULTI_ARCH */
|
||||
#include "solib.h" /* Support for shared libraries. */
|
||||
-#include "sparc/tm-sp64.h"
|
||||
-
|
||||
-/* Number of traps that happen between exec'ing the shell to run an
|
||||
- inferior, and when we finally get to the inferior code. The
|
||||
- default is right for FreeBSD. */
|
||||
-
|
||||
-#undef START_INFERIOR_TRAPS_EXPECTED
|
||||
|
||||
#endif /* TM_FBSD_H */
|
|
@ -1,10 +1,13 @@
|
|||
--- gdb/config/sparc/fbsd.mh Wed Mar 13 03:20:24 2002
|
||||
+++ gdb/config/sparc/fbsd.mh Tue Oct 15 20:54:37 2002
|
||||
@@ -21,5 +21,6 @@
|
||||
--- gdb/config/sparc/fbsd.mh.orig Wed Mar 13 03:20:24 2002
|
||||
+++ gdb/config/sparc/fbsd.mh Thu Oct 17 05:59:25 2002
|
||||
@@ -19,7 +19,7 @@
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
# Host: FreeBSD/sparc64
|
||||
NATDEPFILES= sparc-nat.o \
|
||||
corelow.o fork-child.o infptrace.o inftarg.o \
|
||||
-NATDEPFILES= sparc-nat.o \
|
||||
- corelow.o fork-child.o infptrace.o inftarg.o \
|
||||
- solib.o solib-svr4.o solib-legacy.o
|
||||
+NATDEPFILES= fork-child.o infptrace.o inftarg.o sparc64nbsd-nat.o \
|
||||
+ solib.o solib-svr4.o solib-legacy.o kvm-fbsd.o
|
||||
NAT_FILE= nm-fbsd.h
|
||||
+NAT_CLIBS= -lkvm
|
||||
|
|
10
devel/gdb6/files/patch-gdb_config_sparc_fbsd.mt
Normal file
10
devel/gdb6/files/patch-gdb_config_sparc_fbsd.mt
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- gdb/config/sparc/fbsd.mt.orig Wed Mar 13 03:20:24 2002
|
||||
+++ gdb/config/sparc/fbsd.mt Thu Oct 17 05:59:59 2002
|
||||
@@ -19,5 +19,6 @@
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
# Target: FreeBSD/sparc64
|
||||
-TDEPFILES= sparc-tdep.o solib.o solib-svr4.o solib-legacy.o
|
||||
+TDEPFILES= sparc-tdep.o sparcnbsd-tdep.o nbsd-tdep.o corelow.o solib.o \
|
||||
+ solib-svr4.o solib-legacy.o
|
||||
TM_FILE= tm-fbsd.h
|
|
@ -1,26 +1,54 @@
|
|||
--- gdb/config/sparc/nm-fbsd.h Fri Mar 1 18:35:24 2002
|
||||
+++ gdb/config/sparc/nm-fbsd.h Tue Oct 15 18:53:19 2002
|
||||
@@ -36,6 +36,7 @@
|
||||
--- gdb/config/sparc/nm-fbsd.h.orig Fri Mar 1 18:35:24 2002
|
||||
+++ gdb/config/sparc/nm-fbsd.h Thu Oct 17 06:00:39 2002
|
||||
@@ -32,36 +32,27 @@
|
||||
#define ATTACH_DETACH
|
||||
|
||||
|
||||
-/* Shared library support. */
|
||||
+#include "regcache.h"
|
||||
+
|
||||
+/* Get generic FreeBSD native definitions. */
|
||||
+
|
||||
+#include "config/nm-fbsd.h"
|
||||
+
|
||||
+/* Shared library support. */
|
||||
|
||||
#define SVR4_SHARED_LIBS
|
||||
|
||||
+#include "config/nm-fbsd.h"
|
||||
#include "solib.h" /* Support for shared libraries. */
|
||||
#include "elf/common.h" /* Additional ELF shared library info. */
|
||||
|
||||
@@ -49,12 +50,9 @@
|
||||
#define GDB_GREGSET_T struct reg
|
||||
#define GDB_FPREGSET_T struct fpreg
|
||||
-/* Make things match up with what is expected in sparc-nat.c. */
|
||||
+/* Before storing, we need to read all the registers. */
|
||||
+
|
||||
+#define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
|
||||
+
|
||||
+#define reg32 reg
|
||||
+#define reg64 reg
|
||||
|
||||
-#define PTRACE_GETREGS PT_GETREGS
|
||||
-#define PTRACE_SETREGS PT_SETREGS
|
||||
-#define PTRACE_GETFPREGS PT_GETFPREGS
|
||||
-#define PTRACE_SETFPREGS PT_SETFPREGS
|
||||
-
|
||||
-#define GDB_GREGSET_T struct reg
|
||||
-#define GDB_FPREGSET_T struct fpreg
|
||||
-
|
||||
-#define regs trapframe
|
||||
-#define r_g1 tf_global[1]
|
||||
-#define r_ps tf_tstate
|
||||
-#define r_pc tf_tpc
|
||||
-#define r_npc tf_tnpc
|
||||
-#define r_y tf_y
|
||||
+#define regs reg
|
||||
+#define r_g1 r_global[1]
|
||||
+#define r_ps r_tstate
|
||||
-
|
||||
-#define FPU_FSR_TYPE unsigned long
|
||||
-#define fp_status fpreg /* our reg.h */
|
||||
-#define fpu fpreg /* our reg.h */
|
||||
-#define fpu_regs fr_regs /* one field of fpu_fr on Solaris */
|
||||
-#define fpu_fr fr_regs /* a union w/in struct fpu on Solaris */
|
||||
-#define fpu_fsr fr_fsr
|
||||
-#define Fpu_fsr fr_fsr
|
||||
+#define fpreg32 fpreg
|
||||
+#define fpreg64 fpreg
|
||||
|
||||
#define FPU_FSR_TYPE unsigned long
|
||||
#define fp_status fpreg /* our reg.h */
|
||||
#endif /* NM_FBSD_H */
|
||||
|
|
17
devel/gdb6/files/patch-gdb_config_sparc_tm-fbsd.h
Normal file
17
devel/gdb6/files/patch-gdb_config_sparc_tm-fbsd.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
--- gdb/config/sparc/tm-fbsd.h.orig Fri Mar 1 18:35:24 2002
|
||||
+++ gdb/config/sparc/tm-fbsd.h Thu Oct 17 06:01:10 2002
|
||||
@@ -22,13 +22,7 @@
|
||||
#define TM_FBSD_H
|
||||
|
||||
#define SVR4_SHARED_LIBS
|
||||
+#include "sparc/tm-sp64.h" /* sets GDB_MULTI_ARCH */
|
||||
#include "solib.h" /* Support for shared libraries. */
|
||||
-#include "sparc/tm-sp64.h"
|
||||
-
|
||||
-/* Number of traps that happen between exec'ing the shell to run an
|
||||
- inferior, and when we finally get to the inferior code. The
|
||||
- default is right for FreeBSD. */
|
||||
-
|
||||
-#undef START_INFERIOR_TRAPS_EXPECTED
|
||||
|
||||
#endif /* TM_FBSD_H */
|
44
devel/gdb6/files/patch-gdb_sparcnbsd-tdep.c
Normal file
44
devel/gdb6/files/patch-gdb_sparcnbsd-tdep.c
Normal file
|
@ -0,0 +1,44 @@
|
|||
--- gdb/sparcnbsd-tdep.c.orig Sat Aug 31 20:28:37 2002
|
||||
+++ gdb/sparcnbsd-tdep.c Thu Oct 17 06:30:25 2002
|
||||
@@ -37,6 +37,8 @@
|
||||
#define REG32_OFFSET_Y (3 * 4)
|
||||
#define REG32_OFFSET_GLOBAL (4 * 4)
|
||||
#define REG32_OFFSET_OUT (12 * 4)
|
||||
+#define REG32_SIZE (20 * 4)
|
||||
+#define FPREG32_SIZE (33 * 4)
|
||||
|
||||
#define REG64_OFFSET_TSTATE (0 * 8)
|
||||
#define REG64_OFFSET_PC (1 * 8)
|
||||
@@ -44,6 +46,11 @@
|
||||
#define REG64_OFFSET_Y (3 * 8)
|
||||
#define REG64_OFFSET_GLOBAL (4 * 8)
|
||||
#define REG64_OFFSET_OUT (12 * 8)
|
||||
+#define REG64_SIZE (36 * 8)
|
||||
+#define FPREG64_SIZE ((64 * 4) \
|
||||
+ + 8 /* fsr */ \
|
||||
+ + 4 /* gsr */ \
|
||||
+ + 4) /* pad */
|
||||
|
||||
void
|
||||
sparcnbsd_supply_reg32 (char *regs, int regno)
|
||||
@@ -375,16 +382,13 @@
|
||||
|
||||
if (gdbarch_ptr_bit (current_gdbarch) == 32)
|
||||
{
|
||||
- reg_size = (20 * 4);
|
||||
- fpreg_size = (33 * 4);
|
||||
+ reg_size = REG32_SIZE;
|
||||
+ fpreg_size = FPREG32_SIZE;
|
||||
}
|
||||
else
|
||||
{
|
||||
- reg_size = (20 * 8);
|
||||
- fpreg_size = (64 * 4)
|
||||
- + 8 /* fsr */
|
||||
- + 4 /* gsr */
|
||||
- + 4; /* pad */
|
||||
+ reg_size = REG64_SIZE;
|
||||
+ fpreg_size = FPREG64_SIZE;
|
||||
}
|
||||
|
||||
switch (which)
|
44
devel/gdb6/files/patch-sparcnbsd-tdep.c
Normal file
44
devel/gdb6/files/patch-sparcnbsd-tdep.c
Normal file
|
@ -0,0 +1,44 @@
|
|||
--- gdb/sparcnbsd-tdep.c.orig Sat Aug 31 20:28:37 2002
|
||||
+++ gdb/sparcnbsd-tdep.c Thu Oct 17 06:30:25 2002
|
||||
@@ -37,6 +37,8 @@
|
||||
#define REG32_OFFSET_Y (3 * 4)
|
||||
#define REG32_OFFSET_GLOBAL (4 * 4)
|
||||
#define REG32_OFFSET_OUT (12 * 4)
|
||||
+#define REG32_SIZE (20 * 4)
|
||||
+#define FPREG32_SIZE (33 * 4)
|
||||
|
||||
#define REG64_OFFSET_TSTATE (0 * 8)
|
||||
#define REG64_OFFSET_PC (1 * 8)
|
||||
@@ -44,6 +46,11 @@
|
||||
#define REG64_OFFSET_Y (3 * 8)
|
||||
#define REG64_OFFSET_GLOBAL (4 * 8)
|
||||
#define REG64_OFFSET_OUT (12 * 8)
|
||||
+#define REG64_SIZE (36 * 8)
|
||||
+#define FPREG64_SIZE ((64 * 4) \
|
||||
+ + 8 /* fsr */ \
|
||||
+ + 4 /* gsr */ \
|
||||
+ + 4) /* pad */
|
||||
|
||||
void
|
||||
sparcnbsd_supply_reg32 (char *regs, int regno)
|
||||
@@ -375,16 +382,13 @@
|
||||
|
||||
if (gdbarch_ptr_bit (current_gdbarch) == 32)
|
||||
{
|
||||
- reg_size = (20 * 4);
|
||||
- fpreg_size = (33 * 4);
|
||||
+ reg_size = REG32_SIZE;
|
||||
+ fpreg_size = FPREG32_SIZE;
|
||||
}
|
||||
else
|
||||
{
|
||||
- reg_size = (20 * 8);
|
||||
- fpreg_size = (64 * 4)
|
||||
- + 8 /* fsr */
|
||||
- + 4 /* gsr */
|
||||
- + 4; /* pad */
|
||||
+ reg_size = REG64_SIZE;
|
||||
+ fpreg_size = FPREG64_SIZE;
|
||||
}
|
||||
|
||||
switch (which)
|
|
@ -1,10 +1,13 @@
|
|||
--- gdb/config/sparc/fbsd.mh Wed Mar 13 03:20:24 2002
|
||||
+++ gdb/config/sparc/fbsd.mh Tue Oct 15 20:54:37 2002
|
||||
@@ -21,5 +21,6 @@
|
||||
--- gdb/config/sparc/fbsd.mh.orig Wed Mar 13 03:20:24 2002
|
||||
+++ gdb/config/sparc/fbsd.mh Thu Oct 17 05:59:25 2002
|
||||
@@ -19,7 +19,7 @@
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
# Host: FreeBSD/sparc64
|
||||
NATDEPFILES= sparc-nat.o \
|
||||
corelow.o fork-child.o infptrace.o inftarg.o \
|
||||
-NATDEPFILES= sparc-nat.o \
|
||||
- corelow.o fork-child.o infptrace.o inftarg.o \
|
||||
- solib.o solib-svr4.o solib-legacy.o
|
||||
+NATDEPFILES= fork-child.o infptrace.o inftarg.o sparc64nbsd-nat.o \
|
||||
+ solib.o solib-svr4.o solib-legacy.o kvm-fbsd.o
|
||||
NAT_FILE= nm-fbsd.h
|
||||
+NAT_CLIBS= -lkvm
|
||||
|
|
10
devel/gdb66/files/patch-config_sparc_fbsd.mt
Normal file
10
devel/gdb66/files/patch-config_sparc_fbsd.mt
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- gdb/config/sparc/fbsd.mt.orig Wed Mar 13 03:20:24 2002
|
||||
+++ gdb/config/sparc/fbsd.mt Thu Oct 17 05:59:59 2002
|
||||
@@ -19,5 +19,6 @@
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
# Target: FreeBSD/sparc64
|
||||
-TDEPFILES= sparc-tdep.o solib.o solib-svr4.o solib-legacy.o
|
||||
+TDEPFILES= sparc-tdep.o sparcnbsd-tdep.o nbsd-tdep.o corelow.o solib.o \
|
||||
+ solib-svr4.o solib-legacy.o
|
||||
TM_FILE= tm-fbsd.h
|
|
@ -1,26 +1,54 @@
|
|||
--- gdb/config/sparc/nm-fbsd.h Fri Mar 1 18:35:24 2002
|
||||
+++ gdb/config/sparc/nm-fbsd.h Tue Oct 15 18:53:19 2002
|
||||
@@ -36,6 +36,7 @@
|
||||
--- gdb/config/sparc/nm-fbsd.h.orig Fri Mar 1 18:35:24 2002
|
||||
+++ gdb/config/sparc/nm-fbsd.h Thu Oct 17 06:00:39 2002
|
||||
@@ -32,36 +32,27 @@
|
||||
#define ATTACH_DETACH
|
||||
|
||||
|
||||
-/* Shared library support. */
|
||||
+#include "regcache.h"
|
||||
+
|
||||
+/* Get generic FreeBSD native definitions. */
|
||||
+
|
||||
+#include "config/nm-fbsd.h"
|
||||
+
|
||||
+/* Shared library support. */
|
||||
|
||||
#define SVR4_SHARED_LIBS
|
||||
|
||||
+#include "config/nm-fbsd.h"
|
||||
#include "solib.h" /* Support for shared libraries. */
|
||||
#include "elf/common.h" /* Additional ELF shared library info. */
|
||||
|
||||
@@ -49,12 +50,9 @@
|
||||
#define GDB_GREGSET_T struct reg
|
||||
#define GDB_FPREGSET_T struct fpreg
|
||||
-/* Make things match up with what is expected in sparc-nat.c. */
|
||||
+/* Before storing, we need to read all the registers. */
|
||||
+
|
||||
+#define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
|
||||
+
|
||||
+#define reg32 reg
|
||||
+#define reg64 reg
|
||||
|
||||
-#define PTRACE_GETREGS PT_GETREGS
|
||||
-#define PTRACE_SETREGS PT_SETREGS
|
||||
-#define PTRACE_GETFPREGS PT_GETFPREGS
|
||||
-#define PTRACE_SETFPREGS PT_SETFPREGS
|
||||
-
|
||||
-#define GDB_GREGSET_T struct reg
|
||||
-#define GDB_FPREGSET_T struct fpreg
|
||||
-
|
||||
-#define regs trapframe
|
||||
-#define r_g1 tf_global[1]
|
||||
-#define r_ps tf_tstate
|
||||
-#define r_pc tf_tpc
|
||||
-#define r_npc tf_tnpc
|
||||
-#define r_y tf_y
|
||||
+#define regs reg
|
||||
+#define r_g1 r_global[1]
|
||||
+#define r_ps r_tstate
|
||||
-
|
||||
-#define FPU_FSR_TYPE unsigned long
|
||||
-#define fp_status fpreg /* our reg.h */
|
||||
-#define fpu fpreg /* our reg.h */
|
||||
-#define fpu_regs fr_regs /* one field of fpu_fr on Solaris */
|
||||
-#define fpu_fr fr_regs /* a union w/in struct fpu on Solaris */
|
||||
-#define fpu_fsr fr_fsr
|
||||
-#define Fpu_fsr fr_fsr
|
||||
+#define fpreg32 fpreg
|
||||
+#define fpreg64 fpreg
|
||||
|
||||
#define FPU_FSR_TYPE unsigned long
|
||||
#define fp_status fpreg /* our reg.h */
|
||||
#endif /* NM_FBSD_H */
|
||||
|
|
17
devel/gdb66/files/patch-config_sparc_tm-fbsd.h
Normal file
17
devel/gdb66/files/patch-config_sparc_tm-fbsd.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
--- gdb/config/sparc/tm-fbsd.h.orig Fri Mar 1 18:35:24 2002
|
||||
+++ gdb/config/sparc/tm-fbsd.h Thu Oct 17 06:01:10 2002
|
||||
@@ -22,13 +22,7 @@
|
||||
#define TM_FBSD_H
|
||||
|
||||
#define SVR4_SHARED_LIBS
|
||||
+#include "sparc/tm-sp64.h" /* sets GDB_MULTI_ARCH */
|
||||
#include "solib.h" /* Support for shared libraries. */
|
||||
-#include "sparc/tm-sp64.h"
|
||||
-
|
||||
-/* Number of traps that happen between exec'ing the shell to run an
|
||||
- inferior, and when we finally get to the inferior code. The
|
||||
- default is right for FreeBSD. */
|
||||
-
|
||||
-#undef START_INFERIOR_TRAPS_EXPECTED
|
||||
|
||||
#endif /* TM_FBSD_H */
|
|
@ -1,10 +1,13 @@
|
|||
--- gdb/config/sparc/fbsd.mh Wed Mar 13 03:20:24 2002
|
||||
+++ gdb/config/sparc/fbsd.mh Tue Oct 15 20:54:37 2002
|
||||
@@ -21,5 +21,6 @@
|
||||
--- gdb/config/sparc/fbsd.mh.orig Wed Mar 13 03:20:24 2002
|
||||
+++ gdb/config/sparc/fbsd.mh Thu Oct 17 05:59:25 2002
|
||||
@@ -19,7 +19,7 @@
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
# Host: FreeBSD/sparc64
|
||||
NATDEPFILES= sparc-nat.o \
|
||||
corelow.o fork-child.o infptrace.o inftarg.o \
|
||||
-NATDEPFILES= sparc-nat.o \
|
||||
- corelow.o fork-child.o infptrace.o inftarg.o \
|
||||
- solib.o solib-svr4.o solib-legacy.o
|
||||
+NATDEPFILES= fork-child.o infptrace.o inftarg.o sparc64nbsd-nat.o \
|
||||
+ solib.o solib-svr4.o solib-legacy.o kvm-fbsd.o
|
||||
NAT_FILE= nm-fbsd.h
|
||||
+NAT_CLIBS= -lkvm
|
||||
|
|
10
devel/gdb66/files/patch-gdb_config_sparc_fbsd.mt
Normal file
10
devel/gdb66/files/patch-gdb_config_sparc_fbsd.mt
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- gdb/config/sparc/fbsd.mt.orig Wed Mar 13 03:20:24 2002
|
||||
+++ gdb/config/sparc/fbsd.mt Thu Oct 17 05:59:59 2002
|
||||
@@ -19,5 +19,6 @@
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
|
||||
# Target: FreeBSD/sparc64
|
||||
-TDEPFILES= sparc-tdep.o solib.o solib-svr4.o solib-legacy.o
|
||||
+TDEPFILES= sparc-tdep.o sparcnbsd-tdep.o nbsd-tdep.o corelow.o solib.o \
|
||||
+ solib-svr4.o solib-legacy.o
|
||||
TM_FILE= tm-fbsd.h
|
|
@ -1,26 +1,54 @@
|
|||
--- gdb/config/sparc/nm-fbsd.h Fri Mar 1 18:35:24 2002
|
||||
+++ gdb/config/sparc/nm-fbsd.h Tue Oct 15 18:53:19 2002
|
||||
@@ -36,6 +36,7 @@
|
||||
--- gdb/config/sparc/nm-fbsd.h.orig Fri Mar 1 18:35:24 2002
|
||||
+++ gdb/config/sparc/nm-fbsd.h Thu Oct 17 06:00:39 2002
|
||||
@@ -32,36 +32,27 @@
|
||||
#define ATTACH_DETACH
|
||||
|
||||
|
||||
-/* Shared library support. */
|
||||
+#include "regcache.h"
|
||||
+
|
||||
+/* Get generic FreeBSD native definitions. */
|
||||
+
|
||||
+#include "config/nm-fbsd.h"
|
||||
+
|
||||
+/* Shared library support. */
|
||||
|
||||
#define SVR4_SHARED_LIBS
|
||||
|
||||
+#include "config/nm-fbsd.h"
|
||||
#include "solib.h" /* Support for shared libraries. */
|
||||
#include "elf/common.h" /* Additional ELF shared library info. */
|
||||
|
||||
@@ -49,12 +50,9 @@
|
||||
#define GDB_GREGSET_T struct reg
|
||||
#define GDB_FPREGSET_T struct fpreg
|
||||
-/* Make things match up with what is expected in sparc-nat.c. */
|
||||
+/* Before storing, we need to read all the registers. */
|
||||
+
|
||||
+#define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
|
||||
+
|
||||
+#define reg32 reg
|
||||
+#define reg64 reg
|
||||
|
||||
-#define PTRACE_GETREGS PT_GETREGS
|
||||
-#define PTRACE_SETREGS PT_SETREGS
|
||||
-#define PTRACE_GETFPREGS PT_GETFPREGS
|
||||
-#define PTRACE_SETFPREGS PT_SETFPREGS
|
||||
-
|
||||
-#define GDB_GREGSET_T struct reg
|
||||
-#define GDB_FPREGSET_T struct fpreg
|
||||
-
|
||||
-#define regs trapframe
|
||||
-#define r_g1 tf_global[1]
|
||||
-#define r_ps tf_tstate
|
||||
-#define r_pc tf_tpc
|
||||
-#define r_npc tf_tnpc
|
||||
-#define r_y tf_y
|
||||
+#define regs reg
|
||||
+#define r_g1 r_global[1]
|
||||
+#define r_ps r_tstate
|
||||
-
|
||||
-#define FPU_FSR_TYPE unsigned long
|
||||
-#define fp_status fpreg /* our reg.h */
|
||||
-#define fpu fpreg /* our reg.h */
|
||||
-#define fpu_regs fr_regs /* one field of fpu_fr on Solaris */
|
||||
-#define fpu_fr fr_regs /* a union w/in struct fpu on Solaris */
|
||||
-#define fpu_fsr fr_fsr
|
||||
-#define Fpu_fsr fr_fsr
|
||||
+#define fpreg32 fpreg
|
||||
+#define fpreg64 fpreg
|
||||
|
||||
#define FPU_FSR_TYPE unsigned long
|
||||
#define fp_status fpreg /* our reg.h */
|
||||
#endif /* NM_FBSD_H */
|
||||
|
|
17
devel/gdb66/files/patch-gdb_config_sparc_tm-fbsd.h
Normal file
17
devel/gdb66/files/patch-gdb_config_sparc_tm-fbsd.h
Normal file
|
@ -0,0 +1,17 @@
|
|||
--- gdb/config/sparc/tm-fbsd.h.orig Fri Mar 1 18:35:24 2002
|
||||
+++ gdb/config/sparc/tm-fbsd.h Thu Oct 17 06:01:10 2002
|
||||
@@ -22,13 +22,7 @@
|
||||
#define TM_FBSD_H
|
||||
|
||||
#define SVR4_SHARED_LIBS
|
||||
+#include "sparc/tm-sp64.h" /* sets GDB_MULTI_ARCH */
|
||||
#include "solib.h" /* Support for shared libraries. */
|
||||
-#include "sparc/tm-sp64.h"
|
||||
-
|
||||
-/* Number of traps that happen between exec'ing the shell to run an
|
||||
- inferior, and when we finally get to the inferior code. The
|
||||
- default is right for FreeBSD. */
|
||||
-
|
||||
-#undef START_INFERIOR_TRAPS_EXPECTED
|
||||
|
||||
#endif /* TM_FBSD_H */
|
44
devel/gdb66/files/patch-gdb_sparcnbsd-tdep.c
Normal file
44
devel/gdb66/files/patch-gdb_sparcnbsd-tdep.c
Normal file
|
@ -0,0 +1,44 @@
|
|||
--- gdb/sparcnbsd-tdep.c.orig Sat Aug 31 20:28:37 2002
|
||||
+++ gdb/sparcnbsd-tdep.c Thu Oct 17 06:30:25 2002
|
||||
@@ -37,6 +37,8 @@
|
||||
#define REG32_OFFSET_Y (3 * 4)
|
||||
#define REG32_OFFSET_GLOBAL (4 * 4)
|
||||
#define REG32_OFFSET_OUT (12 * 4)
|
||||
+#define REG32_SIZE (20 * 4)
|
||||
+#define FPREG32_SIZE (33 * 4)
|
||||
|
||||
#define REG64_OFFSET_TSTATE (0 * 8)
|
||||
#define REG64_OFFSET_PC (1 * 8)
|
||||
@@ -44,6 +46,11 @@
|
||||
#define REG64_OFFSET_Y (3 * 8)
|
||||
#define REG64_OFFSET_GLOBAL (4 * 8)
|
||||
#define REG64_OFFSET_OUT (12 * 8)
|
||||
+#define REG64_SIZE (36 * 8)
|
||||
+#define FPREG64_SIZE ((64 * 4) \
|
||||
+ + 8 /* fsr */ \
|
||||
+ + 4 /* gsr */ \
|
||||
+ + 4) /* pad */
|
||||
|
||||
void
|
||||
sparcnbsd_supply_reg32 (char *regs, int regno)
|
||||
@@ -375,16 +382,13 @@
|
||||
|
||||
if (gdbarch_ptr_bit (current_gdbarch) == 32)
|
||||
{
|
||||
- reg_size = (20 * 4);
|
||||
- fpreg_size = (33 * 4);
|
||||
+ reg_size = REG32_SIZE;
|
||||
+ fpreg_size = FPREG32_SIZE;
|
||||
}
|
||||
else
|
||||
{
|
||||
- reg_size = (20 * 8);
|
||||
- fpreg_size = (64 * 4)
|
||||
- + 8 /* fsr */
|
||||
- + 4 /* gsr */
|
||||
- + 4; /* pad */
|
||||
+ reg_size = REG64_SIZE;
|
||||
+ fpreg_size = FPREG64_SIZE;
|
||||
}
|
||||
|
||||
switch (which)
|
44
devel/gdb66/files/patch-sparcnbsd-tdep.c
Normal file
44
devel/gdb66/files/patch-sparcnbsd-tdep.c
Normal file
|
@ -0,0 +1,44 @@
|
|||
--- gdb/sparcnbsd-tdep.c.orig Sat Aug 31 20:28:37 2002
|
||||
+++ gdb/sparcnbsd-tdep.c Thu Oct 17 06:30:25 2002
|
||||
@@ -37,6 +37,8 @@
|
||||
#define REG32_OFFSET_Y (3 * 4)
|
||||
#define REG32_OFFSET_GLOBAL (4 * 4)
|
||||
#define REG32_OFFSET_OUT (12 * 4)
|
||||
+#define REG32_SIZE (20 * 4)
|
||||
+#define FPREG32_SIZE (33 * 4)
|
||||
|
||||
#define REG64_OFFSET_TSTATE (0 * 8)
|
||||
#define REG64_OFFSET_PC (1 * 8)
|
||||
@@ -44,6 +46,11 @@
|
||||
#define REG64_OFFSET_Y (3 * 8)
|
||||
#define REG64_OFFSET_GLOBAL (4 * 8)
|
||||
#define REG64_OFFSET_OUT (12 * 8)
|
||||
+#define REG64_SIZE (36 * 8)
|
||||
+#define FPREG64_SIZE ((64 * 4) \
|
||||
+ + 8 /* fsr */ \
|
||||
+ + 4 /* gsr */ \
|
||||
+ + 4) /* pad */
|
||||
|
||||
void
|
||||
sparcnbsd_supply_reg32 (char *regs, int regno)
|
||||
@@ -375,16 +382,13 @@
|
||||
|
||||
if (gdbarch_ptr_bit (current_gdbarch) == 32)
|
||||
{
|
||||
- reg_size = (20 * 4);
|
||||
- fpreg_size = (33 * 4);
|
||||
+ reg_size = REG32_SIZE;
|
||||
+ fpreg_size = FPREG32_SIZE;
|
||||
}
|
||||
else
|
||||
{
|
||||
- reg_size = (20 * 8);
|
||||
- fpreg_size = (64 * 4)
|
||||
- + 8 /* fsr */
|
||||
- + 4 /* gsr */
|
||||
- + 4; /* pad */
|
||||
+ reg_size = REG64_SIZE;
|
||||
+ fpreg_size = FPREG64_SIZE;
|
||||
}
|
||||
|
||||
switch (which)
|
Loading…
Reference in a new issue