Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Operating system-- the Construction of debugging Environment

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

one。 The construction of debugging system

a. The construction of the system requires a piece of other virtual machine software, which is introduced here is Bochs

Bochs-- is an open source simulator for x86 hardware platforms. It can simulate the configuration of various hardware. Bochs simulates the entire pc platform, including Icano devices, memory, and BIOS. It is also a very portable open source IA-32 (x86) computer simulator written in C++ that can run on the most popular platforms. It emulates Intel x86 CPU, the common Imax O device, and custom BIOS.

The summary is as follows:

1. Professional simulation of virtual machines based on x86 architecture

two。 Open source and highly portable, written by C++

3. Support breakpoint debugging during operating system development

4. You can run most mainstream operating systems through simple configuration.

Installation and configuration of B.Bochs

This error occurs during installation: ERROR: pkg-config was not found, or unable to access the gtk+-2.0 package. Use sudo apt-get install libgtk2.0-dev to resolve this error at this time

The result of the installation is

There will be an error here because there is no configuration, and the next job is to configure

1. The startup file of Bochs needs to be configured

two。 Start the bochs virtual machine

Display mode: bochs-f bcchsrc_file

Implicit method: boch

What needs to be noted here is that

1. Determine the installation path (which bochs) of bochs

two。 Install vgabios (apt-get install vgabios)

3. Determine the installation path (whereis vgabios) of vgabios

Common commands in C.Bochs

After setting up, you can experience the functions of bochs (similar to GDB)

An attempt at the D.bochs command

You can see

1. Set breakpoint information

two。 View the breakpoints set

When 3.continue continues to run, you can see that bochs stops at the set breakpoint.

The output at 4.4shows that the bios,t was loaded correctly and stopped at the beginning of the previous blog.

The subsequent debugging commands of Bochs can be experienced by yourself.

Summary

1.Bochs is a professional virtual machine that simulates x86 architecture.

two。 Debugging support can be obtained by installing Bochs from the source code.

The startup configuration file of 3.Bochs is the key to running correctly

4.Bochs supports breakpoint debugging, and its debugging commands are similar to GDB

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report