OS Crash because of infinite loop

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
trolly
Member
Member
Posts: 52
Joined: Tue Mar 25, 2008 12:26 pm

OS Crash because of infinite loop

Post by trolly »

Hi,

i'm working on a new kernel since 2 days, it's written in FreeBasic, with a little inline ASM (i started using , the freebasic bare metal example).

For now , i have console routines, memory management (alloc, free, realoc, mem cpy) , and the initialisation of a GDT

i now there is a lot of thing to do, (the goal is to make a sort of VM that executes a kind of bytecodes, and i could port it on the rhaspeberry pi)


The problem now,
is when in the main function, i add the "while(1);" loop , it crashes . any idea what could cause that?
Attachments
src.zip
Source of FBOS
(27.16 KiB) Downloaded 31 times
Techel
Member
Member
Posts: 215
Joined: Fri Jan 30, 2015 4:57 pm
Location: Germany
Contact:

Re: OS Crash because of infinite loop

Post by Techel »

Use the Debugger and check why it crashes.
trolly
Member
Member
Posts: 52
Joined: Tue Mar 25, 2008 12:26 pm

Re: OS Crash because of infinite loop

Post by trolly »

i tryied to start qemu in debug mode, but it fails
User avatar
iansjack
Member
Member
Posts: 4706
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: OS Crash because of infinite loop

Post by iansjack »

What do you mean by "it crashes". Error message?

What do you mean by "qemu fails to start in debug mode"? What command line did you use and what error message did you get?

Vague statements like "it crashes" or "it fails to start" are no use at all to others.

I would say that if you are going to try to program an OS in something unusual, like FreeBasic, then you have to know your tools very well indeed. Very few people will be using the same tools so you can expect little help. Pioneers have to be - well, pioneers. I would strongly advise the use of C for someone new to OS development.
trolly
Member
Member
Posts: 52
Joined: Tue Mar 25, 2008 12:26 pm

Re: OS Crash because of infinite loop

Post by trolly »

When it entered into the do:loop qemu rebooted immediately

finaly i've found the problem; it was because the IDP whas not yet configured, and it may that an interrupt (the timer by example) occured, and because it was not configured, it went to an arbitrary location.

ive now finished the IRQ manager , and all work fine. i can now work on the Hard disk driver :D
Post Reply