diff options
author | mp <mp@FreeBSD.org> | 2002-10-17 22:53:49 +0800 |
---|---|---|
committer | mp <mp@FreeBSD.org> | 2002-10-17 22:53:49 +0800 |
commit | ee1a0bf4b868b36661f211d3d245329d3794924d (patch) | |
tree | c7fea8595c82d342915100cf5623fb3270f377f6 /devel/gdb66 | |
parent | 3a93877851fbb7ced1b9003a8d8600f705951c2b (diff) | |
download | freebsd-ports-gnome-ee1a0bf4b868b36661f211d3d245329d3794924d.tar.gz freebsd-ports-gnome-ee1a0bf4b868b36661f211d3d245329d3794924d.tar.zst freebsd-ports-gnome-ee1a0bf4b868b36661f211d3d245329d3794924d.zip |
Patches for gdb-5.3 to work on the FreeBSD sparc64 port.
Submitted by: jake
Diffstat (limited to 'devel/gdb66')
-rw-r--r-- | devel/gdb66/files/patch-config_sparc_fbsd.mh | 13 | ||||
-rw-r--r-- | devel/gdb66/files/patch-config_sparc_fbsd.mt | 10 | ||||
-rw-r--r-- | devel/gdb66/files/patch-config_sparc_nm-fbsd.h | 52 | ||||
-rw-r--r-- | devel/gdb66/files/patch-config_sparc_tm-fbsd.h | 17 | ||||
-rw-r--r-- | devel/gdb66/files/patch-gdb_config_sparc_fbsd.mh | 13 | ||||
-rw-r--r-- | devel/gdb66/files/patch-gdb_config_sparc_fbsd.mt | 10 | ||||
-rw-r--r-- | devel/gdb66/files/patch-gdb_config_sparc_nm-fbsd.h | 52 | ||||
-rw-r--r-- | devel/gdb66/files/patch-gdb_config_sparc_tm-fbsd.h | 17 | ||||
-rw-r--r-- | devel/gdb66/files/patch-gdb_sparcnbsd-tdep.c | 44 | ||||
-rw-r--r-- | devel/gdb66/files/patch-sparcnbsd-tdep.c | 44 |
10 files changed, 238 insertions, 34 deletions
diff --git a/devel/gdb66/files/patch-config_sparc_fbsd.mh b/devel/gdb66/files/patch-config_sparc_fbsd.mh index 5631903da987..1a23ca92d26f 100644 --- a/devel/gdb66/files/patch-config_sparc_fbsd.mh +++ b/devel/gdb66/files/patch-config_sparc_fbsd.mh @@ -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 diff --git a/devel/gdb66/files/patch-config_sparc_fbsd.mt b/devel/gdb66/files/patch-config_sparc_fbsd.mt new file mode 100644 index 000000000000..3147c4ef30e2 --- /dev/null +++ b/devel/gdb66/files/patch-config_sparc_fbsd.mt @@ -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 diff --git a/devel/gdb66/files/patch-config_sparc_nm-fbsd.h b/devel/gdb66/files/patch-config_sparc_nm-fbsd.h index c7261a0ca459..372596d6f7ce 100644 --- a/devel/gdb66/files/patch-config_sparc_nm-fbsd.h +++ b/devel/gdb66/files/patch-config_sparc_nm-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 */ diff --git a/devel/gdb66/files/patch-config_sparc_tm-fbsd.h b/devel/gdb66/files/patch-config_sparc_tm-fbsd.h new file mode 100644 index 000000000000..4e15435b3505 --- /dev/null +++ b/devel/gdb66/files/patch-config_sparc_tm-fbsd.h @@ -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 */ diff --git a/devel/gdb66/files/patch-gdb_config_sparc_fbsd.mh b/devel/gdb66/files/patch-gdb_config_sparc_fbsd.mh index 5631903da987..1a23ca92d26f 100644 --- a/devel/gdb66/files/patch-gdb_config_sparc_fbsd.mh +++ b/devel/gdb66/files/patch-gdb_config_sparc_fbsd.mh @@ -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 diff --git a/devel/gdb66/files/patch-gdb_config_sparc_fbsd.mt b/devel/gdb66/files/patch-gdb_config_sparc_fbsd.mt new file mode 100644 index 000000000000..3147c4ef30e2 --- /dev/null +++ b/devel/gdb66/files/patch-gdb_config_sparc_fbsd.mt @@ -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 diff --git a/devel/gdb66/files/patch-gdb_config_sparc_nm-fbsd.h b/devel/gdb66/files/patch-gdb_config_sparc_nm-fbsd.h index c7261a0ca459..372596d6f7ce 100644 --- a/devel/gdb66/files/patch-gdb_config_sparc_nm-fbsd.h +++ b/devel/gdb66/files/patch-gdb_config_sparc_nm-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 */ diff --git a/devel/gdb66/files/patch-gdb_config_sparc_tm-fbsd.h b/devel/gdb66/files/patch-gdb_config_sparc_tm-fbsd.h new file mode 100644 index 000000000000..4e15435b3505 --- /dev/null +++ b/devel/gdb66/files/patch-gdb_config_sparc_tm-fbsd.h @@ -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 */ diff --git a/devel/gdb66/files/patch-gdb_sparcnbsd-tdep.c b/devel/gdb66/files/patch-gdb_sparcnbsd-tdep.c new file mode 100644 index 000000000000..8635a78d925a --- /dev/null +++ b/devel/gdb66/files/patch-gdb_sparcnbsd-tdep.c @@ -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) diff --git a/devel/gdb66/files/patch-sparcnbsd-tdep.c b/devel/gdb66/files/patch-sparcnbsd-tdep.c new file mode 100644 index 000000000000..8635a78d925a --- /dev/null +++ b/devel/gdb66/files/patch-sparcnbsd-tdep.c @@ -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) |