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.
and, btw, try to identify the cause of the FIRST exception. If you're using bochs, ask it to provide more debug, or to output a trace of every instruction, or run it step by step ... whatever.
Track the 3v!l to its source: you're currently fighting with the shadow of your bug, not with the bug itself
Although I have bochs 2.0, I can't get it to work, it says that one of my IDE drive declarations on bochsrc is malformed even though it's and edit of the one in the sample. Here is the Line:
I have got the that working now by adding it using Bochs it's self.
I now have version 2.0.1 of bochs and it seems much more stable, but all I now get is the stuff that it puts into my command prompt (I'm using Windows XP), the main screen that displays the program and has reset button etc never appears!
BTW those disk image geometry details were given to me by boch's own image making program!
I'm now starting to get the hang of Bochs and it's debugger
Here is the error:
[CPU ] exception(): 3rd (13) exception with no resolution
So I'm assuming that when ever I get an interrupt, with also if I use the Int instruction, it is raising a GPF, but when it calls the GPF "Interrupt", it raises a GPF, when it calls the GPF Int again, it tripple faults.
Here is all the info that Bochs provides (BTW I have used an Int 00 instruction to force an Interrupt call):
00003511649p[CPU ] >>PANIC<< exception(): 3rd (13) exception with no resolution
00003511649i[SYS ] Last time is 1042746764
# In bx_win32_gui_c::exit(void)!
========================================================================
Bochs is exiting with the following message:
[CPU ] exception(): 3rd (13) exception with no resolution
========================================================================
00003511649i[CPU ] protected mode
00003511649i[CPU ] CS.d_b = 32 bit
00003511649i[CPU ] SS.d_b = 32 bit
00003511649i[CPU ] | EAX=6000728f EBX=00000010 ECX=00000000 EDX=00002820
00003511649i[CPU ] | ESP=0000fffc EBP=0000fffc ESI=00000000 EDI=00000000
00003511649i[CPU ] | IOPL=0 NV UP DI PL NZ NA PE NC
00003511649i[CPU ] | SEG selector base limit G D
00003511649i[CPU ] | SEG sltr(index|ti|rpl) base limit G D
00003511649i[CPU ] | DS:0010( 0002| 0| 0) 00000000 000fffff 1 1
00003511649i[CPU ] | ES:0010( 0002| 0| 0) 00000000 000fffff 1 1
00003511649i[CPU ] | FS:0010( 0002| 0| 0) 00000000 000fffff 1 1
00003511649i[CPU ] | GS:0010( 0002| 0| 0) 00000000 000fffff 1 1
00003511649i[CPU ] | SS:0010( 0002| 0| 0) 00000000 000fffff 1 1
00003511649i[CPU ] | CS:0008( 0001| 0| 0) 00000000 000fffff 1 1
00003511649i[CPU ] | EIP=00007235 (00007235)
00003511649i[CPU ] | CR0=0x60000011 CR1=0x00000000 CR2=0x00000000
00003511649i[CPU ] | CR3=0x00000000 CR4=0x00000000
00003511649i[CPU ] >> cd
00003511649i[CPU ] >> 00
00003511649i[CPU ] >> : int 00
00003511649i[CTRL ] quit_sim called with exit code 1
After my program switched to Pmode and set it's segments, (just for the sake of completeness), did a cpu_dump and this is what Bochs said for the IDTR:
I've now enabled interrupts and all is working. Strangely, I now get on the Bochs debugger a stream of exceptions ( all the same one ) ( thousands of them) that all jump to my handler Int_32.
Is this just the 8253 timer (even though Bochs calls it an exception, is there something wrong.
I'm assuming it's a bug in bochs as if it was real then it would brobably crash.
Anyway, everything is working properly, I have even set up a simple Keyboard handler that puts a character in screen memory, also one for the Timer Inerrupt that does the same. They work in perfect harmony.
Also, I've noticed that Bochs runs my code faster than VMWare.
Thanks for your help (No doubt that it will be neded in the future )