1 // Licensed to the .NET Foundation under one or more agreements. 2 // The .NET Foundation licenses this file to you under the MIT license. 3 // See the LICENSE file in the project root for more information. 4 5 using System; 6 using System.Diagnostics; 7 using System.Text; 8 9 namespace Internal.Diagnostics 10 { 11 public static class StackTraceHelper 12 { FormatStackTrace(IntPtr[] ips, bool includeFileInfo)13 public static string FormatStackTrace(IntPtr[] ips, bool includeFileInfo) 14 { 15 return FormatStackTrace(ips, 0, includeFileInfo); 16 } 17 FormatStackTrace(IntPtr[] ips, int skipFrames, bool includeFileInfo)18 public static string FormatStackTrace(IntPtr[] ips, int skipFrames, bool includeFileInfo) 19 { 20 return new StackTrace(ips, skipFrames, ips.Length, includeFileInfo).ToString(); 21 } 22 23 public static class SpecialIP 24 { 25 [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2111:PointersShouldNotBeVisible")] 26 public static IntPtr EdiSeparator = (IntPtr)1; // Marks a boundary where an ExceptionDispatchInfo rethrew an exception. 27 } 28 } 29 } 30