Browse Source

fault: fix calling convention

This should have been part of the previous commit 😊
pull/78/head
Robin Eklind 7 years ago
parent
commit
9462aa782b
  1. 8
      Source/fault.cpp
  2. 8
      Source/fault.h

8
Source/fault.cpp

@ -26,12 +26,12 @@ void __cdecl fault_init_filter()
void __cdecl fault_cleanup_filter_atexit()
{
atexit(fault_cleanup_filter);
atexit((void *)fault_cleanup_filter);
}
void __cdecl fault_cleanup_filter(void)
LPTOP_LEVEL_EXCEPTION_FILTER __cdecl fault_cleanup_filter()
{
fault_reset_filter(&fault_unused);
return fault_reset_filter(&fault_unused);
}
LONG __stdcall TopLevelExceptionFilter(PEXCEPTION_POINTERS ExceptionInfo)
@ -247,7 +247,7 @@ void __fastcall fault_set_filter(void *unused)
lpTopLevelExceptionFilter = SetUnhandledExceptionFilter((LPTOP_LEVEL_EXCEPTION_FILTER)TopLevelExceptionFilter);
}
LPTOP_LEVEL_EXCEPTION_FILTER __cdecl fault_reset_filter(void *unused)
LPTOP_LEVEL_EXCEPTION_FILTER __fastcall fault_reset_filter(void *unused)
{
return SetUnhandledExceptionFilter(lpTopLevelExceptionFilter);
}

8
Source/fault.h

@ -7,19 +7,19 @@ typedef struct STACK_FRAME {
void *pCallRet;
} STACK_FRAME;
//int dword_52B9F4;
extern LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter; // idb
extern int fault_unused;
extern LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter;
void __cdecl fault_init_filter();
void __cdecl fault_cleanup_filter_atexit();
void __cdecl fault_cleanup_filter(void);
LPTOP_LEVEL_EXCEPTION_FILTER __cdecl fault_cleanup_filter();
LONG __stdcall TopLevelExceptionFilter(PEXCEPTION_POINTERS ExceptionInfo);
void __fastcall fault_hex_format(BYTE *ptr, unsigned int numBytes);
void __fastcall fault_unknown_module(LPCVOID lpAddress, LPSTR lpModuleName, int iMaxLength, int *sectionNum, int *sectionOffset);
void __fastcall fault_call_stack(void *instr, STACK_FRAME *stackAddr);
char *__fastcall fault_get_error_type(DWORD dwMessageId, LPSTR lpString1, DWORD nSize);
void __fastcall fault_set_filter(void *unused);
LPTOP_LEVEL_EXCEPTION_FILTER __cdecl fault_reset_filter(void *unused);
LPTOP_LEVEL_EXCEPTION_FILTER __fastcall fault_reset_filter(void *unused);
LPTOP_LEVEL_EXCEPTION_FILTER __cdecl fault_get_filter();
#endif /* __FAULT_H__ */

Loading…
Cancel
Save