linux 内核调试 0.11,Linux0.11内核可视化调试方法

本文档详细介绍了如何使用Bochs模拟器和Insight调试器进行Linux内核调试的过程。首先通过启动Bochs模拟器并连接到指定端口等待远程调试会话,接着在Insight中设置目标为本地主机上的Bochs模拟器,并通过一系列步骤进入调试模式,最终实现对Linux内核启动过程的逐步跟踪。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

先运行start_bochs.bat,敲一下回车,显示waiting for gdb connection on localhost:1234

运行bin目录下的insight.exe

File->Open 打开linux-0.11\tools目录下的system.exe

File->Target Settings Target下拉列表中选择Remote/TCP,hostname:localhost,prot:1234

View->Console,打开控制台

Run->Run ,运行,停在startup_32

控制台中输入以下命令

(gdb) break start

Breakpoint 2 at 0x6624: file init/main.c, line 105.

(gdb) handle SIGSEGV noprint nostop ignore

Signal        Stop       Print        Pass toprogram        Description

SIGSEGV       No       No        No               Segmentation fault

(gdb) cont

Continuing.

Breakpoint 2, start () at init/main.c:105

1.      打开linux-0.11,运行start_bochs.bat

a) 回车,看到:waiting for gdb connection onlocalhost:1234

2.      打开mingw-insight/bin,运行insight.exe

a) File->Open打开linux-0.11\tools目录下的system.exe

b) File->TargetSettings Target下拉列表中选择Remote/TCP

i.Target:Remote/TCP

ii. Hostname:localhost

iii. Port:1234

c) View->Console

d) Run->Run

注意:insight-mingw2中的insight可以显示正确的寄存器信息,而insight-mingw中的不可以!!!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值