metamod-source icon indicating copy to clipboard operation
metamod-source copied to clipboard

x64 windows sourcehook hookmangen

Open Kenzzer opened this issue 1 year ago • 1 comments

Add x64 dynamic hook support to SourceHook, Windows only

  • Added x64GenContext to generate SourceHook virtual stubs on x86_64
  • GenBuffer has been moved to sh_asm.h, since it's only ever used to allocate blocks of memories where assembly is written at
  • x64JitWriter (inheriting from GenBuffer). It's a collection of helper functions to write x86_64 assembly bytes
  • Added IGenContext in order to keep a single implementation of CHookManagerAutoGen that can be compiled on all architectures. Consequently, x64GenContext & GenContext inherit from IGenContext

This is already a massive PR as it is. And I really don't want to be adding Linux support right now, but it will come shortly after rest assured.

Kenzzer avatar Apr 20 '24 12:04 Kenzzer

@dvander @TheDS @peace-maker

I believe you'll be the ones that want to look most at this, given it's pertaining to sourcehook. My goal is to have this PR merged, before I make any further changes for linux support.

Kenzzer avatar May 16 '24 21:05 Kenzzer