You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

从Windows转至Ubuntu 16.04 LTS x64,编译Bochs 2.6.9无法安装调试器求助

Fixing Bochs 2.6.9 Debugger Installation on Ubuntu 16.04 LTS

Hey there! I totally get how frustrating it is when you build a tool you need but end up missing a critical feature like the debugger—especially when you're still getting used to Ubuntu after coming from Windows. Let's walk through exactly how to compile Bochs with its debugger enabled, step by step.

Step 1: Install Required Dependencies

First, you'll need to install the build tools and libraries Bochs needs to compile the debugger (and GUI support, if you want it). Open a terminal and run:

sudo apt-get update && sudo apt-get install build-essential libgtk2.0-dev libncurses5-dev
  • build-essential gives you gcc, make, and other basic compiling tools.
  • libgtk2.0-dev enables the GUI debugger interface.
  • libncurses5-dev supports the terminal-based debugger if you prefer that.

Step 2: Clean Up Previous Builds (If Needed)

If you've already tried compiling Bochs without the debugger, make sure to wipe the old build files first to avoid leftover configuration issues:

cd bochs-2.6.9  # Navigate to your Bochs source directory
make clean
rm -rf config.log config.status Makefile

Step 3: Configure Bochs with Debugger Enabled

This is the most important part—you must pass specific flags to ./configure to enable the debugger. Run this command in your Bochs source directory:

./configure --enable-debugger --enable-disasm --with-x11 --with-gtk

Let's break down these flags:

  • --enable-debugger: Turns on Bochs' built-in debugger (this is the flag you were missing!).
  • --enable-disasm: Adds disassembly support, which is essential for debugging assembly code.
  • --with-x11 --with-gtk: Enables the GUI debugger interface. If you only want a terminal-based debugger, replace these with --with-ncurses.

Step 4: Compile and Install

Now compile Bochs (using multiple cores to speed things up):

make -j$(nproc)

Once compiling finishes, install it:

sudo make install

Step 5: Verify the Debugger Works

Open a terminal and run bochs. You should see a menu that includes a "debug" option. Select it, and you'll enter the Bochs debugger where you can use commands like s (step), c (continue), info registers, and more to debug your code.

If you want to skip the menu and jump straight to the debugger, run:

bochs -q

内容的提问来源于stack exchange,提问作者Frank

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 04:07:48