summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCHUNSEOK LEE <chunseok.lee@samsung.com>2017-08-03 13:37:45 +0900
committerCHUNSEOK LEE <chunseok.lee@samsung.com>2017-08-04 10:46:54 +0900
commit02b4b7fc4ef81e0edf3c85f01c34c602b5f5a9c3 (patch)
tree55446f3432f45e307052b5ed2cd071d82b11b126
parent42385c444b3a27f308007f0ffb2c8037ac501eb9 (diff)
downloadcoreclr-submit/tizen/20170804.085043.tar.gz
coreclr-submit/tizen/20170804.085043.tar.bz2
coreclr-submit/tizen/20170804.085043.zip
Change-Id: I10db038117d0dd6e0ec5100178256a49df104b59
-rw-r--r--packaging/0001-ARM-Linux-Enable-DacStackWalk.patch77
-rw-r--r--packaging/0001-Fix-CreateDump-related-undefined-reference-on-non-AM.patch63
-rw-r--r--packaging/coreclr.spec7
3 files changed, 145 insertions, 2 deletions
diff --git a/packaging/0001-ARM-Linux-Enable-DacStackWalk.patch b/packaging/0001-ARM-Linux-Enable-DacStackWalk.patch
new file mode 100644
index 0000000000..8da163cc23
--- /dev/null
+++ b/packaging/0001-ARM-Linux-Enable-DacStackWalk.patch
@@ -0,0 +1,77 @@
+From 8cd27865beb06105789cf52dc4ea472ea30da97d Mon Sep 17 00:00:00 2001
+From: Jonghyun Park <parjong@gmail.com>
+Date: Thu, 6 Jul 2017 15:42:51 +0900
+Subject: [PATCH] [ARM/Linux] Enable DacStackWalk
+
+For ARM/Linux, DacUnwindStackFrame failed to unwind stack frame due to
+the mismatch between RUNTIME_FUNCTION and IMAGE_ARM_RUNTIME_FUNCTION_ENTRY.
+
+ClrStack SOS command currently does not work due to this bug.
+
+This commit fixes this mismatch and re-enables ClrStack SOS command.
+---
+ src/unwinder/arm/unwinder_arm.cpp | 14 +++++---------
+ 1 file changed, 5 insertions(+), 9 deletions(-)
+
+diff --git a/src/unwinder/arm/unwinder_arm.cpp b/src/unwinder/arm/unwinder_arm.cpp
+index 6b1f686..6228b01 100644
+--- a/src/unwinder/arm/unwinder_arm.cpp
++++ b/src/unwinder/arm/unwinder_arm.cpp
+@@ -647,7 +647,7 @@ Return Value:
+ HRESULT
+ RtlpUnwindFunctionCompact(
+ __in ULONG ControlPcRva,
+- __in PIMAGE_ARM_RUNTIME_FUNCTION_ENTRY FunctionEntry,
++ __in PT_RUNTIME_FUNCTION FunctionEntry,
+ __inout PT_CONTEXT ContextRecord,
+ __out PULONG EstablisherFrame,
+ __deref_opt_out_opt PEXCEPTION_ROUTINE *HandlerRoutine,
+@@ -917,7 +917,7 @@ HRESULT
+ RtlpUnwindFunctionFull(
+ __in ULONG ControlPcRva,
+ __in ULONG ImageBase,
+- __in PIMAGE_ARM_RUNTIME_FUNCTION_ENTRY FunctionEntry,
++ __in PT_RUNTIME_FUNCTION FunctionEntry,
+ __inout PT_CONTEXT ContextRecord,
+ __out PULONG EstablisherFrame,
+ __deref_opt_out_opt PEXCEPTION_ROUTINE *HandlerRoutine,
+@@ -1444,7 +1444,7 @@ BOOL OOPStackUnwinderArm::Unwind(T_CONTEXT * pContext)
+ DWORD startingPc = pContext->Pc;
+ DWORD startingSp = pContext->Sp;
+
+- IMAGE_ARM_RUNTIME_FUNCTION_ENTRY Rfe;
++ T_RUNTIME_FUNCTION Rfe;
+ if (FAILED(GetFunctionEntry(DBS_EXTEND64(pContext->Pc), &Rfe, sizeof(Rfe))))
+ return FALSE;
+
+@@ -1511,17 +1511,13 @@ PEXCEPTION_ROUTINE RtlVirtualUnwind(
+ PEXCEPTION_ROUTINE handlerRoutine;
+ HRESULT res;
+
+- IMAGE_ARM_RUNTIME_FUNCTION_ENTRY rfe;
+- rfe.BeginAddress = FunctionEntry->BeginAddress;
+- rfe.UnwindData = FunctionEntry->UnwindData;
+-
+ ARM_UNWIND_PARAMS unwindParams;
+ unwindParams.ContextPointers = ContextPointers;
+
+ if ((FunctionEntry->UnwindData & 3) != 0)
+ {
+ res = RtlpUnwindFunctionCompact(ControlPc - ImageBase,
+- &rfe,
++ FunctionEntry,
+ ContextRecord,
+ EstablisherFrame,
+ &handlerRoutine,
+@@ -1533,7 +1529,7 @@ PEXCEPTION_ROUTINE RtlVirtualUnwind(
+ {
+ res = RtlpUnwindFunctionFull(ControlPc - ImageBase,
+ ImageBase,
+- &rfe,
++ FunctionEntry,
+ ContextRecord,
+ EstablisherFrame,
+ &handlerRoutine,
+--
+2.7.4
+
diff --git a/packaging/0001-Fix-CreateDump-related-undefined-reference-on-non-AM.patch b/packaging/0001-Fix-CreateDump-related-undefined-reference-on-non-AM.patch
new file mode 100644
index 0000000000..38d199c6f4
--- /dev/null
+++ b/packaging/0001-Fix-CreateDump-related-undefined-reference-on-non-AM.patch
@@ -0,0 +1,63 @@
+From 9b9c245549cf7bab23e62989951eaf74efed10b1 Mon Sep 17 00:00:00 2001
+From: Jonghyun Park <parjong@gmail.com>
+Date: Wed, 17 May 2017 23:37:01 +0900
+Subject: [PATCH] Fix CreateDump-related undefined reference on non-AMD64/Linux
+ platforms (#11635)
+
+---
+ src/ToolBox/SOS/Strike/CMakeLists.txt | 1 +
+ src/ToolBox/SOS/Strike/strike.cpp | 10 +++++-----
+ 2 files changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/src/ToolBox/SOS/Strike/CMakeLists.txt b/src/ToolBox/SOS/Strike/CMakeLists.txt
+index ff5f864..65c3f95 100644
+--- a/src/ToolBox/SOS/Strike/CMakeLists.txt
++++ b/src/ToolBox/SOS/Strike/CMakeLists.txt
+@@ -150,6 +150,7 @@ if(CLR_CMAKE_PLATFORM_ARCH_AMD64)
+ SOS_LIBRARY
+ createdump_lib
+ )
++ add_definitions(-DCREATE_DUMP_SUPPORTED)
+ endif(CLR_CMAKE_PLATFORM_LINUX)
+ set(SOS_SOURCES_ARCH
+ disasmX86.cpp
+diff --git a/src/ToolBox/SOS/Strike/strike.cpp b/src/ToolBox/SOS/Strike/strike.cpp
+index 1fff17f..7e01635 100644
+--- a/src/ToolBox/SOS/Strike/strike.cpp
++++ b/src/ToolBox/SOS/Strike/strike.cpp
+@@ -14370,17 +14370,17 @@ _EFN_GetManagedObjectFieldInfo(
+
+ #ifdef FEATURE_PAL
+
+-#ifdef __linux__
++#ifdef CREATE_DUMP_SUPPORTED
+ #include <dumpcommon.h>
+ #include "datatarget.h"
+ extern bool CreateDumpForSOS(const char* programPath, const char* dumpPathTemplate, pid_t pid, MINIDUMP_TYPE minidumpType, ICLRDataTarget* dataTarget);
+ extern bool g_diagnostics;
+-#endif // __linux__
++#endif // CREATE_DUMP_SUPPORTED
+
+ DECLARE_API(CreateDump)
+ {
+ INIT_API();
+-#ifdef __linux__
++#ifdef CREATE_DUMP_SUPPORTED
+ StringHolder sFileName;
+ BOOL normal = FALSE;
+ BOOL withHeap = FALSE;
+@@ -14440,9 +14440,9 @@ DECLARE_API(CreateDump)
+ {
+ Status = E_FAIL;
+ }
+-#else // __linux__
++#else // CREATE_DUMP_SUPPORTED
+ ExtErr("CreateDump not supported on this platform\n");
+-#endif // __linux__
++#endif // CREATE_DUMP_SUPPORTED
+ return Status;
+ }
+
+--
+2.7.4
+
diff --git a/packaging/coreclr.spec b/packaging/coreclr.spec
index 773064873e..4768692368 100644
--- a/packaging/coreclr.spec
+++ b/packaging/coreclr.spec
@@ -23,7 +23,7 @@ Source1000: downloaded_files.tar.gz
Source1001: %{name}.manifest
Source1002: libicu.tar.gz
Source1003: dep_libs.tar.gz
-# Gbp-Ignore-Patches: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
+# Gbp-Ignore-Patches: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Patch0: Add-project.assets.json-files.patch
Patch1: Add-Tizen-RuntimeID-case.patch
Patch2: Change-O3-build-in-clang3.8.patch
@@ -39,7 +39,8 @@ Patch11: Add-skipped-testcase-superpmi.patch
Patch12: tizen-toolchain-support.patch
Patch13: poison1.patch
Patch14: poison2.patch
-
+Patch15: 0001-Fix-CreateDump-related-undefined-reference-on-non-AM.patch
+Patch16: 0001-ARM-Linux-Enable-DacStackWalk.patch
ExcludeArch: aarch64
BuildRequires: python
@@ -145,6 +146,8 @@ cp %{SOURCE1001} .
%patch12 -p1
%patch13 -p1
%patch14 -p1
+%patch15 -p1
+%patch16 -p1
%if 0%{skipmscorlib}
%else