Page 1 of 1

how to debug using bochs

Posted: Sun Jan 25, 2004 6:27 am
by shaz
i'm using bochs for the first time.please explain the following bochs log file.
how can i debug using bochs.

Code: Select all

00002404408p[CPU  ] >>PANIC<< prefetch: running in bogus memory
00002404408i[SYS  ] Last time is 1075000370
00002404408i[CPU  ] protected mode
00002404408i[CPU  ] CS.d_b = 32 bit
00002404408i[CPU  ] SS.d_b = 32 bit
00002404408i[CPU  ] | EAX=00000010  EBX=00000010  ECX=00130001  EDX=000003f2
00002404408i[CPU  ] | ESP=00001000  EBP=00000000  ESI=00000000  EDI=0000ffe4
00002404408i[CPU  ] | IOPL=0 NV UP DI PL NZ NA PE NC
00002404408i[CPU  ] | SEG selector     base    limit G D
00002404408i[CPU  ] | SEG sltr(index|ti|rpl)     base    limit G D
00002404408i[CPU  ] |  DS:0010( 0002| 0|  0) 00000000 000fffff 1 1
00002404408i[CPU  ] |  ES:0010( 0002| 0|  0) 00000000 000fffff 1 1
00002404408i[CPU  ] |  FS:0010( 0002| 0|  0) 00000000 000fffff 1 1
00002404408i[CPU  ] |  GS:0010( 0002| 0|  0) 00000000 000fffff 1 1
00002404408i[CPU  ] |  SS:0010( 0002| 0|  0) 00000000 000fffff 1 1
00002404408i[CPU  ] |  CS:0008( 0001| 0|  0) 00000000 000fffff 1 1
00002404408i[CPU  ] | EIP=88100006 (88100006)
00002404408i[CPU  ] | CR0=0x60000011 CR1=0x00000000 CR2=0x00000000
00002404408i[CPU  ] | CR3=0x00000000 CR4=0x00000000
00002404408i[     ] restoring default signal behavior

Re:how to debug using bochs

Posted: Sun Jan 25, 2004 7:39 am
by Slasher
In your code somewhere you have jumped to an undefined or unmapped region of memory.

Re:how to debug using bochs

Posted: Sun Jan 25, 2004 3:59 pm
by Pype.Clicker
if you have the internal bochs debugger enabled, the best thing to do is probably to type "trace-on" on the debugger console before "c"ontinuing your program .. this way, you'll know where your program was *before* it jumped/called the bad address ... and you'll be able to find out why it did so (probably a misinitialized pointer to function somewhere ?)

Re:how to debug using bochs

Posted: Mon Jan 26, 2004 5:36 am
by Ozguxxx
Im just speculating: I think eip's bad value might come from popping eip in an interrupt handler, you are by mistake popping eip and when you do iret, you return to this bad eip value. But just speculating, this is the first thing I can think of. Good luck.