pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
coreclr-git: Add support for custom 'struct reg' format
Module Name: pkgsrc-wip
Committed By: Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By: kamil
Date: Sun Feb 7 12:14:11 2016 +0100
Changeset: c1b191f466c2c0faba940f53cc3c2f721a56cbb4
Modified Files:
coreclr-git/distinfo
coreclr-git/patches/patch-src_pal_inc_pal__char16.h
coreclr-git/patches/patch-src_pal_src_CMakeLists.txt
coreclr-git/patches/patch-src_pal_src_configure.cmake
Added Files:
coreclr-git/patches/patch-src_pal_src_config.h.in
coreclr-git/patches/patch-src_pal_src_include_pal_context.h
Log Message:
coreclr-git: Add support for custom 'struct reg' format
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=c1b191f466c2c0faba940f53cc3c2f721a56cbb4
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
coreclr-git/distinfo | 8 ++-
.../patches/patch-src_pal_inc_pal__char16.h | 2 +-
.../patches/patch-src_pal_src_CMakeLists.txt | 2 +-
coreclr-git/patches/patch-src_pal_src_config.h.in | 12 ++++
.../patches/patch-src_pal_src_configure.cmake | 19 ++++-
.../patch-src_pal_src_include_pal_context.h | 84 ++++++++++++++++++++++
6 files changed, 121 insertions(+), 6 deletions(-)
diffs:
diff --git a/coreclr-git/distinfo b/coreclr-git/distinfo
index 32dda49..767cd34 100644
--- a/coreclr-git/distinfo
+++ b/coreclr-git/distinfo
@@ -1,7 +1,9 @@
$NetBSD$
SHA1 (patch-CMakeLists.txt) = eb442f323c5a8865937df0947eaf2a4306454115
-SHA1 (patch-src_pal_inc_pal__char16.h) = ca743d8330802f1a626b1c335461c733eb2a6325
-SHA1 (patch-src_pal_src_CMakeLists.txt) = 70b48ae972cf214c9e38119f376a6b6c83079fe9
-SHA1 (patch-src_pal_src_configure.cmake) = 3c43cd68dffab48a1ab8a6997a681197ddacaac4
+SHA1 (patch-src_pal_inc_pal__char16.h) = 205f6a8533838c192b36bbb00155da1b02e0f629
+SHA1 (patch-src_pal_src_CMakeLists.txt) = 9211132940149691257aedb5ca56215e77f8438a
+SHA1 (patch-src_pal_src_config.h.in) = 18acde20abd33a8489b8e43cfb3a142ecd5dd3e0
+SHA1 (patch-src_pal_src_configure.cmake) = a8b0d959425a20ec6981e781624311b2692feab6
SHA1 (patch-src_pal_src_exception_signal.cpp) = 201a8c35922643537a1cc4de2e8eddf65c2fab65
+SHA1 (patch-src_pal_src_include_pal_context.h) = 2ff5559036c74a52dcc81cbda04d4442f88b18dd
diff --git a/coreclr-git/patches/patch-src_pal_inc_pal__char16.h b/coreclr-git/patches/patch-src_pal_inc_pal__char16.h
index e9c1a2e..349876e 100644
--- a/coreclr-git/patches/patch-src_pal_inc_pal__char16.h
+++ b/coreclr-git/patches/patch-src_pal_inc_pal__char16.h
@@ -1,6 +1,6 @@
$NetBSD$
---- src/pal/inc/pal_char16.h.orig 2016-02-06 09:37:43.000000000 +0000
+--- src/pal/inc/pal_char16.h.orig 2016-01-28 19:04:13.000000000 +0000
+++ src/pal/inc/pal_char16.h
@@ -29,6 +29,8 @@ This file is used to define the wchar_t
#ifndef PAL_STDCPP_COMPAT
diff --git a/coreclr-git/patches/patch-src_pal_src_CMakeLists.txt b/coreclr-git/patches/patch-src_pal_src_CMakeLists.txt
index eb6dd17..c5ec4d6 100644
--- a/coreclr-git/patches/patch-src_pal_src_CMakeLists.txt
+++ b/coreclr-git/patches/patch-src_pal_src_CMakeLists.txt
@@ -1,6 +1,6 @@
$NetBSD$
---- src/pal/src/CMakeLists.txt.orig 2016-02-06 09:37:43.000000000 +0000
+--- src/pal/src/CMakeLists.txt.orig 2016-02-06 02:05:27.000000000 +0000
+++ src/pal/src/CMakeLists.txt
@@ -263,6 +263,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL Linux)
endif(CMAKE_SYSTEM_NAME STREQUAL Linux)
diff --git a/coreclr-git/patches/patch-src_pal_src_config.h.in b/coreclr-git/patches/patch-src_pal_src_config.h.in
new file mode 100644
index 0000000..58092ab
--- /dev/null
+++ b/coreclr-git/patches/patch-src_pal_src_config.h.in
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- src/pal/src/config.h.in.orig 2016-02-02 22:59:18.000000000 +0000
++++ src/pal/src/config.h.in
+@@ -121,6 +121,7 @@
+ #cmakedefine01 HAVE__NSGETENVIRON
+ #cmakedefine01 DEADLOCK_WHEN_THREAD_IS_SUSPENDED_WHILE_BLOCKED_ON_MUTEX
+ #cmakedefine PAL_PTRACE(cmd, pid, addr, data) @PAL_PTRACE@
++#cmakedefine BSD_REGS_STYLE(reg, RR, rr) @BSD_REGS_STYLE@
+ #cmakedefine PAL_PT_ATTACH @PAL_PT_ATTACH@
+ #cmakedefine PAL_PT_DETACH @PAL_PT_DETACH@
+ #cmakedefine PAL_PT_READ_D @PAL_PT_READ_D@
diff --git a/coreclr-git/patches/patch-src_pal_src_configure.cmake b/coreclr-git/patches/patch-src_pal_src_configure.cmake
index f75a55b..eb62c5c 100644
--- a/coreclr-git/patches/patch-src_pal_src_configure.cmake
+++ b/coreclr-git/patches/patch-src_pal_src_configure.cmake
@@ -1,6 +1,6 @@
$NetBSD$
---- src/pal/src/configure.cmake.orig 2016-02-06 09:37:43.000000000 +0000
+--- src/pal/src/configure.cmake.orig 2016-02-06 02:05:27.000000000 +0000
+++ src/pal/src/configure.cmake
@@ -9,6 +9,8 @@ include(CheckLibraryExists)
@@ -11,3 +11,20 @@ $NetBSD$
elseif(CMAKE_SYSTEM_NAME STREQUAL SunOS)
set(CMAKE_REQUIRED_INCLUDES /opt/local/include)
endif()
+@@ -951,7 +953,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL FreeBS
+ elseif(CMAKE_SYSTEM_NAME STREQUAL NetBSD)
+ if(NOT HAVE_LIBUNWIND_H)
+ unset(HAVE_LIBUNWIND_H CACHE)
+- message(WARNING "Cannot find libunwind. Try installing libunwind8 and libunwind8-dev (or the appropriate packages for your platform)")
++ message(FATAL_ERROR "Cannot find libunwind. Try installing libunwind8 and libunwind8-dev (or the appropriate packages for your platform)")
+ endif()
+ if(NOT HAVE_BSD_UUID_H)
+ unset(HAVE_BSD_UUID_H CACHE)
+@@ -959,6 +961,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL NetBSD
+ endif()
+ set(DEADLOCK_WHEN_THREAD_IS_SUSPENDED_WHILE_BLOCKED_ON_MUTEX 0)
+ set(PAL_PTRACE "ptrace((cmd), (pid), (void*)(addr), (data))")
++ set(BSD_REGS_STYLE "((reg).regs[_REG_##RR])")
+ set(PAL_PT_ATTACH PT_ATTACH)
+ set(PAL_PT_DETACH PT_DETACH)
+ set(PAL_PT_READ_D PT_READ_D)
diff --git a/coreclr-git/patches/patch-src_pal_src_include_pal_context.h b/coreclr-git/patches/patch-src_pal_src_include_pal_context.h
new file mode 100644
index 0000000..a7c2c74
--- /dev/null
+++ b/coreclr-git/patches/patch-src_pal_src_include_pal_context.h
@@ -0,0 +1,84 @@
+$NetBSD$
+
+--- src/pal/src/include/pal/context.h.orig 2016-02-02 22:59:18.000000000 +0000
++++ src/pal/src/include/pal/context.h
+@@ -334,43 +334,47 @@ typedef ucontext_t native_context_t;
+
+ #if HAVE_BSD_REGS_T
+
++#ifndef BSD_REGS_STYLE
++#error "struct reg" has unrecognized format
++#endif
++
+ #ifdef BIT64
+
+-#define BSDREG_Rbx(reg) ((reg).r_rbx)
+-#define BSDREG_Rcx(reg) ((reg).r_rcx)
+-#define BSDREG_Rdx(reg) ((reg).r_rdx)
+-#define BSDREG_Rsi(reg) ((reg).r_rsi)
+-#define BSDREG_Rdi(reg) ((reg).r_rdi)
+-#define BSDREG_Rbp(reg) ((reg).r_rbp)
+-#define BSDREG_Rax(reg) ((reg).r_rax)
+-#define BSDREG_Rip(reg) ((reg).r_rip)
+-#define BSDREG_SegCs(reg) ((reg).r_cs)
+-#define BSDREG_SegSs(reg) ((reg).r_ss)
+-#define BSDREG_Rsp(reg) ((reg).r_rsp)
+-#define BSDREG_R8(reg) ((reg).r_r8)
+-#define BSDREG_R9(reg) ((reg).r_r9)
+-#define BSDREG_R10(reg) ((reg).r_r10)
+-#define BSDREG_R11(reg) ((reg).r_r11)
+-#define BSDREG_R12(reg) ((reg).r_r12)
+-#define BSDREG_R13(reg) ((reg).r_r13)
+-#define BSDREG_R14(reg) ((reg).r_r14)
+-#define BSDREG_R15(reg) ((reg).r_r15)
+-#define BSDREG_EFlags(reg) ((reg).r_rflags)
++#define BSDREG_Rbx(reg) BSD_REGS_STYLE(reg,RBX,rbx)
++#define BSDREG_Rcx(reg) BSD_REGS_STYLE(reg,RCX,rcx)
++#define BSDREG_Rdx(reg) BSD_REGS_STYLE(reg,RDX,rdx)
++#define BSDREG_Rsi(reg) BSD_REGS_STYLE(reg,RSI,rsi)
++#define BSDREG_Rdi(reg) BSD_REGS_STYLE(reg,RDI,rdi)
++#define BSDREG_Rbp(reg) BSD_REGS_STYLE(reg,RBP,rbp)
++#define BSDREG_Rax(reg) BSD_REGS_STYLE(reg,RAX,rax)
++#define BSDREG_Rip(reg) BSD_REGS_STYLE(reg,RIP,rip)
++#define BSDREG_SegCs(reg) BSD_REGS_STYLE(reg,CS,cs)
++#define BSDREG_SegSs(reg) BSD_REGS_STYLE(reg,SS,ss)
++#define BSDREG_Rsp(reg) BSD_REGS_STYLE(reg,RSP,rsp)
++#define BSDREG_R8(reg) BSD_REGS_STYLE(reg,R8,r8)
++#define BSDREG_R9(reg) BSD_REGS_STYLE(reg,R9,r9)
++#define BSDREG_R10(reg) BSD_REGS_STYLE(reg,R10,r10)
++#define BSDREG_R11(reg) BSD_REGS_STYLE(reg,R11,r11)
++#define BSDREG_R12(reg) BSD_REGS_STYLE(reg,R12,r12)
++#define BSDREG_R13(reg) BSD_REGS_STYLE(reg,R13,r13)
++#define BSDREG_R14(reg) BSD_REGS_STYLE(reg,R14,r14)
++#define BSDREG_R15(reg) BSD_REGS_STYLE(reg,R15,r15)
++#define BSDREG_EFlags(reg) BSD_REGS_STYLE(reg,RFLAGS,rflags)
+
+ #else // BIT64
+
+-#define BSDREG_Ebx(reg) ((reg).r_ebx)
+-#define BSDREG_Ecx(reg) ((reg).r_ecx)
+-#define BSDREG_Edx(reg) ((reg).r_edx)
+-#define BSDREG_Esi(reg) ((reg).r_esi)
+-#define BSDREG_Edi(reg) ((reg).r_edi)
+-#define BSDREG_Ebp(reg) ((reg).r_ebp)
+-#define BSDREG_Eax(reg) ((reg).r_eax)
+-#define BSDREG_Eip(reg) ((reg).r_eip)
+-#define BSDREG_SegCs(reg) ((reg).r_cs)
+-#define BSDREG_EFlags(reg) ((reg).r_eflags)
+-#define BSDREG_Esp(reg) ((reg).r_esp)
+-#define BSDREG_SegSs(reg) ((reg).r_ss)
++#define BSDREG_Ebx(reg) BSD_REGS_STYLE(reg,EBX,ebx)
++#define BSDREG_Ecx(reg) BSD_REGS_STYLE(reg,ECX,ecx)
++#define BSDREG_Edx(reg) BSD_REGS_STYLE(reg,EDX,edx)
++#define BSDREG_Esi(reg) BSD_REGS_STYLE(reg,ESI,esi)
++#define BSDREG_Edi(reg) BSD_REGS_STYLE(reg,EDI,edi)
++#define BSDREG_Ebp(reg) BSD_REGS_STYLE(reg,EDP,ebp)
++#define BSDREG_Eax(reg) BSD_REGS_STYLE(reg,EAX,eax)
++#define BSDREG_Eip(reg) BSD_REGS_STYLE(reg,EIP,eip)
++#define BSDREG_SegCs(reg) BSD_REGS_STYLE(reg,CS,cs)
++#define BSDREG_EFlags(reg) BSD_REGS_STYLE(reg,EFLAGS,eflags)
++#define BSDREG_Esp(reg) BSD_REGS_STYLE(reg,ESP,esp)
++#define BSDREG_SegSs(reg) BSD_REGS_STYLE(reg,SS,ss)
+
+ #endif // BIT64
+
Home |
Main Index |
Thread Index |
Old Index