Bochs debugging command

Source: Internet
Author: User

Bochs is a very easy-to-use simulator, and there are many commands, but the most common ones include several. Remember that these commands can basically meet debugging requirements.

1. breakpoint operations

(1) set the breakpoint: B physical address

For example, B 0x7c00 sets a breakpoint at the physical address 0x7c00.

(2) query breakpoints already set: info break

 

 

2. Program Execution

(1) execute the program until a breakpoint occurs: c

 

 

(2) One-step execution: S

 

 

(3) execute n commands: Step n

For example, execute three commands: Step 3.

 

 

2. Register value Query

(1) The info r command queries the value of the basic register, for example:

 

 

(2) dump_cpu

This command displays more comprehensive registers than info r, and even the shadow register values are printed out:

 

 

3. Memory Content Query

(1) query the memory of n Bytes starting from an address: XP/nbx physical address

Example: XP/32bx 0x90000 queries 32 bytes starting from 0x90000

 

 

(2) print the content in the current stack: Print-Stack

In the following example: 040803c0 is the linear address of the current running program, and 01ff53c0 is the actual physical address.

 

 

4. disassembly of a memory segment: disassemble start address termination address

For example, disassemble 0x7c3e 0x7c40 disassembles the instruction for this address.

This article Reprinted from http://blog.csdn.net/ddna/article/details/4997695

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.