process loading

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
pulsar
Member
Member
Posts: 49
Joined: Wed Nov 22, 2006 1:01 am
Location: chennai

process loading

Post 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);
everyone here are best programmers ( not yet not yet)
INF1n1t
Member
Member
Posts: 60
Joined: Fri Dec 22, 2006 5:32 pm
Location: Somewhere Down...

Post 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?
I think, I have problems with Bochs. The biggest one: Bochs hates me!
User avatar
pulsar
Member
Member
Posts: 49
Joined: Wed Nov 22, 2006 1:01 am
Location: chennai

Post 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.
everyone here are best programmers ( not yet not yet)
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

You can also try to switch to text mode on a panic.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
pulsar
Member
Member
Posts: 49
Joined: Wed Nov 22, 2006 1:01 am
Location: chennai

Post 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.
everyone here are best programmers ( not yet not yet)
Jules
Member
Member
Posts: 30
Joined: Mon Jan 08, 2007 3:19 am
Location: UK

Post 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.
Ready4Dis
Member
Member
Posts: 571
Joined: Sat Nov 18, 2006 9:11 am

Post 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.
Post Reply