Hi,
Has anyone implemented SEH in their OS? I am not very sure what to do about it. Probable ways would be to use TRY and CATCH as macros to push exception handler in exception handler stack. There has to be one exception Handler stack per thread??
Or I can leverage some compiler try {} catch {} implementation. I am using gcc. Please let me know if any one has any pointers or suggestions on this.
Thanks,
Puneet
Implementation of SEH in your Kernel
Re: Implementation of SEH in your Kernel
Yes, each thread should have it's own exception handler list.
In my OS, there's a preliminary version of SEH. Processor exception handlers build an exception frame and pass it to the exception dispatcher, which calls every exception handler until one of them handles the exception. If the exception isn't handled, the debugger is invoked.
In my OS, there's a preliminary version of SEH. Processor exception handlers build an exception frame and pass it to the exception dispatcher, which calls every exception handler until one of them handles the exception. If the exception isn't handled, the debugger is invoked.
Re: Implementation of SEH in your Kernel
Thanks for your reply Gigasoft!!
What compiler are you using?? Have you created try { } Catch { } definitions in OS or are you using it what compiler defines?
Thanks,
Puneet
What compiler are you using?? Have you created try { } Catch { } definitions in OS or are you using it what compiler defines?
Thanks,
Puneet
Re: Implementation of SEH in your Kernel
My OS is written in assembly. Drivers call InstallEH and RemoveEH functions to install and remove exception handlers at the beginning and end of functions. I may also add support for C++ exceptions and other types of exception constructs that are implemented in various compilers later.