diff options
author | Zoltan Varga <vargaz@gmail.com> | 2020-09-09 00:52:33 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-09 00:52:33 +0300 |
commit | 6e103e7191dcb17120032f2516cc7f8e9e04c32e (patch) | |
tree | a3ee2ea7450809dac229fc084683df3f335942ad /netcore/System.Private.CoreLib/src/System/Diagnostics/StackTrace.Mono.cs | |
parent | 427395f4c6a18466c26d0cf782bed106d05e77ae (diff) |
Remove netcore/ directory from the mono/mono repository. (#20361)
Diffstat (limited to 'netcore/System.Private.CoreLib/src/System/Diagnostics/StackTrace.Mono.cs')
-rw-r--r-- | netcore/System.Private.CoreLib/src/System/Diagnostics/StackTrace.Mono.cs | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/netcore/System.Private.CoreLib/src/System/Diagnostics/StackTrace.Mono.cs b/netcore/System.Private.CoreLib/src/System/Diagnostics/StackTrace.Mono.cs deleted file mode 100644 index 07d417a8c9f..00000000000 --- a/netcore/System.Private.CoreLib/src/System/Diagnostics/StackTrace.Mono.cs +++ /dev/null @@ -1,86 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using System.Collections.Generic; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace System.Diagnostics -{ - // Need our own stackframe class since the shared version has its own fields - [StructLayout (LayoutKind.Sequential)] - class MonoStackFrame - { - #region Keep in sync with object-internals.h - internal int ilOffset; - internal int nativeOffset; - // Unused - internal long methodAddress; - // Unused - internal uint methodIndex; - internal MethodBase methodBase; - internal string fileName; - internal int lineNumber; - internal int columnNumber; - // Unused - internal string internalMethodName; - #endregion - - internal bool isLastFrameFromForeignException; - } - - partial class StackTrace - { - [MethodImplAttribute (MethodImplOptions.InternalCall)] - internal static extern MonoStackFrame[] get_trace (Exception e, int skipFrames, bool needFileInfo); - - [MethodImplAttribute (MethodImplOptions.NoInlining)] - void InitializeForCurrentThread (int skipFrames, bool needFileInfo) - { - skipFrames += 2; // Current method + parent ctor - - StackFrame sf; - var frames = new List<StackFrame> (); - while (skipFrames >= 0) { - sf = new StackFrame (skipFrames, needFileInfo); - if (sf.GetMethod () == null) { - break; - } - frames.Add (sf); - skipFrames++; - } - - _stackFrames = frames.ToArray (); - _numOfFrames = _stackFrames.Length; - } - - void InitializeForException (Exception e, int skipFrames, bool needFileInfo) - { - var frames = get_trace (e, skipFrames, needFileInfo); - _numOfFrames = frames.Length; - - int foreignFrames; - MonoStackFrame[] foreignExceptions = e.foreignExceptionsFrames; - - if (foreignExceptions != null) { - foreignFrames = foreignExceptions.Length; - _numOfFrames += foreignFrames; - - _stackFrames = new StackFrame [_numOfFrames]; - - for (int i = 0; i < foreignExceptions.Length; ++i) { - _stackFrames [i] = new StackFrame (foreignExceptions [i], needFileInfo); - } - } else { - _stackFrames = new StackFrame [_numOfFrames]; - foreignFrames = 0; - } - - for (int i = 0; i < frames.Length; ++i) { - _stackFrames [foreignFrames + i] = new StackFrame (frames [i], needFileInfo); - } - } - } -} |