summaryrefslogtreecommitdiff
path: root/src/inc/clrnt.h
AgeCommit message (Collapse)AuthorFilesLines
2020-03-25Linux/x86: fix build (#26594)Konstantin Baladurin1-0/+1
2018-08-29Define T_RUNTIME_FUNCTION in cross-bitness crossgen ARM32 (#19718)Egor Chesakov1-0/+2
* Allow 'Non-ARM Host managing ARM related code' scenario in src/inc/crosscomp.h * Restrict RtlUnwindEx RtlVirtualUnwind to X86 || FEATURE_PAL in src/inc/clrnt.h * Define PTR_RUNTIME_FUNCTION via T_RUNTIME_FUNCTION in src/inc/daccess.h
2018-08-23Deal with compilation warnings in VM in cross-bitness scenario (#18707)Egor Chesakov1-1/+1
2017-10-05[x86/Linux][SOS] Fix clrstack command of lldb sosplugin on x86 (#13973)Konstantin Baladurin1-1/+1
* [x86/Linux][SOS] Add support for x86 in GetContextFromFrame It's need for 'clrstack -f' command of SOS plugin on x86. * [x86/Linux] Fix RtlpGetFunctionEndAddress function We should use PTR_UNWIND_INFO instead of PUNWIND_INFO for pointer to UNWIND_INFO structure because it's pointer from other process and we need to use DAC to read data using it. * [x86/Linux][SOS] Define DEBUG_STACK_CONTEXT for x86 It's needed for 'clrstack -f' command in libsosplugin. * [x86/Linux] Fix undefined references in libmscordbi.so on x86 Asm block like following: __asm fnsave currentFPUState where currentFPUState is structure works with MSVC but leads to undefined reference currentFPUState in the binary with other compilers. So rewrite such asm blocks for them. This patch fixes error "Unable to load 'libmscordbi.so'" during execution of 'clrstack -f' command of SOS plugin on x86. * [x86/Linux] Fix calling convention inconsistency WINAPI and STDAPI are defined as __cdecl but in some cases functions with these attributes are called using stdcall calling convention. It leads to crashes during execution of 'clrstack -i' command of SOS plugin on x86.
2017-02-10Remove always defined FEATURE_CORECLRdanmosemsft1-2/+0
2017-01-23[x86/Linux] Enable FEATURE_EH_FUNCLETS (#8889)Jonghyun Park1-11/+11
* [x86/Linux] (Partially) Enable FEATURE_EH_FUNCLETS * Update CLR ABI Document * Add TODO (for Funclet Prolog/Epilog Gen)
2017-01-11[x86/Linux] Fix WIN64EXCEPTIONS build error (#8629)Jonghyun Park1-0/+44
* Move GetUnwindInfo and GetNumberOfUnwindInfos into the real code header This commit fixes #8342. * Use WIN64EXCEPTIONS instead of _TARGET_X86_ * Revise FaultingExceptionFrame This commit revises FaultingExceptionFrame to support WIN64EXCEPTIONS in x86/Linux port. * Add RUNTIME_FUNCTION__EndAddress as NYI * Revise regdisp.h * Revise eetwain.h * Comment out exinfo.cpp if WIN64EXCEPTIONS is defined * Revises excep.cpp * Fix mistmatch in ThrowControlForThread defintion * Revises cgenx86.cpp * Disable SEH-based exception handlers when WIN64EXCEPTIONS is defined * Revise stackwalk.cpp * Revise jitinterface.cpp * Revise readytorun.h * Revise dbgipcevents.h * Revise zapcode.cpp * Revise clrnt.h * Fix Windows build error * Mark FaultingExceptionFrame::UpdateRegDisplay as NYI * Revise per feedback * Revert #if defined(..) as #ifdef * Fix style changes * Fix style changes * Remove #undef _TARGET_X86_ * 2nd attempt to fix Windows build error * Revise per feedback * Revert the chagnes in clrdefinitions.cmake and add BIT32 in CMakeLists.txt * Use !BIT64 instead of BIT32 * Include exceptionhandling.cpp and gcinfodecoder.cpp in build This commit includes exceptionhandling.cpp and gcinfodecoder.cpp in build, and fixes related compile errors. * Fix COMPlus_EndCatch undefined reference * Fix build error * Fix GcInfoDecoder-related undefined references * Fix AdjustContextForVirtualStub undefined reference * Fix GetCallerSP undefined reference * Fix ResetThreadAbortState undefined reference * Attempt to fix Windows build error * Fix CLRNoCatchHandler undefined reference * Another attemp to fix Windows build error * Fix GetXXXFromRedirectedStubStackFrame undefined references * Fix Windows Build Error * Add RtlpGetFunctionEndAddress and RtlVirtualUnwind as NYI * Fix undefined references on JIT helpers * Enable Dummy Application Run with WIN64EXCEPTIONS * Revert "Move GetUnwindInfo and GetNumberOfUnwindInfos into the real code header" This reverts commit c2bad85ac1136be3c6fb6ad7eedc5b3814b2ab29. * Use indirect code header when WIN64EXCEPTIONS is enabled * Port 'SyncRegDisplayToCurrentContext' and 'FillRegDisplay' * Revise style 'RUNTIME_FUNCTION__SetUnwindInfoAddress' * Extract out HandlerData from #ifdef region * Add UNIXTODO * Add UNIXTODO * Port 'GetRegdisplayReturnValue' * Fix incorrect comment * Remove messages that mentions WIN32EXCEPTIONS * Revise AdjustContextForWriteBarrier * Port 'FaultingExceptionFrame::UpdateRegDisplay' * Extract out 'AdjustContextForVirtualStub' and 'CLRNoCatchHandler' from #ifdef region * Merge two #ifdef regions * Set WIN64EXCEPTIONS as a default for x86/Linux * Remove unnecessary #ifdef from ThrowControlForThread * Remove unnecessary stubs * Add Dependency Check between Compile Flags * Revise per feedback
2016-12-14Move RUNTIME_FUNCTION__BeginAddress into clrnt.h (#8632)Jonghyun Park1-2/+7
RUNTIME_FUNCTION__BeginAddress is defined in corcompile.h for x86, but is defined in clrnt.h for all the other architectures. This commit moves RUNTIME_FUNCTION__BeginAddress defines for x86 into clrnt.h to make it consistent.
2016-11-23[x86/linux] Fix redefined DISPATCHER_CONTEXT compile error (#8246)SaeHie Park1-7/+2
WIP, fix compile error for x86/Linux - add directive WIN32 to current DISPATCHER_CONTEXT in clrnt.h - add DISPATCHER_CONTEXT for x86 in palrt.h
2016-04-29ARM64: Enabling Crossgen End-to-End MscorlibKyungwoo Lee1-0/+8
Fixes https://github.com/dotnet/coreclr/issues/4350 Fixes https://github.com/dotnet/coreclr/issues/4615 This is a bit large change across VM/Zap/JIT to properly support crossgen scenario. 1. Fix incorrect `ldr` encoding with size. 2. Enforce JIT data following JIT code per method by allocating them together. This guarantees correct PC-relative encoding for such constant data access without fix-up. 3. For the general fix-up data acceess, use `adrp/add` instruction pairs with fix-ups. Two more relocations types are implemented in all sides. 4. Interface dispatch stub is now implemented which is needed for interface call for crossgen. I've verified hello world runs with mscorlib.ni.dll.
2016-04-20Merge pull request #4396 from pgavlin/AMD64UnwindHeaderPat Gavlin1-109/+1
Define the AMD64 unwind codes in their own header.
2016-04-18enable build of cross target components.Rahul Kumar1-0/+8
Currently only enabled for arm64
2016-04-18Define the AMD64 unwind codes in their own header.Pat Gavlin1-109/+1
This matches the CFI unwind codes and allows the JIT to be more precise about its includes.
2016-04-05Fix #1977: always create RBP chains on UnixBruce Forstall1-2/+23
The JIT will now always create RBP chains on Unix platforms. This includes in functions the use localloc. To do this, the VM is extended with a new Unix-only AMD64 unwind code: UWOP_SET_FPREG_LARGE. The existing unwind code which is used to establish a frame pointer, UWOP_SET_FPREG, requires that the frame pointer, when established, be no more than 240 bytes offset from the stack pointer. This doesn't work well for frames that use localloc. (Large frames without localloc are ok, because we don't report the frame pointer in the unwind info except for in functions with localloc or EnC.) The new unwind code has a 32-bit range. If used, UNWIND_INFO.FrameRegister must be set to the frame pointer register, and UNWIND_INFO.FrameOffset must be set to 15 (its maximum value). This code is followed by two UNWIND_CODEs that are combined to form its 32-bit offset. The high 4 bits must be zero. This offset is then scaled by 16. This result is used as the FP register offset from SP at the time the frame pointer is established.
2016-03-30Getting SOS to work on ARm64:Rama Krishnan Raghupathy1-6/+7
This mainly involved DACizing the VM code. A bulk edit for changing RUNTIME_FUNCTION to T_RUNTIME_FUNCTION [tfs-changeset: 1591667]
2016-01-28Support for CFI unwind infoKyungwoo Lee1-0/+1
For Unix targeting CoreRT, this will provide platform specific unwind info which is a dwarf format. Unlike window’s UNWIND_INFO, we won’t encode the format within RyuJit since it is not only complex/error-prone but also needs to be adjusted depending on platforms. Instead, CFI (call frame information) pseudo instructions are encoded, which will be passed to CoreRT/ObjectWriter which will translate them to directly emit CFI directives to LLVM MC stream to establish frames and layout eh_frame section. A jit flag is used to dynamically dispatch either Windows’s unwind blob or this CFI instruction table. No JIT/EE interface change is needed since the API already expects an opaque blob. Initially when I looked at what Clang does, the prologue and the sequence of CFI emissions are a bit different than Windows. Since we will emit the same sequence of code with the same runtime that we define, I assume this is unnecessary – I’ve verified the CFI sequence here can work correctly with libunwind. Basically we need only 3 operations – push reg is a combination of 1 and 2 below. 1. Allocation – increase stack frame. Normally subtract esp in x64. 2. Store – Copy a (callee save) register to stack (memory) 3. SaveFP – Set frame pointer register Since Windows operation is based on the relative value (all offsets, etc are computed from the current point), I also use the similar form of CFI instructions. So, mostly one window’s code corresponds to two CFIs – we might optimize this by aggregating allocation, but I’d like to keep the current syntax/semantic same as Windows. This results in a very simple transformation on par with Windows.
2016-01-27Update license headersdotnet-bot1-4/+3
2015-07-30Fix build break on Windows arm64Jan Kotas1-0/+3
[tfs-changeset: 1507960]
2015-07-27[aarch64] Initial aarch64/linux bring upGeoff Norton1-0/+16
2015-07-24Add ARM target for CoreCLR on Linux.Ben Pye1-0/+8
c_runtime/vprintf/test1 is disabled as casting NULL to va_list is against the C specification. Fix SetFilePointer tests on 32 bit platforms. Define _FILE_OFFSET_BITS=64 so that we have long file support on 32 bit platforms. Implement context capture/restore for ARM. Link libgcc_s before libunwind on ARM so C++ exceptions work. Translate armasm to gas syntax. Specify Thumb, VFPv3, ARMv7 for the ARM target. Add ARM configuration to mscorlib build Implement GetLogicalProcessorCacheSizeFromOS in PAL. Set UNWIND_CONTEXT_IS_UCONTEXT_T from configure check.
2015-02-13Simplify platform ifdefsJan Kotas1-6/+2
Simplify platform ifdefs like #if defined(_WIN64) || defined(_TARGET_ARM_) to #if !defined(_TARGET_X86_) based on @BruceForstall suggestion
2015-02-13Modify the windows amd64 unwinder to work as jitted code unwinder on UnixJan Vorlicek1-5/+25
Update the windows amd64 unwinder from its source to the latest version and add context pointers updating that was excluded before. Change methods of the OOPStackUnwinder and OOPStackUnwinderAMD64 to be static, since the base class has no data members and the unwinding is always using the processor specific subclass. Modify the code so that it is built in two flavors. The first one is the DAC flavor which is used by the debugger. The second one will be used for jitted code stack frames unwinding on non-Windows systems.
2015-01-30Initial commit to populate CoreCLR repo dotnet-bot1-0/+1025
[tfs-changeset: 1407945]