how can i debug a os with bochs?
how can i debug a os with bochs?
i download the bochs souce.i want to know which option to configure,so i can debug it.
i've already install grub in a floppy image, but i don't know how to debug my kernel?
i did search how to solve it but it didn't work.
does anyone help me?how did you debug your kernel?
im a newbie.
i've already install grub in a floppy image, but i don't know how to debug my kernel?
i did search how to solve it but it didn't work.
does anyone help me?how did you debug your kernel?
im a newbie.
Re: how can i debug a os with bochs?
Are you going to be running the bochs on Linux, or on Windows?
First you need to "configure" the bochs download. Then you will need to compile it. Then you install it somewhere. Then you edit the .bochsrc file to tell it the name of your floppy image file. Then you run it, and it should pop up a couple of screens that show you a pretend computer booting your OS.
First you need to "configure" the bochs download. Then you will need to compile it. Then you install it somewhere. Then you edit the .bochsrc file to tell it the name of your floppy image file. Then you run it, and it should pop up a couple of screens that show you a pretend computer booting your OS.
Re: how can i debug a os with bochs?
i know that.i use ubuntu now.bewing wrote:Are you going to be running the bochs on Linux, or on Windows?
First you need to "configure" the bochs download. Then you will need to compile it. Then you install it somewhere. Then you edit the .bochsrc file to tell it the name of your floppy image file. Then you run it, and it should pop up a couple of screens that show you a pretend computer booting your OS.
my problem is how to debug my kernel code.
do i need to run gcc with '-g' and ./configure --enable-gdb-stub ?
i did it before,but i can not see the asm code,just the c code.
when is use bochs in windows there is a bochsrgdb can step asm code one bye one.
what does i need to do under linux?
Re: how can i debug a os with bochs?
bochs does not work very well with the gdb stub. You can try it, but I think you will have problems.
If you really want to know how to use bochs with gdb, say so and I will go and dig out my notes.
I think the easiest thing to do is:
./configure --target=pentium \
--enable-all-optimizations \
--enable-cpu-level=6 \
--enable-disasm \
--enable-debugger \
--enable-debugger-gui \
--enable-pci \
--enable-vbe \
--disable-readline \
--with-x \
--enable-cpp
And then in the .bochsrc file, you say:
display_library: x, options="gui_debug"
And that gets the local graphical debugger running, so you can singlestep the asm.
Alternately, you can get my "rebochs" program. It does all the same things, but faster. You can get it at http://www.quokforge.org/projects/rebochs/files
It is much easier to set up than bochs.
If you really want to know how to use bochs with gdb, say so and I will go and dig out my notes.
I think the easiest thing to do is:
./configure --target=pentium \
--enable-all-optimizations \
--enable-cpu-level=6 \
--enable-disasm \
--enable-debugger \
--enable-debugger-gui \
--enable-pci \
--enable-vbe \
--disable-readline \
--with-x \
--enable-cpp
And then in the .bochsrc file, you say:
display_library: x, options="gui_debug"
And that gets the local graphical debugger running, so you can singlestep the asm.
Alternately, you can get my "rebochs" program. It does all the same things, but faster. You can get it at http://www.quokforge.org/projects/rebochs/files
It is much easier to set up than bochs.
Re: how can i debug a os with bochs?
Is rebochs is able to boot WinXP for example ?Alternately, you can get my "rebochs" program. It does all the same things, but faster. You can get it at http://www.quokforge.org/projects/rebochs/files
It is much easier to set up than bochs.
I am still wondering if "faster" means "faster to configure" or not. Without running any simple benchmark you won't know.
My estimations show that rebochs should be 2x-3x slower than similarly configured Bochs. Might be I am wrong, but I can't check it.
Stanislav
Re: how can i debug a os with bochs?
vbe option is deprecated in latest svn tree and should not be used anymore.bewing wrote:I think the easiest thing to do is:
./configure --target=pentium \
--enable-all-optimizations \
--enable-cpu-level=6 \
--enable-disasm \
--enable-debugger \
--enable-debugger-gui \
--enable-pci \
--enable-vbe \
--disable-readline \
--with-x \
--enable-cpp
And then in the .bochsrc file, you say:
display_library: x, options="gui_debug"
--enable-cpp option definitelly won't do anything good together with --with-x. The option would rename all the source .cc file to .cpp to help old crappy microsoft compilers (like Visual Studio 6.0). Any today Visual Studio works well without this option.
If you need x86-64 support add --enable-x86-64.
Stanislav
Re: how can i debug a os with bochs?
i'll try it out,thks
Re: how can i debug a os with bochs?
i add this line
display_library:x, options="gui_debug"
in bochsrc.but when i input bochs -f bochsrc
something is wrong with it.
Unknow x11 option "gui_debug"
what should i do?
display_library:x, options="gui_debug"
in bochsrc.but when i input bochs -f bochsrc
something is wrong with it.
Unknow x11 option "gui_debug"
what should i do?
Re: how can i debug a os with bochs?
Start reading manuals insteadj8long wrote:i add this line
display_library:x, options="gui_debug"
in bochsrc.but when i input bochs -f bochsrc
something is wrong with it.
Unknow x11 option "gui_debug"
what should i do?
If you use win32, display_library:x is not a good option for you.
Stanislav
Re: how can i debug a os with bochs?
im using ubuntu.stlw wrote:Start reading manuals insteadj8long wrote:i add this line
display_library:x, options="gui_debug"
in bochsrc.but when i input bochs -f bochsrc
something is wrong with it.
Unknow x11 option "gui_debug"
what should i do?
If you use win32, display_library:x is not a good option for you.
Stanislav
i'll triy it out
Re: how can i debug a os with bochs?
Make sure you use Bochs with GUI debugger. Latest releast is always a best good option.im using ubuntu.
i'll triy it out
Stanislav
Re: how can i debug a os with bochs?
it doesnt workstlw wrote:Make sure you use Bochs with GUI debugger. Latest releast is always a best good option.im using ubuntu.
i'll triy it out
Stanislav
- Combuster
- 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:
Re: how can i debug a os with bochs?
"does not work" is never a valid description.
Re: how can i debug a os with bochs?
it works now.Combuster wrote:"does not work" is never a valid description.
maybe some options of bochs is not supported .
i typed
Code: Select all
./configure --enable-debugger --enable-disasm