As we all know, the bochs installed by Apt-get do not contain debugging functions. You must add -- enable-debugger through source code compilation. Now the bochs version on the Ubuntu source is 2.4.6, but the bochs website has released 2.5.1, So we compile and install bochs2.5.1 directly. Compile the source code from http://bochs.sourceforge.net/download the latest source code and decompress it. /configur
As we all know, the bochs installed by Apt-get do not contain debugging functions. You must add -- enable-debugger through source code compilation.
Now the bochs version on the Ubuntu source is 2.4.6, but the bochs website has released 2.5.1, So we compile and install bochs2.5.1 directly.
- Compile source code
- Download the latest source code from http://bochs.sourceforge.net/and unzip it
- . /Configure -- with-x11 -- with-wx -- enable-debugger -- enable-disasm -- enable-all-optimizations -- enable-readline -- enable-long-phy-address -- enable-debugger-gui
- If bochs is compiled on a 64-bit system, you must add the -- enable-long-phy-address option. Otherwise, bochs exception (): 3rd (13) will occur during running) exception with no resolution, shutdown status is
- Make
- $ Cp bochs bochsdbg, compilation does not produce bochsdbg, So copy it manually here
- Sudo make install
- Handle bochs source code errors
- Checking for C compiler default output file name... Configure: error: C compiler cannot create executables
Sudo apt-get install build-essential libc6-dev
- ERROR: X windows gui was selected, but X windows libraries were not found.
Sudo apt-get install xorg-dev libgtk2.0-dev
- Install: cannot stat './bios/VGABIOS *':
In the bios directory of the source code (/xxxx/bochs-2.5.1/bios), create a symbolic link ln-s/usr/share/vgabios. bin VGABIOS-lgpl-latest
- Undefined reference to 'xstringtokeysym'
Add -- with-x11 when configure, -- with-x11 -- with-wx -- enable-debugger -- enable-disasm -- enable-all-optimizations -- enable-readline -- enable-long-phy-address -- enable-debugger-gui
- If there is a problem with -- with-wx when configure is prompted, sudo apt-get install libwxgtk2.8-dev libx11-xcb-dev
- After the source code make install, use sudo apt-get install bochs to install normal bochs.
- Normally installed bochs are in/usr/bin/bochs, while the source code is installed in/usr/local/bin/bochs, the priority of/usr/local/bin in PATH is higher than that of/usr/bin. Therefore, the actual running of bochs is the one installed by source code, we can rename/usr/local/bin/bochs.
This ensures that bochs is installed normally and bochsdbg is installed by source code.
- Problems encountered during source code Installation and Use
- (.: 7444): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap ",
- Sudo apt-get install gtk2-engines-pixbuf Solution
- Crash during use (-_-!)
- Comment out config_interface and display_library
- Or config_interface = textconfig, display_library = x, options = "gui_debug", do not use wx
- The sample of the bochs2.5.1 configuration file is. bochsrc under the source code directory.