赞
踩
dmee@localhost:~$ sudo apt-get install build-essential
- dmee@localhost:~$make menuconfig
- dmee@localhost:~$make -j4 bzImage
- dmee@localhost:~$qemu -s -S -kernle linux-2.6.11.12/arch/i386/boot/bzImage
- 参数说明:
- -s: qemu在端口1234监听gdb的调试连接
- -S: 让qemu启动后暂停,等待gdb的连接
- -kernel: 指定bzImage的路径
dmee@localhost:~/linux-2.6.11.12$ gdb vmlinux
- (gdb) target remote localhost:1234
- Remote debugging using localhost:1234
- [New Thread 1]
- 0x0000fff0 in ?? ()
- warning: shared library handler failed to enable breakpoint
- (gdb)
- (gdb) b start_kernel
- Breakpoint 1 at 0xc030e537: file init/main.c, line 417.
- (gdb) c
- Continuing.
-
- Breakpoint 1, start_kernel () at init/main.c:417
- 417 {
- (gdb) n
- 425 page_address_init();
- (gdb)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。