diff --git a/docs/CallAnalyzer.md b/docs/CallAnalyzer.md index c6e31114..de97dc69 100644 --- a/docs/CallAnalyzer.md +++ b/docs/CallAnalyzer.md @@ -1,92 +1,108 @@ -# Call Analyzer - -This processing layer analyzes method instructions for calls to other methods and emits attributes based on that. - -For this processor, 8 new attributes are injected: -```cs -using System; -namespace Cpp2ILInjected.CallAnalysis; - -/// -/// This method's instructions have been deduplicated by the compiler, and it shares its address with other methods. -/// -[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] -public sealed class DeduplicatedMethodAttribute : Attribute -{ -} - -/// -/// A problem was encountered while analyzing this method's instructions. -/// -[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] -public sealed class CallAnalysisFailedAttribute : Attribute -{ -} - -/// -/// This method has no instructions to analyze and is not abstract nor an interface declaration. -/// -[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] -public sealed class CallAnalysisNotSupportedAttribute : Attribute -{ -} - -/// -/// This method is called from the method specified. -/// -/// -/// This attribute is not emitted if there are a large amount of callers. -/// -[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] -public sealed class CalledByAttribute : Attribute -{ - public Type? Type; - - public string? TypeFullName; - - public string Member; -} - -/// -/// This method calls the method specified. -/// -[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] -public sealed class CallsAttribute : Attribute -{ - public Type? Type; - - public string? TypeFullName; - - public string Member; -} - -/// -/// The number of direct calls to this method. -/// -/// -/// This attribute is similar in form and function to the one generated by Unhollower. -/// -[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] -public sealed class CallerCountAttribute : Attribute -{ - public int Count; -} - -/// -/// This method calls at least one deduplicated method. -/// -[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] -public sealed class CallsDeduplicatedMethodsAttribute : Attribute -{ - public int Count; -} - -/// -/// This method calls at least one unknown method. -/// -[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] -public sealed class CallsUnknownMethodsAttribute : Attribute -{ - public int Count; -} +# Call Analyzer + +This processing layer analyzes method instructions for calls to other methods and emits attributes based on that. + +For this processor, 9 new attributes are injected: +```cs +using System; +namespace Cpp2ILInjected.CallAnalysis; + +/// +/// This method's instructions have been deduplicated by the compiler, and it shares its address with other methods. +/// +[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] +public sealed class DeduplicatedMethodAttribute : Attribute +{ +} + +/// +/// This method has no instructions to analyze and is not abstract nor an interface declaration. +/// +[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] +public sealed class CallAnalysisNotSupportedAttribute : Attribute +{ +} + +/// +/// This method is called from the method specified. +/// +/// +/// This attribute is not emitted if there are a large amount of callers. +/// +[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] +public sealed class CalledByAttribute : Attribute +{ + public object Type; + + public string Member; + + public object[] MemberTypeParameters; + + public object[] MemberParameters; + + public object ReturnType; +} + +/// +/// This method calls the method specified. +/// +[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] +public sealed class CallsAttribute : Attribute +{ + public object Type; + + public string Member; + + public object[] MemberTypeParameters; + + public object[] MemberParameters; + + public object ReturnType; +} + +/// +/// The number of direct calls to this method. +/// +/// +/// This attribute is similar in form and function to the one generated by Unhollower. +/// +[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] +public sealed class CallerCountAttribute : Attribute +{ + public int Count; +} + +/// +/// This method calls at least one deduplicated method. +/// +[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] +public sealed class CallsDeduplicatedMethodsAttribute : Attribute +{ + public int Count; +} + +/// +/// This method calls at least one unknown method. +/// +[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] +public sealed class CallsUnknownMethodsAttribute : Attribute +{ + public int Count; +} + +/// +/// This method contains at least one instruction that is invalid. +/// +[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] +public sealed class ContainsInvalidInstructionsAttribute : Attribute +{ +} + +/// +/// This method contains at least one instruction that is not implemented. +/// +[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] +public sealed class ContainsUnimplementedInstructionsAttribute : Attribute +{ +} ```