6a48e27a579b8449c80a2cba792cc2f8ff0ef686
[platform/upstream/dotnet/runtime.git] /
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
4 using System;
5 using Internal.Runtime.CompilerServices;
6
7 namespace Internal.Runtime.Augments
8 {
9     /// <summary>
10     /// This helper class is used to access metadata-based resolution of call stack addresses.
11     /// To activate the stack trace resolution support, set up an instance of a class
12     /// derived from this one using the method
13     ///
14     /// Internal.Runtime.Augments.RuntimeAugments.InitializeStackTraceMetadataSupport(StackTraceMetadataCallbacks callbacks);
15     ///
16     /// </summary>
17     [System.Runtime.CompilerServices.ReflectionBlocked]
18     [CLSCompliant(false)]
19     public abstract class StackTraceMetadataCallbacks
20     {
21         /// <summary>
22         /// Helper function to format a given method address using the stack trace metadata.
23         /// Return null if stack trace information is not available.
24         /// </summary>
25         /// <param name="methodStartAddress">Memory address representing the start of a method</param>
26         /// <returns>Formatted method name or null if metadata for the method is not available</returns>
27         public abstract string TryGetMethodNameFromStartAddress(IntPtr methodStartAddress);
28     }
29 }