Diff below makes reading core dumps work again.

ok?


Index: devel/gdb/Makefile
===================================================================
RCS file: /cvs/ports/devel/gdb/Makefile,v
retrieving revision 1.53
diff -u -p -r1.53 Makefile
--- devel/gdb/Makefile  24 Jan 2018 00:19:56 -0000      1.53
+++ devel/gdb/Makefile  13 Jun 2018 11:17:36 -0000
@@ -7,7 +7,7 @@ COMMENT=        GNU debugger
 CATEGORIES=    devel
 
 DISTNAME=      gdb-7.12.1
-REVISION=      1
+REVISION=      2
 
 HOMEPAGE=      https://www.gnu.org/software/gdb/
 
Index: devel/gdb/patches/patch-gdb_armbsd-tdep_c
===================================================================
RCS file: devel/gdb/patches/patch-gdb_armbsd-tdep_c
diff -N devel/gdb/patches/patch-gdb_armbsd-tdep_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ devel/gdb/patches/patch-gdb_armbsd-tdep_c   13 Jun 2018 11:17:36 -0000
@@ -0,0 +1,41 @@
+$OpenBSD$
+
+Index: gdb/armbsd-tdep.c
+--- gdb/armbsd-tdep.c.orig
++++ gdb/armbsd-tdep.c
+@@ -30,15 +30,12 @@
+ #define ARMBSD_SIZEOF_GREGS   (17 * 4)
+ 
+ /* Sizeof `struct fpreg' in <machine/reg.h.  */
+-#define ARMBSD_SIZEOF_FPREGS  ((1 + (8 * 3)) * 4)
++#define ARMBSD_SIZEOF_FPREGS  (32 * 8 + 4 + 4)
+ 
+ static int
+ armbsd_fpreg_offset (int regnum)
+ {
+-  if (regnum == ARM_FPS_REGNUM)
+-    return 0;
+-
+-  return 4 + (regnum - ARM_F0_REGNUM) * 12;
++  return (regnum - ARM_D0_REGNUM) * 8;
+ }
+ 
+ /* Supply register REGNUM from the buffer specified by FPREGS and LEN
+@@ -55,7 +52,7 @@ armbsd_supply_fpregset (const struct regset *regset,
+ 
+   gdb_assert (len >= ARMBSD_SIZEOF_FPREGS);
+ 
+-  for (i = ARM_F0_REGNUM; i <= ARM_FPS_REGNUM; i++)
++  for (i = ARM_D0_REGNUM; i <= ARM_FPSCR_REGNUM; i++)
+     {
+       if (regnum == i || regnum == -1)
+       regcache_raw_supply (regcache, i, regs + armbsd_fpreg_offset (i));
+@@ -83,7 +80,7 @@ armbsd_supply_gregset (const struct regset *regset,
+     }
+ 
+   if (regnum == ARM_PS_REGNUM || regnum == -1)
+-    regcache_raw_supply (regcache, i, regs + 16 * 4);
++    regcache_raw_supply (regcache, ARM_PS_REGNUM, regs + 16 * 4);
+ 
+   if (len >= ARMBSD_SIZEOF_GREGS + ARMBSD_SIZEOF_FPREGS)
+     {

Reply via email to