diff --git a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/ExceptionHandling.cs b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/ExceptionHandling.cs index 0d81978b677a9f..828c6f7a58d9ae 100644 --- a/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/ExceptionHandling.cs +++ b/src/coreclr/nativeaot/Runtime.Base/src/System/Runtime/ExceptionHandling.cs @@ -558,6 +558,7 @@ internal object ThrownException #if NATIVEAOT [RuntimeExport("RhThrowHwEx")] #endif + [StackTraceHidden] public static void RhThrowHwEx(uint exceptionCode, ref ExInfo exInfo) { #if NATIVEAOT @@ -644,6 +645,7 @@ public static void RhThrowHwEx(uint exceptionCode, ref ExInfo exInfo) #if NATIVEAOT [RuntimeExport("RhThrowEx")] #endif + [StackTraceHidden] public static void RhThrowEx(object exceptionObj, ref ExInfo exInfo) { #if NATIVEAOT @@ -725,6 +727,7 @@ public static void RhUnwindAndIntercept(ref ExInfo exInfo, UIntPtr interceptStac #if NATIVEAOT [RuntimeExport("RhRethrow")] #endif + [StackTraceHidden] public static void RhRethrow(ref ExInfo activeExInfo, ref ExInfo exInfo) { #if NATIVEAOT @@ -742,6 +745,7 @@ public static void RhRethrow(ref ExInfo activeExInfo, ref ExInfo exInfo) FallbackFailFast(RhFailFastReason.InternalError, null); } + [StackTraceHidden] private static void DispatchEx(scoped ref StackFrameIterator frameIter, ref ExInfo exInfo) { Debug.Assert(exInfo._passNumber == 1, "expected asm throw routine to set the pass"); @@ -997,6 +1001,7 @@ private static void UpdateStackTrace(object exceptionObj, UIntPtr curFramePtr, I prevFramePtr = curFramePtr; } + [StackTraceHidden] private static bool FindFirstPassHandler(object exception, uint idxStart, ref StackFrameIterator frameIter, out uint tryRegionIdx, out byte* pHandler) { @@ -1154,6 +1159,7 @@ private static void InvokeSecondPass(ref ExInfo exInfo, uint idxStart) { InvokeSecondPass(ref exInfo, idxStart, MaxTryRegionIdx); } + private static void InvokeSecondPass(ref ExInfo exInfo, uint idxStart, uint idxLimit) { EHEnum ehEnum;