Page 1 of 1
debug using bochs
Posted: Sun Feb 29, 2004 5:16 pm
by firas981
bona fides website tutorial about bochs is very good , however
it didn't talk about debugging , and bochs user guide was blured to me , can any body explain to me in just few words how i can debug my os using bochs ( i.e. execute in single step mode and use breakpoints )
thanks
Re:debug using bochs
Posted: Sun Feb 29, 2004 8:13 pm
by Neo
are you using windows or linux?
The general way is to start the BOCHS debugger that comes along with the simulator. this will allow you to use all the debugging commands
to single step through your OS use the 's option'. it should be used with "s <No.Of Steps(default=1)>"
break points are set using the 'lb' (linear breakpoint) option used as "lb <physical address>" to use virtual breakpoints use "vb <seg:off>".
You would of course be better off reading the DOCS. Try to take the time to read and understand the BOCHS documents it really is the best source and explains things quite cleary.
btw which part of it can't you understand? have you got a bootloader image etc setup to run in BOCHS??
Re:debug using bochs
Posted: Mon Mar 01, 2004 2:55 am
by Candy
Breakpoint (linear): b <address>
instruction trace: trace-on / trace-off
CPU status (states if multi-cpu): dump_cpu
continue execution: c
interrupt execution: ctrl-c
explore memory: xp /<numbytes>xb <address>
x stands for hex output, b stands for per byte
HTH, C&CW, Candy
PS: Thanks for the vb
didn't know that one