diff options
author | mp <mp@FreeBSD.org> | 2002-10-23 13:21:04 +0800 |
---|---|---|
committer | mp <mp@FreeBSD.org> | 2002-10-23 13:21:04 +0800 |
commit | 58715abfc3dff474d186a9675624d784f05a3c52 (patch) | |
tree | 8a996353e9e010392ceb4de833821296f5291917 | |
parent | feeb650168744e79aae0b87434baa948d95898b2 (diff) | |
download | freebsd-ports-gnome-58715abfc3dff474d186a9675624d784f05a3c52.tar.gz freebsd-ports-gnome-58715abfc3dff474d186a9675624d784f05a3c52.tar.zst freebsd-ports-gnome-58715abfc3dff474d186a9675624d784f05a3c52.zip |
Update to track changes to struct regs for sparc64.
Submitted by: jake
-rw-r--r-- | devel/gdb53/files/patch-gdb_config_sparc_nm-fbsd.h | 28 | ||||
-rw-r--r-- | devel/gdb53/files/patch-gdb_sparcnbsd-tdep.c | 61 | ||||
-rw-r--r-- | devel/gdb6/files/patch-config_sparc_nm-fbsd.h | 28 | ||||
-rw-r--r-- | devel/gdb6/files/patch-gdb_config_sparc_nm-fbsd.h | 28 | ||||
-rw-r--r-- | devel/gdb6/files/patch-gdb_sparcnbsd-tdep.c | 61 | ||||
-rw-r--r-- | devel/gdb6/files/patch-sparcnbsd-tdep.c | 61 | ||||
-rw-r--r-- | devel/gdb66/files/patch-config_sparc_nm-fbsd.h | 28 | ||||
-rw-r--r-- | devel/gdb66/files/patch-gdb_config_sparc_nm-fbsd.h | 28 | ||||
-rw-r--r-- | devel/gdb66/files/patch-gdb_sparcnbsd-tdep.c | 61 | ||||
-rw-r--r-- | devel/gdb66/files/patch-sparcnbsd-tdep.c | 61 |
10 files changed, 315 insertions, 130 deletions
diff --git a/devel/gdb53/files/patch-gdb_config_sparc_nm-fbsd.h b/devel/gdb53/files/patch-gdb_config_sparc_nm-fbsd.h index 372596d6f7ce..4ab0b5ada57d 100644 --- a/devel/gdb53/files/patch-gdb_config_sparc_nm-fbsd.h +++ b/devel/gdb53/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/gdb53/files/patch-gdb_sparcnbsd-tdep.c b/devel/gdb53/files/patch-gdb_sparcnbsd-tdep.c index 8635a78d925a..13ba396dd6b7 100644 --- a/devel/gdb53/files/patch-gdb_sparcnbsd-tdep.c +++ b/devel/gdb53/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-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)); diff --git a/devel/gdb66/files/patch-config_sparc_nm-fbsd.h b/devel/gdb66/files/patch-config_sparc_nm-fbsd.h index 372596d6f7ce..4ab0b5ada57d 100644 --- a/devel/gdb66/files/patch-config_sparc_nm-fbsd.h +++ b/devel/gdb66/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/gdb66/files/patch-gdb_config_sparc_nm-fbsd.h b/devel/gdb66/files/patch-gdb_config_sparc_nm-fbsd.h index 372596d6f7ce..4ab0b5ada57d 100644 --- a/devel/gdb66/files/patch-gdb_config_sparc_nm-fbsd.h +++ b/devel/gdb66/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/gdb66/files/patch-gdb_sparcnbsd-tdep.c b/devel/gdb66/files/patch-gdb_sparcnbsd-tdep.c index 8635a78d925a..13ba396dd6b7 100644 --- a/devel/gdb66/files/patch-gdb_sparcnbsd-tdep.c +++ b/devel/gdb66/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/gdb66/files/patch-sparcnbsd-tdep.c b/devel/gdb66/files/patch-sparcnbsd-tdep.c index 8635a78d925a..13ba396dd6b7 100644 --- a/devel/gdb66/files/patch-sparcnbsd-tdep.c +++ b/devel/gdb66/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)); |