skyeye,跑第一个printk()就进了wake_up?
时间:2006-05-08
来源:互联网
skyeye 0.9.8
uclinux2.4
44b0
望那位前辈指指方向!!!
能顺利进入start_kernel, 进入printk(linux_banner)就跳到sched.c中的wake_up函数!!!
printk()原码中也找不出进入wake_up的语句。
调试发现每次都在printk.c 的for中进入 wake_up。
for (p = printk_buf; *p; p++) {
if (log_level_unknown) {
if (p[0] != '<' || p[1] < '0' || p[1] > '7' || p[2] != '>') {
emit_log_char('<');
emit_log_char(default_message_loglevel + '0');
emit_log_char('>');
}
log_level_unknown = 0;
}
emit_log_char(*p);
if (*p == '\n')
log_level_unknown = 1;
}
这个时候sched_init()没有被执行也就是说sched没有初始化怎么回跳进去呢!
!!!!!
如果把printk()函数禁掉就可以跑下去了,不会进入wake_up
下面是调试信息
[root@FC4 uClinux-dist]# skyeye linux-2.4.x/linux
***********************************************************************
**** ****
**** SkyEye Simulator Ver 0.9.8 with GDB/Insight 5.3 Interface ****
**** ****
***********************************************************************
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This SkyEye was configured as "--host=i686-pc-linux-gnu --target=arm-elf"...
(SkyEye) tar sim
cpu info: armv3, arm7tdmi, 41007700, fff8ff00, 0
mach info: name s3c44b0, mach_init addr 0x81698c0
log_info: log is on.
log_info:log file is ./skyeyeuclinux44b0.log, fd is 0x9382cc0
log_info: log start clock 0
log_info: log end clock 20000
SKYEYE: use arm7100 mmu ops
Connected to the simulator.
(SkyEye) load
Loading section .init, size 0xa000 vma 0xc008000
Loading section .text, size 0x1a4780 vma 0xc012000
Loading section .data, size 0x7964 vma 0xc1b8000
Start address 0xc008000
Transfer rate: 14354208 bits in <1 sec.
(SkyEye) b main.c:406
Breakpoint 1 at 0xc008594: file init/main.c, line 406.
(SkyEye) run
Starting program: /uclinux/uClinux-dist/linux-2.4.x/linux
Breakpoint 1, start_kernel () at init/main.c:407
407 printk(linux_banner);
(SkyEye) b printk.c:459
Breakpoint 2 at 0xc01d5b4: file printk.c, line 459.
(SkyEye) c
Continuing.
Breakpoint 2, printk (fmt=0x0) at printk.c:459
warning: Source file is more recent than executable.
459 for (p = printk_buf; *p; p++) {
(SkyEye) step
467 }
(SkyEye) c
Continuing.
Breakpoint 2, printk (fmt=0x0) at printk.c:459
459 for (p = printk_buf; *p; p++) {
(SkyEye) del 2
(SkyEye) c
Continuing.
sim_info called
Program received signal SIGINT, Interrupt.
__wake_up (q=0x0, mode=3, nr=0) at sched.c:359
359 if (task_on_runqueue(p))
(SkyEye) c
Continuing.
sim_info called
Program received signal SIGINT, Interrupt.
__wake_up (q=0x0, mode=3, nr=3) at sched.c:740
740 state = p->state;
(SkyEye)
<SCRIPT type=text/javascript><!-- google_ad_client = "pub-3152530285624674"; google_ad_width = 468; google_ad_height = 15; google_ad_format = "468x15_0ads_al"; google_ad_channel =""; //--></SCRIPT><SCRIPT src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type=text/javascript> </SCRIPT>
uclinux2.4
44b0
望那位前辈指指方向!!!
能顺利进入start_kernel, 进入printk(linux_banner)就跳到sched.c中的wake_up函数!!!
printk()原码中也找不出进入wake_up的语句。
调试发现每次都在printk.c 的for中进入 wake_up。
for (p = printk_buf; *p; p++) {
if (log_level_unknown) {
if (p[0] != '<' || p[1] < '0' || p[1] > '7' || p[2] != '>') {
emit_log_char('<');
emit_log_char(default_message_loglevel + '0');
emit_log_char('>');
}
log_level_unknown = 0;
}
emit_log_char(*p);
if (*p == '\n')
log_level_unknown = 1;
}
这个时候sched_init()没有被执行也就是说sched没有初始化怎么回跳进去呢!
!!!!!
如果把printk()函数禁掉就可以跑下去了,不会进入wake_up
下面是调试信息
[root@FC4 uClinux-dist]# skyeye linux-2.4.x/linux
***********************************************************************
**** ****
**** SkyEye Simulator Ver 0.9.8 with GDB/Insight 5.3 Interface ****
**** ****
***********************************************************************
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This SkyEye was configured as "--host=i686-pc-linux-gnu --target=arm-elf"...
(SkyEye) tar sim
cpu info: armv3, arm7tdmi, 41007700, fff8ff00, 0
mach info: name s3c44b0, mach_init addr 0x81698c0
log_info: log is on.
log_info:log file is ./skyeyeuclinux44b0.log, fd is 0x9382cc0
log_info: log start clock 0
log_info: log end clock 20000
SKYEYE: use arm7100 mmu ops
Connected to the simulator.
(SkyEye) load
Loading section .init, size 0xa000 vma 0xc008000
Loading section .text, size 0x1a4780 vma 0xc012000
Loading section .data, size 0x7964 vma 0xc1b8000
Start address 0xc008000
Transfer rate: 14354208 bits in <1 sec.
(SkyEye) b main.c:406
Breakpoint 1 at 0xc008594: file init/main.c, line 406.
(SkyEye) run
Starting program: /uclinux/uClinux-dist/linux-2.4.x/linux
Breakpoint 1, start_kernel () at init/main.c:407
407 printk(linux_banner);
(SkyEye) b printk.c:459
Breakpoint 2 at 0xc01d5b4: file printk.c, line 459.
(SkyEye) c
Continuing.
Breakpoint 2, printk (fmt=0x0) at printk.c:459
warning: Source file is more recent than executable.
459 for (p = printk_buf; *p; p++) {
(SkyEye) step
467 }
(SkyEye) c
Continuing.
Breakpoint 2, printk (fmt=0x0) at printk.c:459
459 for (p = printk_buf; *p; p++) {
(SkyEye) del 2
(SkyEye) c
Continuing.
sim_info called
Program received signal SIGINT, Interrupt.
__wake_up (q=0x0, mode=3, nr=0) at sched.c:359
359 if (task_on_runqueue(p))
(SkyEye) c
Continuing.
sim_info called
Program received signal SIGINT, Interrupt.
__wake_up (q=0x0, mode=3, nr=3) at sched.c:740
740 state = p->state;
(SkyEye)
<SCRIPT type=text/javascript><!-- google_ad_client = "pub-3152530285624674"; google_ad_width = 468; google_ad_height = 15; google_ad_format = "468x15_0ads_al"; google_ad_channel =""; //--></SCRIPT><SCRIPT src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type=text/javascript> </SCRIPT>
作者: younghuangshdv 发布时间: 2006-05-08
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28