Commit 6262cc32 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

ntdll: Return from snoop tracing helpers earlier if tracing is disabled.

This allows turning off and on snooping from task manager. Signed-off-by: 's avatarDmitry Timoshkov <dmitry@baikal.ru> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 52e35a09
......@@ -1085,6 +1085,8 @@ void WINAPI __regs_SNOOP_Entry( CONTEXT *context )
context->Eip = (DWORD)fun->origfun;
if (!TRACE_ON(snoop)) return;
if (TRACE_ON(timestamp))
print_timestamp();
if (fun->name) DPRINTF("%04x:CALL %s.%s(",GetCurrentThreadId(),dll->name,fun->name);
......@@ -1121,6 +1123,12 @@ void WINAPI __regs_SNOOP_Return( CONTEXT *context )
if (ret->dll->funs[ret->ordinal].nrofargs<0)
ret->dll->funs[ret->ordinal].nrofargs=(context->Esp - ret->origESP-4)/4;
context->Eip = (DWORD)ret->origreturn;
if (!TRACE_ON(snoop)) {
ret->origreturn = NULL; /* mark as empty */
return;
}
if (TRACE_ON(timestamp))
print_timestamp();
if (ret->args) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment