Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZoltan Varga <vargaz@gmail.com>2020-09-09 00:52:33 +0300
committerGitHub <noreply@github.com>2020-09-09 00:52:33 +0300
commit6e103e7191dcb17120032f2516cc7f8e9e04c32e (patch)
treea3ee2ea7450809dac229fc084683df3f335942ad /netcore/System.Private.CoreLib/src/System/Diagnostics
parent427395f4c6a18466c26d0cf782bed106d05e77ae (diff)
Remove netcore/ directory from the mono/mono repository. (#20361)
Diffstat (limited to 'netcore/System.Private.CoreLib/src/System/Diagnostics')
-rw-r--r--netcore/System.Private.CoreLib/src/System/Diagnostics/Debugger.cs44
-rw-r--r--netcore/System.Private.CoreLib/src/System/Diagnostics/StackFrame.Mono.cs54
-rw-r--r--netcore/System.Private.CoreLib/src/System/Diagnostics/StackTrace.Mono.cs86
3 files changed, 0 insertions, 184 deletions
diff --git a/netcore/System.Private.CoreLib/src/System/Diagnostics/Debugger.cs b/netcore/System.Private.CoreLib/src/System/Diagnostics/Debugger.cs
deleted file mode 100644
index 1692021801c..00000000000
--- a/netcore/System.Private.CoreLib/src/System/Diagnostics/Debugger.cs
+++ /dev/null
@@ -1,44 +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.Runtime.CompilerServices;
-
-namespace System.Diagnostics
-{
- public static class Debugger
- {
- public static readonly string DefaultCategory = "";
-
- public static bool IsAttached => IsAttached_internal ();
-
- [MethodImplAttribute (MethodImplOptions.InternalCall)]
- extern static bool IsAttached_internal ();
-
- [Intrinsic]
- public static void Break ()
- {
- // The JIT inserts a breakpoint on the caller.
- }
-
- [MethodImplAttribute (MethodImplOptions.InternalCall)]
- public static extern bool IsLogging();
-
- public static bool Launch ()
- {
- throw new NotImplementedException ();
- }
-
- [MethodImplAttribute (MethodImplOptions.InternalCall)]
- static extern void Log_icall (int level, ref string category, ref string message);
-
- public static void Log (int level, string category, string message)
- {
- Log_icall (level, ref category, ref message);
- }
-
- public static void NotifyOfCrossThreadDependency ()
- {
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/src/System/Diagnostics/StackFrame.Mono.cs b/netcore/System.Private.CoreLib/src/System/Diagnostics/StackFrame.Mono.cs
deleted file mode 100644
index 35bada2fb23..00000000000
--- a/netcore/System.Private.CoreLib/src/System/Diagnostics/StackFrame.Mono.cs
+++ /dev/null
@@ -1,54 +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.Reflection;
-using System.Runtime.CompilerServices;
-using System.Text;
-
-namespace System.Diagnostics
-{
- partial class StackFrame
- {
- internal StackFrame (MonoStackFrame monoStackFrame, bool needFileInfo)
- {
- _method = monoStackFrame.methodBase;
- _nativeOffset = monoStackFrame.nativeOffset;
- _ilOffset = monoStackFrame.ilOffset;
-
- if (needFileInfo) {
- _fileName = monoStackFrame.fileName;
- _lineNumber = monoStackFrame.lineNumber;
- _columnNumber = monoStackFrame.columnNumber;
- }
-
- _isLastFrameFromForeignExceptionStackTrace = monoStackFrame.isLastFrameFromForeignException;
- }
-
- [MethodImplAttribute (MethodImplOptions.NoInlining)]
- void BuildStackFrame (int skipFrames, bool needFileInfo)
- {
- const int SystemDiagnosticsStackDepth = 3;
-
- if (skipFrames + SystemDiagnosticsStackDepth < 0 || !get_frame_info (skipFrames + SystemDiagnosticsStackDepth, needFileInfo, out var method, out var ilOffset, out var nativeOffset, out var fileName, out var line, out var column))
- return;
-
- _method = method;
- _ilOffset = ilOffset;
- _nativeOffset = nativeOffset;
-
- if (needFileInfo) {
- _fileName = fileName;
- _lineNumber = line;
- _columnNumber = column;
- }
- }
-
- bool AppendStackFrameWithoutMethodBase (StringBuilder sb) => false;
-
- [MethodImplAttribute (MethodImplOptions.InternalCall)]
- static extern bool get_frame_info (int skipFrames, bool needFileInfo,
- out MethodBase method, out int ilOffset, out int nativeOffset, out string file, out int line, out int column);
-
- }
-}
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);
- }
- }
- }
-}