RayeR CZ, 24.07.2020, 13:15 |
User exception handler in C (Developers) |
Hi, is it possible/how to install user exception handler in user program in DJGPP (DOS) and MinGW (Windows) to catch CPU exception before OS/program will crash? Does DJGPP have it's own hander or is it catched by DPMI server or other memory manager in v86 mode like JEMM? Is it possible to resume from exception and continue normally? Eg. in case of RDMSR of nonexisting MSR exception is generated and it leads to crash or BSOD in Windows. There was some discussion about CPU-Z in Win9x that from VXD the exception cannot be catched and Windows will BSOD... --- |
Japheth Germany (South), 24.07.2020, 18:07 @ RayeR |
User exception handler in C |
> Is it possible to resume from exception and continue normally? --- |
Rugxulo Usono, 24.07.2020, 18:39 @ RayeR |
User exception handler in C |
> Hi, is it possible/how to install user exception handler in user program in |
tkchia 24.07.2020, 20:47 @ RayeR |
User exception handler in C |
Hello RayeR, --- |
RayeR CZ, 30.07.2020, 13:18 @ tkchia |
User exception handler in C |
Thanks, it led me to this example: --- |
tom Germany (West), 30.07.2020, 23:54 @ RayeR |
User exception handler in C |
> I'm not sure what all functions I can call from the handler, I would need |
RayeR CZ, 01.08.2020, 02:13 @ tom |
User exception handler in C |
> (f)printf requires a FILE object, which is at exception time possibly in --- |
Laaca Czech republic, 16.08.2020, 21:27 @ RayeR |
User exception handler in C |
The use of function "Signal" is very interresting. --- |
Laaca Czech republic, 16.08.2020, 22:38 @ Laaca |
User exception handler in C |
Aha, it was not so hard. --- |
Rugxulo Usono, 17.08.2020, 22:35 @ Laaca |
User exception handler in C |
> Aha, it was not so hard. |
marcov 18.08.2020, 12:23 @ Rugxulo |
User exception handler in C |
> > Aha, it was not so hard. |
Laaca Czech republic, 18.08.2020, 20:15 @ marcov |
User exception handler in C |
> Undocumented unit cpu has some functions too, and might be more maintained. --- |
Rugxulo Usono, 19.08.2020, 19:44 @ Laaca |
User exception handler in C |
> Better is to use the instruction SMSW which is non-privileged. |
Laaca Czech republic, 19.08.2020, 21:50 @ Rugxulo |
User exception handler in C |
> I think you rather meant --- |
Rugxulo Usono, 23.08.2020, 17:32 @ Laaca |
User exception handler in C |
> No. SMSW is correct. |
Japheth Germany (South), 23.08.2020, 20:36 @ Rugxulo |
User exception handler in C |
> Your "mov eax,0" confused me. Apparently you're clearing the top bits of --- |
Rugxulo Usono, 17.08.2020, 22:26 @ Laaca |
User exception handler in C |
> It would be also cool to test in this way the SSE instruction. |
tkchia 19.08.2020, 18:52 @ Laaca |
User exception handler in C |
Hello Laaca, --- |
marcov 20.08.2020, 00:00 @ tkchia |
User exception handler in C |
> The POSIX function sigaction(...) allows one to retrieve the originally |
Laaca Czech republic, 20.08.2020, 15:31 @ marcov |
User exception handler in C |
> Though there used to be a signal() routine for djgpp interoperation (unit --- |
tkchia 31.07.2020, 19:36 @ RayeR |
User exception handler in C |
Hello RayeR, --- |
RayeR CZ, 01.08.2020, 02:16 @ tkchia |
User exception handler in C |
I probably just print some warning about reading invalid MSR and let the program continue, where returned RDMSR value can be zero or something else, not so important... --- |
Guti 27.07.2020, 08:22 @ RayeR |
User exception handler in C |
> Hi, is it possible/how to install user exception handler in user program in --- |