HW2_Boot_xv6
寻找_start
地址并设定断点
nm
命令:names, nm命令主要是用来列出文件中的某些符号(一些函数和全局变量等)。
$ nm kernel | grep _start
8010a48c D _binary_entryother_start
8010a460 D _binary_initcode_start
0010000c T _start
练习:查看栈中的内容
在运行完make qemu-gdb
后,运行make gdb
发现找不到命令。
在makefile中加入一条语句即可:
gdb:
gdb -x .gdbinit
(gdb) br *0x10000c
Breakpoint 1 at 0x10000c
(gdb) c
Continuing.
The target architecture is assumed to be i386
=> 0x10000c: mov %cr4,%eax
Thread <