- 论坛徽章:
- 0
|
下载了的2.6.26的内核,加入了kgdb支持和调试符号,编译出内核,然后用这个内核启动,通过串口进行远程调试,发现不能单步走,现象如下:
(gdb) b sys_open
Breakpoint 1 at 0xc015e23c: file fs/open.c, line 1113.
(gdb) c
Continuing.
Breakpoint 1, sys_open (filename=0xc03326b8 "/dev/console", flags=2, mode=0) at fs/open.c:1113
1113 ret = do_sys_open(AT_FDCWD, filename, flags, mode);
(gdb) n
do_sys_open (dfd=-100, filename=0xc03326b8 "/dev/console", flags=2, mode=-1017290914) at fs/open.c:1085
1085 {
(gdb) l
1080 }
1081
1082 EXPORT_SYMBOL(fd_install);
1083
1084 long do_sys_open(int dfd, const char __user *filename, int flags, int mode)
1085 {
1086 char *tmp = getname(filename);
1087 int fd = PTR_ERR(tmp);
1088
1089 if (!IS_ERR(tmp)) {
(gdb)
从vmlinux和bzimage的大小看不像是没有调试符号的问题,不知道什么情况啊
user@linux:/home/user/linux@ ls -l vmlinux
-rwxr-xr-x 1 user user 31138343 2011-09-14 16:12 vmlinux
user@linux:/home/user/linux@ ls -l arch/x86/boot/bzImage
-rwxrwxrwx 1 user user 15477968 2011-09-14 16:12 arch/x86/boot/bzImage
请问有使用过kgdb的吗? |
|