Page 1 of 1
process loading
Posted: Thu Jan 04, 2007 12:07 pm
by pulsar
process loading was working fine until one day when i tried to write a little bigger application. after two to three days i fixed the problem, when more than one page faults occur while loading the modules, entry point was not stored in the appropriate context( some backlinking of previous contexts solved the problem).
i learnt backlinking to previous context from tim's code (mobius).How will you handle this situation? probably backlinking is not explained well in tutorials, because i followed one such tutorial at the beginning.
now process loading generates a tripple fault when gui is enabled. i don't have any error reposrting mechanisms ( simple panic functions). i like to know what you guys do?
Is this what you do?
if(graphics mode enabled)
gfxpanic(error);
else
textpanic(error);
Posted: Thu Jan 04, 2007 3:38 pm
by INF1n1t
Hi, pulsar
I think you should put panic functions somewhere in your os and specially in the memory manager. You should do many tests...
If you want to see your error messages, you should put them in the appropriate place and execute the right function for them...Is that the answer to your question?
Posted: Fri Jan 05, 2007 2:01 am
by pulsar
not really, my question was how will you generate panic messages before and after enabling the graphics mode? through some message boxes or directly drawing text to the screen. Since i was using message boxes which is also a form of windows it's again faulting, so probably is should have my panic message directly draw the error message to the screen.
Posted: Fri Jan 05, 2007 3:37 am
by Combuster
You can also try to switch to text mode on a panic.
Posted: Sat Jan 06, 2007 3:20 am
by pulsar
It's a good idea to switch back to text mode, but to do so i have to create a v86thread and much more work is needed. will it be successfull after some exceptions? it depends. well i just wrote a function to draw text directly to the screen.
Posted: Tue Jan 09, 2007 3:37 am
by Jules
Not got to the point in my kernel where this is necessary, but my plan is to have a task that's registered to handle faults, and I send it a message. If that task fails I switch down to text mode and show a fatal message (i.e. a BSOD). A later version would support restarting the task if it fails. The process of starting the GUI would kill the text mode handler and start a GUI-based one. If a debugger's running, it could register to receive the messages instead.
Posted: Tue Jan 09, 2007 4:57 am
by Ready4Dis
Write a serial port driver, and output to the serial port, you can then monitor this on another computer, or in an emulator it's output to a .txt file, so if your OS completely crashes (triple faults), you can still see your output and don't need to put delays or endless loops everywhere while debugging just to see where your OS got to.