コード例 #1
0
ファイル: SigHandler.cpp プロジェクト: L-EARN/NoCheatZ-4
void BaseFilter ( LPEXCEPTION_POINTERS info )
{
	FILE* outfile = OpenStackFile ();

	FILE* out;
	if( outfile == nullptr )
	{
		out = stderr;
	}
	else
	{
		out = outfile;
	}

	fprintf ( out, "Caught Unhandled Exception code %X :\nFlags : %X\nAddress : %X\n", 
			  info->ExceptionRecord->ExceptionCode,
			  info->ExceptionRecord->ExceptionFlags,
			  info->ExceptionRecord->ExceptionAddress );

	StackWalker_OutFile sw ( out );
	sw.ShowCallstack (GetCurrentThread(), info->ContextRecord);

	if( outfile )
		fclose ( outfile );
}
コード例 #2
0
ファイル: SigHandler.cpp プロジェクト: SM91337/NoCheatZ-4
void BaseFilter ( LPEXCEPTION_POINTERS info )
{
	FILE* outfile = OpenStackFile ();

	FILE* out;
	if( outfile == nullptr )
	{
		out = stderr;
	}
	else
	{
		out = outfile;
	}

	fprintf ( out,  "Caught Unhandled Exception code 0x%X :\n"
					"Flags : 0x%X\n"
					"Address : 0x%X\n"
					"Dr0 : 0x%X, Dr1 : 0x%X, Dr2 : 0x%X, Dr3 : 0x%X, Dr6 : 0x%X, Dr7 : 0x%X\n"
					"eax : 0x%X, ebp : 0x%X, ecx : 0x%X, edi : 0x%X\n"
					"edx : 0x%X, eip : 0x%X, esi : 0x%X, esp : 0x%X\n",
			  info->ExceptionRecord->ExceptionCode,
			  info->ExceptionRecord->ExceptionFlags,
			  (DWORD)info->ExceptionRecord->ExceptionAddress,
				info->ContextRecord->Dr0,
				info->ContextRecord->Dr1,
				info->ContextRecord->Dr2,
				info->ContextRecord->Dr3,
				info->ContextRecord->Dr6,
				info->ContextRecord->Dr7,
				info->ContextRecord ->Eax,
				info->ContextRecord ->Ebp,
				info->ContextRecord ->Ecx,
				info->ContextRecord ->Edi,
				info->ContextRecord ->Edx,
				info->ContextRecord ->Eip,
				info->ContextRecord ->Esi,
				info->ContextRecord ->Esp
		);

	StackWalker_OutFile sw ( out );
	sw.ShowCallstack (GetCurrentThread(), info->ContextRecord);

	if( outfile )
		fclose ( outfile );
}