LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Hardware Error Handling with C or C++ (https://www.linuxquestions.org/questions/programming-9/hardware-error-handling-with-c-or-c-594622/)

benz 10-25-2007 05:02 PM

Hardware Error Handling with C or C++
 
Good evening.

I have a question for you here, wish somebody could help me. I was wondering if it is possible to handle hardware and low level errors (like segmentation faults, divisions by 0) with a program written in C or C++ instead of letting the kernel to handle it; just as the virtual machines (like Java's one) do.

Why would I like to do that? I have to simulate virtual machines' behaviour in some different platforms.. Currently I just discovered that in Windows is simply not possible. Is it possible in Linux?

ta0kira 10-26-2007 10:18 AM

The kernel is written in C; it only matters the context of execution. You can't access hardware without passing it through the kernel, so you will need either a module to support access to the hardware or you will need to create a module to suit your purpose. If it's non-existent hardware I suppose you can handle it wherever you want :)
ta0kira


All times are GMT -5. The time now is 05:33 AM.