Skip to content

Commit

Permalink
Implement a hook gate for FunctionHook. Make CallTrace work with it.
Browse files Browse the repository at this point in the history
* A state object can now be passed to FunctionHook and retrieved.
* The current FunctionHook is now accessible from a FunctionHook.Current static
  property, thanks to bookkeeping by the hook gate.
* The hook gate guards against deadlocks and stack overflows from hook
  reentrancy and loader lock issues.
* Clean up resource management in FunctionHook so that leaks are no longer
  possible in exceptional circumstances.

Closes #32.
  • Loading branch information
alexrp committed Jul 21, 2022
1 parent d0164cf commit b2bd417
Show file tree
Hide file tree
Showing 5 changed files with 462 additions and 180 deletions.
2 changes: 2 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
<Using Include="System.Runtime.ExceptionServices" />
<Using Include="System.Runtime.InteropServices" />
<Using Include="System.Runtime.InteropServices.ComTypes" />
<Using Include="System.Runtime.Intrinsics"
Condition="'$(TargetFramework)' != 'netstandard2.0'" />
<Using Include="System.Text" />
<Using Include="System.Threading" />
</ItemGroup>
Expand Down
Loading

0 comments on commit b2bd417

Please sign in to comment.