aboutsummaryrefslogtreecommitdiff
path: root/devel/gdb6
diff options
context:
space:
mode:
authorMark Peek <mp@FreeBSD.org>2002-10-23 05:21:04 +0000
committerMark Peek <mp@FreeBSD.org>2002-10-23 05:21:04 +0000
commit1e29f63a020ce5dc3d30643124b64576b110c784 (patch)
tree30b7ba29e70ffda5309400d1e06f9ae9c4a46ed0 /devel/gdb6
parent6e10330cc5694fb168941322e37245be4c28be26 (diff)
downloadports-1e29f63a020ce5dc3d30643124b64576b110c784.tar.gz
ports-1e29f63a020ce5dc3d30643124b64576b110c784.zip
Notes
Diffstat (limited to 'devel/gdb6')
-rw-r--r--devel/gdb6/files/patch-config_sparc_nm-fbsd.h28
-rw-r--r--devel/gdb6/files/patch-gdb_config_sparc_nm-fbsd.h28
-rw-r--r--devel/gdb6/files/patch-gdb_sparcnbsd-tdep.c61
-rw-r--r--devel/gdb6/files/patch-sparcnbsd-tdep.c61
4 files changed, 126 insertions, 52 deletions
diff --git a/devel/gdb6/files/patch-config_sparc_nm-fbsd.h b/devel/gdb6/files/patch-config_sparc_nm-fbsd.h
index 372596d6f7ce..4ab0b5ada57d 100644
--- a/devel/gdb6/files/patch-config_sparc_nm-fbsd.h
+++ b/devel/gdb6/files/patch-config_sparc_nm-fbsd.h
@@ -1,6 +1,6 @@
--- 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 @@
++++ gdb/config/sparc/nm-fbsd.h Tue Oct 22 16:33:14 2002
+@@ -32,36 +32,45 @@
#define ATTACH_DETACH
@@ -23,8 +23,26 @@
+
+#define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
+
-+#define reg32 reg
-+#define reg64 reg
++#define REG32_OFFSET_GLOBAL (0)
++#define REG32_OFFSET_OUT (32)
++#define REG32_OFFSET_NPC (96)
++#define REG32_OFFSET_PC (100)
++#define REG32_OFFSET_PSR (104)
++#define REG32_OFFSET_Y (112)
++#define REG32_SIZE (128)
++#define FPREG32_SIZE (136)
++
++#define REG64_OFFSET_GLOBAL (0)
++#define REG64_OFFSET_OUT (64)
++#define REG64_OFFSET_NPC (192)
++#define REG64_OFFSET_PC (200)
++#define REG64_OFFSET_TSTATE (208)
++#define REG64_OFFSET_Y (224)
++#define REG64_SIZE (256)
++#define FPREG64_SIZE (272)
++
++#define JB32_OFFSET_PC REG32_OFFSET_PC
++#define JB64_OFFSET_PC REG64_OFFSET_PC
-#define PTRACE_GETREGS PT_GETREGS
-#define PTRACE_SETREGS PT_SETREGS
@@ -48,7 +66,7 @@
-#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 reg64 reg
+#define fpreg64 fpreg
#endif /* NM_FBSD_H */
diff --git a/devel/gdb6/files/patch-gdb_config_sparc_nm-fbsd.h b/devel/gdb6/files/patch-gdb_config_sparc_nm-fbsd.h
index 372596d6f7ce..4ab0b5ada57d 100644
--- a/devel/gdb6/files/patch-gdb_config_sparc_nm-fbsd.h
+++ b/devel/gdb6/files/patch-gdb_config_sparc_nm-fbsd.h
@@ -1,6 +1,6 @@
--- 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 @@
++++ gdb/config/sparc/nm-fbsd.h Tue Oct 22 16:33:14 2002
+@@ -32,36 +32,45 @@
#define ATTACH_DETACH
@@ -23,8 +23,26 @@
+
+#define CHILD_PREPARE_TO_STORE() read_register_bytes (0, NULL, REGISTER_BYTES)
+
-+#define reg32 reg
-+#define reg64 reg
++#define REG32_OFFSET_GLOBAL (0)
++#define REG32_OFFSET_OUT (32)
++#define REG32_OFFSET_NPC (96)
++#define REG32_OFFSET_PC (100)
++#define REG32_OFFSET_PSR (104)
++#define REG32_OFFSET_Y (112)
++#define REG32_SIZE (128)
++#define FPREG32_SIZE (136)
++
++#define REG64_OFFSET_GLOBAL (0)
++#define REG64_OFFSET_OUT (64)
++#define REG64_OFFSET_NPC (192)
++#define REG64_OFFSET_PC (200)
++#define REG64_OFFSET_TSTATE (208)
++#define REG64_OFFSET_Y (224)
++#define REG64_SIZE (256)
++#define FPREG64_SIZE (272)
++
++#define JB32_OFFSET_PC REG32_OFFSET_PC
++#define JB64_OFFSET_PC REG64_OFFSET_PC
-#define PTRACE_GETREGS PT_GETREGS
-#define PTRACE_SETREGS PT_SETREGS
@@ -48,7 +66,7 @@
-#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 reg64 reg
+#define fpreg64 fpreg
#endif /* NM_FBSD_H */
diff --git a/devel/gdb6/files/patch-gdb_sparcnbsd-tdep.c b/devel/gdb6/files/patch-gdb_sparcnbsd-tdep.c
index 8635a78d925a..13ba396dd6b7 100644
--- a/devel/gdb6/files/patch-gdb_sparcnbsd-tdep.c
+++ b/devel/gdb6/files/patch-gdb_sparcnbsd-tdep.c
@@ -1,27 +1,28 @@
---- 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 */
+diff -urN gdb/sparcnbsd-tdep.c.orig gdb/sparcnbsd-tdep.c
+--- gdb/sparcnbsd-tdep.c.orig Sat Oct 19 17:19:17 2002
++++ gdb/sparcnbsd-tdep.c Sat Oct 19 17:44:47 2002
+@@ -31,20 +31,6 @@
+ #include "solib-svr4.h"
+
+-#define REG32_OFFSET_PSR (0 * 4)
+-#define REG32_OFFSET_PC (1 * 4)
+-#define REG32_OFFSET_NPC (2 * 4)
+-#define REG32_OFFSET_Y (3 * 4)
+-#define REG32_OFFSET_GLOBAL (4 * 4)
+-#define REG32_OFFSET_OUT (12 * 4)
+-
+-#define REG64_OFFSET_TSTATE (0 * 8)
+-#define REG64_OFFSET_PC (1 * 8)
+-#define REG64_OFFSET_NPC (2 * 8)
+-#define REG64_OFFSET_Y (3 * 8)
+-#define REG64_OFFSET_GLOBAL (4 * 8)
+-#define REG64_OFFSET_OUT (12 * 8)
+-
void
sparcnbsd_supply_reg32 (char *regs, int regno)
-@@ -375,16 +382,13 @@
+ {
+@@ -375,16 +361,13 @@
if (gdbarch_ptr_bit (current_gdbarch) == 32)
{
@@ -42,3 +43,21 @@
}
switch (which)
+@@ -442,7 +425,7 @@
+
+ jb_addr = read_register (O0_REGNUM);
+
+- if (target_read_memory (jb_addr + 12, buf, sizeof (buf)))
++ if (target_read_memory (jb_addr + JB32_OFFSET_PC, buf, sizeof (buf)))
+ return 0;
+
+ *pc = extract_address (buf, sizeof (buf));
+@@ -458,7 +441,7 @@
+
+ jb_addr = read_register (O0_REGNUM);
+
+- if (target_read_memory (jb_addr + 16, buf, sizeof (buf)))
++ if (target_read_memory (jb_addr + JB64_OFFSET_PC, buf, sizeof (buf)))
+ return 0;
+
+ *pc = extract_address (buf, sizeof (buf));
diff --git a/devel/gdb6/files/patch-sparcnbsd-tdep.c b/devel/gdb6/files/patch-sparcnbsd-tdep.c
index 8635a78d925a..13ba396dd6b7 100644
--- a/devel/gdb6/files/patch-sparcnbsd-tdep.c
+++ b/devel/gdb6/files/patch-sparcnbsd-tdep.c
@@ -1,27 +1,28 @@
---- 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 */
+diff -urN gdb/sparcnbsd-tdep.c.orig gdb/sparcnbsd-tdep.c
+--- gdb/sparcnbsd-tdep.c.orig Sat Oct 19 17:19:17 2002
++++ gdb/sparcnbsd-tdep.c Sat Oct 19 17:44:47 2002
+@@ -31,20 +31,6 @@
+ #include "solib-svr4.h"
+
+-#define REG32_OFFSET_PSR (0 * 4)
+-#define REG32_OFFSET_PC (1 * 4)
+-#define REG32_OFFSET_NPC (2 * 4)
+-#define REG32_OFFSET_Y (3 * 4)
+-#define REG32_OFFSET_GLOBAL (4 * 4)
+-#define REG32_OFFSET_OUT (12 * 4)
+-
+-#define REG64_OFFSET_TSTATE (0 * 8)
+-#define REG64_OFFSET_PC (1 * 8)
+-#define REG64_OFFSET_NPC (2 * 8)
+-#define REG64_OFFSET_Y (3 * 8)
+-#define REG64_OFFSET_GLOBAL (4 * 8)
+-#define REG64_OFFSET_OUT (12 * 8)
+-
void
sparcnbsd_supply_reg32 (char *regs, int regno)
-@@ -375,16 +382,13 @@
+ {
+@@ -375,16 +361,13 @@
if (gdbarch_ptr_bit (current_gdbarch) == 32)
{
@@ -42,3 +43,21 @@
}
switch (which)
+@@ -442,7 +425,7 @@
+
+ jb_addr = read_register (O0_REGNUM);
+
+- if (target_read_memory (jb_addr + 12, buf, sizeof (buf)))
++ if (target_read_memory (jb_addr + JB32_OFFSET_PC, buf, sizeof (buf)))
+ return 0;
+
+ *pc = extract_address (buf, sizeof (buf));
+@@ -458,7 +441,7 @@
+
+ jb_addr = read_register (O0_REGNUM);
+
+- if (target_read_memory (jb_addr + 16, buf, sizeof (buf)))
++ if (target_read_memory (jb_addr + JB64_OFFSET_PC, buf, sizeof (buf)))
+ return 0;
+
+ *pc = extract_address (buf, sizeof (buf));