LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-25-2007, 05:02 PM   #1
benz
LQ Newbie
 
Registered: Jul 2006
Location: Guadalajara, Mexico
Distribution: Linux From Scratch, Fedora
Posts: 12

Rep: Reputation: 1
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?

Last edited by benz; 10-25-2007 at 05:03 PM.
 
Old 10-26-2007, 10:18 AM   #2
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error Handling Techniques ( C ) Centinul Programming 6 10-12-2006 10:49 AM
PHP error handling paddyjoy Programming 6 02-12-2006 06:29 AM
c++ opendir() handling error bendeco13 Programming 1 11-06-2005 02:37 AM
xinetd error handling iftiuk Linux - Networking 0 04-21-2004 02:32 PM
eval and try / error handling rajatgarg Programming 1 04-12-2004 08:01 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration