alliedmodders / sourcemod

SourceMod - Source Engine Scripting and Administration
http://www.sourcemod.net/
970 stars 423 forks source link

[Feature Request/Discussion] DHooks x64 #2114

Open sapphonie opened 6 months ago

sapphonie commented 6 months ago

With the looming spectre of TF2's x64 branch, there hasn't been much discussion on updating DHooks to support x64, which a significant amount of plugins rely on. I figured I would make an issue so there is a place to keep track of discussion about that.

peace-maker commented 6 months ago

DHooks is built on two libraries to allow dynamic hooking of functions during runtime which both only support x86.

SoureHook AutoGen to hijack virtual functions with arbitrary signatures DynamicHooks (modified) for non-virtual functions

Both need individual support for x86_64 codegen and the respective calling convention, while technically all functions can be detoured, so for basic functionality DynamicHooks could be enough to upgrade first. The macro assembler library in the sourcepawn vm might need some additional instructions too.

bottiger1 commented 4 months ago

Is anyone working on this?

Dynamichooks appears to have been forked for 64bit support but it requires C++20 and 4 more libs so I don't know if that would be accepted into sourcemod. https://github.com/qubka/DynoHook

dvander commented 4 months ago

What libs? As long as no coroutines cxx20 might be fineOn May 7, 2024 12:32 PM, bottiger1 @.***> wrote: Is anyone working on this? Dynamichooks appears to have been forked for 64bit support but it requires C++20 and 4 more libs so I don't know if that would be accepted into sourcemod. https://github.com/qubka/DynoHook

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

bottiger1 commented 4 months ago

asmjit asmtk catch2 zydis

Note that I'm just pointing out that there's a replacement for dynamichooks, I'm not volunteering to update dhooks.

I took a quick glance at the code and it looks difficult to get familiarized with and I only have maybe 5 sourcepawn plugins that use it only because I was too lazy to make an extension.