Need som Help debugging w/ Bochs

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
astrocrep
Member
Member
Posts: 127
Joined: Sat Apr 21, 2007 7:21 pm

Need som Help debugging w/ Bochs

Post by astrocrep »

I am working on my Paging code, and it working pretty well... lol except when I enable paging... (moving my pd over into the cr3)

I have debugged as much as I can but cannot find the error...

So I have switched over to bochs.
(In qemu it locks up the whole app and almost brings down my machine)
In Bochs w/ the debug I enter c for it to run...

When it hits the crash point bochs doesn't return.

I hit Ctrl+C and I see:
Next at t=244036358
(0) [0x00102243] 0008:0000000000102243 (unk. ctxt): jmp .+0xfffffffe (0x00102243
) ; ebfe
<bochs:2>
If I then type dump_cpu I get a syntax error???

Anyone have any suggestions on how to figure this out?

I have no problem posting code... but I wanted to try to debug this on my own.

Thanks,
Rich
Mouse Pad - Coming in the distant future...
Kernel: Indigo Kernel - v0.0.1

Thanks to JamesM and BrokenThorn for there tutorials!
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 »

Strange....

I ran a cygwin build of bochs+debugger and dump_cpu worked as expected
What version are you using? windows/linux/etc? what display library? It works with 2.2.6 and 2.3
"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
bewing
Member
Member
Posts: 1401
Joined: Wed Feb 07, 2007 1:45 pm
Location: Eugene, OR, US

Post by bewing »

How many infinite loop jump calls do you have in your code? Just one, in your PANIC routine? I'd be guessing that an exception of some sort (GPF?) was being triggered -- but the best thing to do is always to put a breakpoint just before the code that crashes, and then singlestep through the crash.
Post Reply