MOOC-Linux内核lab3 调试内核从start_kernel到init进程启动
2015-03-21 06:18
351 查看
linux3.18 内核非常庞大, 有许多模块,本周实验使用gdb从start_kernel函数入手,调试内核。首先,设置实验环境,载入menuOS。为了进行调试, 需要在编译时,在代码中加入调试信息。
make menuconfig之后在图形菜单里选择hacking kernel,接着再重新编译,准备就绪!在start_kernel处设置断点后,continue即进入函数。3.18内核非常庞大, 有许多模块,但都是从start_kernel为入口,推荐以下几个函数进行跟踪学习。<span style="white-space:pre"> </span>trap_init(); //初始化中断向量mm_init(); //初始化内存模块/** Set up the scheduler prior starting any interrupts (such as the* timer interrupt). Full topology setup happens at smp_init()* time - but meanwhile we still have a functioning scheduler.*/sched_init(); //初始化调度模块
<span style="white-space:pre"> </span>/* Do the rest non-__init'ed, we're now alive */<span style="white-space:pre"> </span>rest_init(); //初始化idle进程(0号进程)Linzhe+原创作品转载请注明出处 + 《Linux内核分析》MOOC课程http://mooc.study.163.com/course/USTC-1000029000
相关文章推荐
- Linux内核分析之三——使用gdb跟踪调试内核从start_kernel到init进程启动
- Linux内核分析-使用gdb跟踪调试内核从start_kernel到init进程启动
- 使用gdb跟踪调试内核从start_kernel到init进程启动
- 跟踪内核从start_kernel到init进程启动
- 跟踪分析Linux内核的启动过程(start_kernel到init进程启动)
- MOOC课程《Linux内核分析》——start_kernel();Idle进程与Init进程
- 内核启动kernel_init(init)进程分析
- (作业3)Linux内核的启动过程(从start_kernel到init进程启动)
- Linux系统启动分析-从start_kernel到init进程的启动
- linux启动流程(从start_kernel中的rest_init函数到init进程(1))
- start_kernel到init进程启动的过程
- 分析Linux内核启动过程:从start_kernel到init
- 从start_kernel到init进程启动 《Linux内核分析》笔记
- 内核启动阶段kernel_init(init)进程分析
- kernel 启动过程之四,start_kernel中的rest_init函数到init进程
- MOOC课程《Linux内核分析》——start_kernel();Idle进程与Init进程
- 分析Linux内核启动过程:从start_kernel到init
- start_kernel到init进程启动的过程
- kernel 启动过程之三, start_kernel()函数 概叙!init/main.c
- ARM架构内核启动分析-head.S(1.4、stext分析之打开MMU并跳到start kernel)