Add __C_specific_handler() and _except_handler3() stubs allowing to use '__try {} __except() {}' (SEH) constructions
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
Rafal Kupiec 2023-02-25 23:01:13 +01:00
parent 57dee5c535
commit 2f1c5a22a5
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
3 changed files with 74 additions and 1 deletions

View File

@ -35,7 +35,8 @@ list(APPEND XTOSKRNL_SOURCE
${XTOSKRNL_SOURCE_DIR}/rtl/plist.c
${XTOSKRNL_SOURCE_DIR}/rtl/string.c
${XTOSKRNL_SOURCE_DIR}/rtl/widestr.c
${XTOSKRNL_SOURCE_DIR}/rtl/${ARCH}/dispatch.c)
${XTOSKRNL_SOURCE_DIR}/rtl/${ARCH}/dispatch.c
${XTOSKRNL_SOURCE_DIR}/rtl/${ARCH}/exsup.c)
# Set module definition SPEC file
set_specfile(xtoskrnl.spec)

View File

@ -0,0 +1,36 @@
/**
* PROJECT: ExectOS
* COPYRIGHT: See COPYING.md in the top level directory
* FILE: xtoskrnl/rtl/amd64/exsup.c
* DESCRIPTION: Exception handling for AMD64 architecture
* DEVELOPERS: Rafal Kupiec <belliash@codingworkshop.eu.org>
*/
#include <xtos.h>
XTAPI
EXCEPTION_DISPOSITION
__C_specific_handler(IN PEXCEPTION_RECORD ExceptionRecord,
IN PVOID EstablisherFrame,
IN OUT PCONTEXT ContextRecord,
IN OUT PVOID DispatcherContext)
{
UNIMPLEMENTED;
/* Continue execution */
return ExceptionContinueExecution;
}
XTCDECL
INT
_except_handler3(PEXCEPTION_RECORD ExceptionRecord,
PVOID Registration,
PCONTEXT Context,
PVOID Dispatcher)
{
UNIMPLEMENTED;
/* Handler not found */
return 0;
}

36
xtoskrnl/rtl/i686/exsup.c Normal file
View File

@ -0,0 +1,36 @@
/**
* PROJECT: ExectOS
* COPYRIGHT: See COPYING.md in the top level directory
* FILE: xtoskrnl/rtl/i686/exsup.c
* DESCRIPTION: Exception handling for i686 architecture
* DEVELOPERS: Rafal Kupiec <belliash@codingworkshop.eu.org>
*/
#include <xtos.h>
XTCDECL
EXCEPTION_DISPOSITION
__C_specific_handler(IN PEXCEPTION_RECORD ExceptionRecord,
IN PVOID EstablisherFrame,
IN OUT PCONTEXT ContextRecord,
IN OUT PVOID DispatcherContext)
{
UNIMPLEMENTED;
/* Continue execution */
return ExceptionContinueExecution;
}
XTCDECL
INT
_except_handler3(PEXCEPTION_RECORD ExceptionRecord,
PVOID Registration,
PCONTEXT Context,
PVOID Dispatcher)
{
UNIMPLEMENTED;
/* Handler not found */
return 0;
}