0 Star 1 Fork 2

Hedonihilist/jos

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
.gdbinit.tmpl 857 Bytes
一键复制 编辑 原始数据 按行查看 历史
Anish Athalye 提交于 2018-08-31 03:17 +08:00 . Lab 1
set $lastcs = -1
define hook-stop
# There doesn't seem to be a good way to detect if we're in 16- or
# 32-bit mode, but we always run with CS == 8 in 32-bit mode.
if $cs == 8 || $cs == 27
if $lastcs != 8 && $lastcs != 27
set architecture i386
end
x/i $pc
else
if $lastcs == -1 || $lastcs == 8 || $lastcs == 27
set architecture i8086
end
# Translate the segment:offset into a physical address
printf "[%4x:%4x] ", $cs, $eip
x/i $cs*16+$eip
end
set $lastcs = $cs
end
echo + target remote localhost:1234\n
target remote localhost:1234
# If this fails, it's probably because your GDB doesn't support ELF.
# Look at the tools page at
# http://pdos.csail.mit.edu/6.828/2009/tools.html
# for instructions on building GDB with ELF support.
echo + symbol-file obj/kern/kernel\n
symbol-file obj/kern/kernel
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hedonihilist/jos.git
[email protected]:hedonihilist/jos.git
hedonihilist
jos
jos
master

搜索帮助