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 ubuntu source is 2.4.6, but bochs website has released 2.5.1 (http://bochs.sourceforge.net/), so we direct... 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 ubuntu source is 2.4.6, but the bochs website has released 2.5.1 (http://bochs.sourceforge.net/), 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
Because the bochs with debug will open the debugging window every time they are started. sometimes we just want to see the execution result of the program. Therefore, after the source code make install, install the common bochs through sudo apt-get install 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
Dlopen failed for module 'X': file not found
Sudo apt-get install bochs-x
The sample of the bochs2.5.1 configuration file is. bochsrc under the source code directory.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service