Page 1 of 1

BOCHS with debugger

Posted: Thu Feb 26, 2009 7:28 am
by Tomaka17
Hello everybody,

Yesterday I got a really strange bug (really complicated also) in my o/s, and after spending all the morning trying to fix it I still don't even have any clue about its origine


That's why I told myself "let's get bochs with its debugger"
As there are no available binaries, I have to compile it
http://bochs.sourceforge.net/doc/docboo ... iling.html


Solution 1: let's compile it with MSVC++
I follow the instruction : run the shell script, and make win32_snap
But when I try opening the .dsw file, Visual C++ tells me the "cpu" project file is broken -_-
I try compiling the rest, and I get an error (several times in a row)
"LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt" -_-

Solution 2: let's compile it with Cygwin
I downloaded cygwin, installed it, etc. which took me about 30mn -_-
After trying different options for the ./configure script (eg. it doesn't work without --enable-cpp despite the doc says you only need it if you know you need it, --enable-cpu-type=5 doesn't work despite it is the recommended choice, etc.) I finally get a Makefile
...but after typing make the compiler complains about not finding "usleep" which is defined in "unistd.h", not included because we are compiling for windows -_-

Solution 3: let's compile it and then use it with my other (very old) computer which has Linux installed
But I see in the docs the option:
--with-term Use text-only gui with curses library. Almost certainly won't work right with the debugger or the control panel.
As I don't have XWindows installed, this means I won't be able to use the debugger -_-



Before installing XWindows (which is something very complicated), I post here to ask if someone had another solution
Like providing a download link for the win32 bochs binaries with debugger or something like that :-/

Thank you

Re: BOCHS with debugger

Posted: Thu Feb 26, 2009 7:30 am
by AJ
Hi,

My windows version came with the debugger already built - look under your Bochs install directory for bochsdbg.exe.

Cheers,
Adam

Re: BOCHS with debugger

Posted: Thu Feb 26, 2009 7:34 am
by Tomaka17
AJ wrote:Hi,

My windows version came with the debugger already built - look under your Bochs install directory for bochsdbg.exe.

Cheers,
Adam
Thank you >.<

*banging his head on the wall*


EDIT : 5mn later, already discovered the origin of my bug :)

Re: BOCHS with debugger

Posted: Fri Feb 27, 2009 2:42 pm
by bewing
As AJ pointed out (and you tried out), it is nice to use the precompiled copy, but bochs has many compiler options, and I don't know what is "enabled" in the pre-compiled version.

On Windows, it is easiest to build bochs using NMAKE (MSVC in DOS mode) -- but you *must* load bochs onto Cygwin or Linux first, run the proper configure script, and then copy config.h and all the Makefiles back onto Windows first (this is irritating -- and shouldn't be necessary, but it is). I can give detailed instructions if you want.

Under cygwin, to build bochs for windows, you need to use the Mingw compiler.

You can run bochs with the full graphical debugger completely under cygwin, if you want, by compiling with GCC and using a simulated X window.

I am currently creating a complete rewrite of bochs that will be much easier to compile.

Re: BOCHS with debugger

Posted: Sat Feb 28, 2009 3:27 am
by xenos
bewing wrote:Under cygwin, to build bochs for windows, you need to use the Mingw compiler.
Are you sure about that? I compiled several bochs executables (using different options, with / without x86_64, debugger and so on) using Cygwin's gcc that was shipped as a binary with my Cygwin distribution, without any problems. Anyway, I added --with-win32 to the configure options, just to make sure I don't run into trouble with auto-selection here.

Re: BOCHS with debugger

Posted: Mon Mar 02, 2009 5:30 am
by Combuster
No problems with cygwin here either. (I also never used --with-win32)

Are you perchance running 64-bit windows?

Re: BOCHS with debugger

Posted: Fri Mar 06, 2009 2:22 am
by Hyperdrive
Combuster wrote:No problems with cygwin here either. (I also never used --with-win32)
Are you perchance running 64-bit windows?
I'm running a 64 bit windows with Cygwin and no problems here.