1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
5 using Internal.Runtime.CompilerServices;
7 namespace Internal.Runtime.Augments
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
14 /// Internal.Runtime.Augments.RuntimeAugments.InitializeStackTraceMetadataSupport(StackTraceMetadataCallbacks callbacks);
17 [System.Runtime.CompilerServices.ReflectionBlocked]
19 public abstract class StackTraceMetadataCallbacks
22 /// Helper function to format a given method address using the stack trace metadata.
23 /// Return null if stack trace information is not available.
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);