SamboyCoding / Cpp2IL

Work-in-progress tool to reverse unity's IL2CPP toolchain.
MIT License
1.6k stars 187 forks source link

Throw Detection in Call Analysis #174

Closed ds5678 closed 7 months ago

ds5678 commented 1 year ago

It might be useful to detect exception throws and report their use as injected attributes in Call Analysis.

public sealed class ThrowsAttribute : Attribute
{
    public Type Type;
}

Notes from the Discord conversation:

Open Questions:

References: https://github.com/SamboyCoding/Cpp2IL/blob/new-analysis/Cpp2IL.Core/Analysis/Actions/x86/Important/CallExceptionThrowerFunction.cs

ds5678 commented 7 months ago

With native method detection implemented, I no longer see much justification for this feature. The constructor calls show up clearly in the analysis, even if some traversal is required.