BOCHS with debugger

Programming, for all ages and all languages.
Post Reply
User avatar
Tomaka17
Member
Member
Posts: 67
Joined: Thu Oct 02, 2008 8:20 am

BOCHS with debugger

Post 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
Last edited by Tomaka17 on Thu Feb 26, 2009 7:31 am, edited 1 time in total.
MysteriOS
Currently working on: TCP/IP
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: BOCHS with debugger

Post by AJ »

Hi,

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

Cheers,
Adam
User avatar
Tomaka17
Member
Member
Posts: 67
Joined: Thu Oct 02, 2008 8:20 am

Re: BOCHS with debugger

Post 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 :)
MysteriOS
Currently working on: TCP/IP
User avatar
bewing
Member
Member
Posts: 1401
Joined: Wed Feb 07, 2007 1:45 pm
Location: Eugene, OR, US

Re: BOCHS with debugger

Post 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.
User avatar
xenos
Member
Member
Posts: 1118
Joined: Thu Aug 11, 2005 11:00 pm
Libera.chat IRC: xenos1984
Location: Tartu, Estonia
Contact:

Re: BOCHS with debugger

Post 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.
Programmers' Hardware Database // GitHub user: xenos1984; OS project: NOS
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:

Re: BOCHS with debugger

Post by Combuster »

No problems with cygwin here either. (I also never used --with-win32)

Are you perchance running 64-bit windows?
"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 ]
Hyperdrive
Member
Member
Posts: 93
Joined: Mon Nov 24, 2008 9:13 am

Re: BOCHS with debugger

Post 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.
Post Reply