From: Inhwan Lee Date: Tue, 25 Apr 2017 04:55:35 +0000 (+0900) Subject: set env UNW_ARM_UNWIND_METHOD value on ARM platform X-Git-Tag: accepted/tizen/unified/20170426.195625~2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3b7059d73a89354e085156eda18af02892ecc828;p=platform%2Fcore%2Fdotnet%2Flauncher.git set env UNW_ARM_UNWIND_METHOD value on ARM platform Change-Id: Iab10502bc55f5bea33cf553a14838bdb56f6afd2 --- diff --git a/NativeLauncher/launcher/dotnet/dotnet_launcher.cc b/NativeLauncher/launcher/dotnet/dotnet_launcher.cc index d3df80e..c0b5300 100644 --- a/NativeLauncher/launcher/dotnet/dotnet_launcher.cc +++ b/NativeLauncher/launcher/dotnet/dotnet_launcher.cc @@ -73,6 +73,20 @@ CoreRuntime::~CoreRuntime() int CoreRuntime::initialize(bool standalone) { +#ifdef __arm__ + // libunwind library is used to unwind stack frame, but libunwind for ARM + // does not support ARM vfpv3/NEON registers in DWARF format correctly. + // Therefore let's disable stack unwinding using DWARF information + // See https://github.com/dotnet/coreclr/issues/6698 + // + // libunwind use following methods to unwind stack frame. + // UNW_ARM_METHOD_ALL 0xFF + // UNW_ARM_METHOD_DWARF 0x01 + // UNW_ARM_METHOD_FRAME 0x02 + // UNW_ARM_METHOD_EXIDX 0x04 + putenv(const_cast("UNW_ARM_UNWIND_METHOD=6")); +#endif // __arm__ + if (standalone) { const char *deviceApiDirectory = getenv("__deviceAPIDirectory"); const char *runtimeDirectory = getenv("__runtimeDirectory"); diff --git a/NativeLauncher/launcher/dotnet/scd_launcher.cc b/NativeLauncher/launcher/dotnet/scd_launcher.cc index 029e93c..7bbd883 100644 --- a/NativeLauncher/launcher/dotnet/scd_launcher.cc +++ b/NativeLauncher/launcher/dotnet/scd_launcher.cc @@ -266,7 +266,7 @@ int executeManagedAssembly(const char* currentExeAbsolutePath, // Indicates failure int exitCode = -1; -#ifdef _ARM_ +#ifdef __arm__ // libunwind library is used to unwind stack frame, but libunwind for ARM // does not support ARM vfpv3/NEON registers in DWARF format correctly. // Therefore let's disable stack unwinding using DWARF information @@ -278,7 +278,7 @@ int executeManagedAssembly(const char* currentExeAbsolutePath, // UNW_ARM_METHOD_FRAME 0x02 // UNW_ARM_METHOD_EXIDX 0x04 putenv(const_cast("UNW_ARM_UNWIND_METHOD=6")); -#endif // _ARM_ +#endif // __arm__ std::string coreClrDllPath(clrFilesAbsolutePath); coreClrDllPath.append("/");