View | Details | Raw Unified | Return to bug 219524 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-3 / +3 lines)
Lines 2-11 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	libunwind
4
PORTNAME=	libunwind
5
PORTVERSION=	20170615	# This is the release date of libunwind 1.2.1
5
PORTVERSION=	20190901	# This is the release date of libunwind 1.3.1
6
CATEGORIES=	devel
6
CATEGORIES=	devel
7
MASTER_SITES=	SAVANNAH
7
MASTER_SITES=	SAVANNAH
8
DISTNAME=	${PORTNAME}-1.2.1
8
DISTNAME=	${PORTNAME}-1.3.1
9
9
10
MAINTAINER=	danilo@FreeBSD.org
10
MAINTAINER=	danilo@FreeBSD.org
11
COMMENT=	Generic stack unwinding library
11
COMMENT=	Generic stack unwinding library
Lines 13-19 Link Here
13
LICENSE=	MIT
13
LICENSE=	MIT
14
LICENSE_FILE=	${WRKSRC}/COPYING
14
LICENSE_FILE=	${WRKSRC}/COPYING
15
15
16
ONLY_FOR_ARCHS= aarch64 amd64 i386
16
ONLY_FOR_ARCHS=	aarch64 amd64 i386
17
17
18
OPTIONS_DEFINE=	DOCS
18
OPTIONS_DEFINE=	DOCS
19
OPTIONS_SUB=	yes
19
OPTIONS_SUB=	yes
(-)distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1515854352
1
TIMESTAMP = 1567588476
2
SHA256 (libunwind-1.2.1.tar.gz) = 3f3ecb90e28cbe53fba7a4a27ccce7aad188d3210bb1964a923a731a27a75acb
2
SHA256 (libunwind-1.3.1.tar.gz) = 43997a3939b6ccdf2f669b50fdb8a4d3205374728c2923ddc2354c65260214f8
3
SIZE (libunwind-1.2.1.tar.gz) = 780774
3
SIZE (libunwind-1.3.1.tar.gz) = 801262
(-)files/patch-include_libunwind-aarch64.h (-2 / +2 lines)
Lines 1-4 Link Here
1
--- include/libunwind-aarch64.h.orig	2018-06-15 23:58:09 UTC
1
--- include/libunwind-aarch64.h.orig	2019-09-04 09:23:13 UTC
2
+++ include/libunwind-aarch64.h
2
+++ include/libunwind-aarch64.h
3
@@ -177,7 +177,7 @@ typedef ucontext_t unw_tdep_context_t;
3
@@ -177,7 +177,7 @@ typedef ucontext_t unw_tdep_context_t;
4
 
4
 
Lines 5-11 Link Here
5
 #define unw_tdep_getcontext(uc) (({					\
5
 #define unw_tdep_getcontext(uc) (({					\
6
   unw_tdep_context_t *unw_ctx = (uc);					\
6
   unw_tdep_context_t *unw_ctx = (uc);					\
7
-  register uint64_t *unw_base asm ("x0") = (uint64_t*) unw_ctx->uc_mcontext.regs;		\
7
-  register uint64_t *unw_base asm ("x0") = (uint64_t*) unw_ctx->uc_mcontext.regs;		\
8
+  register uint64_t *unw_base asm ("x0") = (uint64_t*) unw_ctx->uc_mcontext.mc_gpregs.gp_x;		\
8
+  register uint64_t *unw_base asm ("x0") = (uint64_t*) 	unw_ctx->uc_mcontext.mc_gpregs.gp_x;	\
9
   __asm__ __volatile__ (						\
9
   __asm__ __volatile__ (						\
10
      "stp x0, x1, [%[base], #0]\n" \
10
      "stp x0, x1, [%[base], #0]\n" \
11
      "stp x2, x3, [%[base], #16]\n" \
11
      "stp x2, x3, [%[base], #16]\n" \
(-)files/patch-include_libunwind__i.h (-14 lines)
Lines 1-14 Link Here
1
--- include/libunwind_i.h.orig	2018-06-15 23:58:15 UTC
2
+++ include/libunwind_i.h
3
@@ -86,6 +86,11 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 
4
 #   error Host has unknown byte-order.
5
 # endif
6
 #endif
7
+#ifdef __FreeBSD__
8
+#define __BYTE_ORDER BYTE_ORDER
9
+#define __LITTLE_ENDIAN LITTLE_ENDIAN
10
+#define __BIG_ENDIAN BIG_ENDIAN
11
+#endif
12
 
13
 #if defined(HAVE__BUILTIN_UNREACHABLE)
14
 # define unreachable() __builtin_unreachable()
(-)files/patch-src_aarch64_Ginit.c (-5 / +5 lines)
Lines 1-11 Link Here
1
--- src/aarch64/Ginit.c.orig	2018-06-15 23:58:20 UTC
1
--- src/aarch64/Ginit.c.orig	2019-09-04 09:26:23 UTC
2
+++ src/aarch64/Ginit.c
2
+++ src/aarch64/Ginit.c
3
@@ -44,7 +44,7 @@ static inline void *
3
@@ -44,7 +44,7 @@ static inline void *
4
 uc_addr (ucontext_t *uc, int reg)
4
 uc_addr (ucontext_t *uc, int reg)
5
 {
5
 {
6
   if (reg >= UNW_AARCH64_X0 && reg <= UNW_AARCH64_V31)
6
   if (reg >= UNW_AARCH64_X0 && reg < UNW_AARCH64_V0)
7
-    return &uc->uc_mcontext.regs[reg];
7
-    return &uc->uc_mcontext.regs[reg];
8
+    return &uc->uc_mcontext.mc_gpregs.gp_x[reg];
8
+    return &uc->uc_mcontext.mc_gpregs.gp_x[reg]; 
9
   else if (reg >= UNW_AARCH64_V0 && reg <= UNW_AARCH64_V31)
10
     return &GET_FPCTX(uc)->vregs[reg - UNW_AARCH64_V0];
9
   else
11
   else
10
     return NULL;
11
 }
(-)files/patch-src_coredump___UCD__access__reg__freebsd.c (-5 / +5 lines)
Lines 1-13 Link Here
1
--- src/coredump/_UCD_access_reg_freebsd.c.orig	2018-06-16 00:05:10 UTC
1
--- src/coredump/_UCD_access_reg_freebsd.c.orig	2019-09-04 09:30:26 UTC
2
+++ src/coredump/_UCD_access_reg_freebsd.c
2
+++ src/coredump/_UCD_access_reg_freebsd.c
3
@@ -110,6 +110,10 @@ _UCD_access_reg (unw_addr_space_t as,
3
@@ -110,6 +110,10 @@ _UCD_access_reg (unw_addr_space_t as,
4
       Debug(0, "bad regnum:%d\n", regnum);
4
       Debug(0, "bad regnum:%d\n", regnum);
5
       return -UNW_EINVAL;
5
       return -UNW_EINVAL;
6
   };
6
   }
7
+#elif defined(UNW_TARGET_AARCH64)
7
+#elif defined(UNW_TARGET_AARCH64)
8
+  if (regnum < 0 || regnum >= UNW_AARCH64_FPCR)
8
+  if (regnum < 0 || regnum >= UNW_AARCH64_FPCR)
9
+    return -UNW_EINVAL;
9
+    return -UNW_EINVAL;
10
+  *valp = ui->prstatus->pr_reg.x[regnum];
10
+  *valp = ui->prstatus->pr_reg.x[regnum];
11
 #else
11
 #elif defined(UNW_TARGET_ARM)
12
 #error Port me
12
   if (regnum >= UNW_ARM_R0 && regnum <= UNW_ARM_R12) {
13
 #endif
13
      *valp = ui->prstatus->pr_reg.r[regnum];
(-)files/patch-src_ptrace___UPT__access__fpreg.c (-12 / +12 lines)
Lines 1-20 Link Here
1
--- src/ptrace/_UPT_access_fpreg.c.orig	2018-06-15 23:58:03 UTC
1
--- src/ptrace/_UPT_access_fpreg.c.orig	2019-09-04 09:33:38 UTC
2
+++ src/ptrace/_UPT_access_fpreg.c
2
+++ src/ptrace/_UPT_access_fpreg.c
3
@@ -85,6 +85,8 @@ _UPT_access_fpreg (unw_addr_space_t as, unw_regnum_t r
3
@@ -81,6 +81,8 @@ _UPT_access_fpreg (unw_addr_space_t as, 
4
           memcpy(&fpreg.fpr_xacc[reg], val, sizeof(unw_fpreg_t));
5
 #elif defined(__i386__)
4
 #elif defined(__i386__)
6
           memcpy(&fpreg.fpr_acc[reg], val, sizeof(unw_fpreg_t));
5
   if ((unsigned) reg < UNW_X86_ST0 || (unsigned) reg > UNW_X86_ST7)
6
     return -UNW_EBADREG;
7
+#elif defined(__aarch64__)
7
+#elif defined(__aarch64__)
8
+          memcpy(&fpreg.fp_q[reg], val, sizeof(unw_fpreg_t));
8
+          memcpy(&fpreg.fp_q[reg], val, sizeof(unw_fpreg_t));
9
 #else
9
 #elif defined(__arm__)
10
 #error Fix me
10
   if ((unsigned) reg < UNW_ARM_F0 || (unsigned) reg > UNW_ARM_F7)
11
 #endif
11
     return -UNW_EBADREG;
12
@@ -95,6 +97,8 @@ _UPT_access_fpreg (unw_addr_space_t as, unw_regnum_t r
12
@@ -97,6 +99,8 @@ _UPT_access_fpreg (unw_addr_space_t as, 
13
           memcpy(val, &fpreg.fpr_xacc[reg], sizeof(unw_fpreg_t));
13
           memcpy(&fpreg.fpr_xacc[reg], val, sizeof(unw_fpreg_t));
14
 #elif defined(__i386__)
14
 #elif defined(__i386__)
15
           memcpy(val, &fpreg.fpr_acc[reg], sizeof(unw_fpreg_t));
15
           memcpy(&fpreg.fpr_acc[reg], val, sizeof(unw_fpreg_t));
16
+#elif defined(__aarch64__)
16
+#elif defined(__aarch64__)
17
+          memcpy(val, &fpreg.fp_q[reg], sizeof(unw_fpreg_t));
17
+          memcpy(val, &fpreg.fp_q[reg], sizeof(unw_fpreg_t));
18
 #elif defined(__arm__)
19
           memcpy(&fpreg.fpr[reg], val, sizeof(unw_fpreg_t));
18
 #else
20
 #else
19
 #error Fix me
20
 #endif
(-)files/patch-tests-mapper.c (-12 lines)
Lines 1-12 Link Here
1
--- tests/mapper.c.orig	2014-10-06 14:46:27.000000000 -0400
2
+++ tests/mapper.c	2014-10-06 14:47:00.000000000 -0400
3
@@ -39,6 +39,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DE
4
 #if !defined(MAP_ANONYMOUS) && defined(MAP_ANON)
5
 # define MAP_ANONYMOUS MAP_ANON
6
 #endif
7
+#if !defined(MAP_NORESERVE)
8
+# define MAP_NORESERVE 0
9
+#endif
10
 
11
 int
12
 main (void)

Return to bug 219524