MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / PrintDebug

Function PrintDebug

extensions/dhooks/DynamicHooks/hook.cpp:233–255  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231}
232
233void PrintDebug(x64JitWriter& jit, const char* message) {
234 // LogMessage has variadic parameters, this shouldn't be problem on x86_64
235 // but paranoia calls for safety
236 /*
237 union {
238 void (*PrintFunc)(const char* message);
239 std::uint64_t address;
240 } func;
241
242 func.PrintFunc = &PrintFunc;
243
244 // Shadow space
245 MSVC_ONLY(jit.sub(rsp, 40));
246
247 MSVC_ONLY(jit.mov(rcx, reinterpret_cast<std::uint64_t>(message)));
248 GCC_ONLY(jit.mov(rdi, reinterpret_cast<std::uint64_t>(message)));
249
250 jit.mov(rax, func.address);
251 jit.call(rax);
252
253 // Free shadow space
254 MSVC_ONLY(jit.add(rsp, 40));*/
255}
256
257void _PrintRegs(std::uint64_t* rsp, int numregs) {
258 g_pSM->LogMessage(myself, "RSP - %p", rsp);

Callers 2

CreateBridgeMethod · 0.85
CreatePostCallbackMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected