MIT 6.828的lab1
2014-06-14 18:18
661 查看
lab1唯一需要写的代码就是第三部分,backtrace的代码如下,其实这一部分,并不难,就是自己拖了太长时间,拖延症很严重。
uint32_t ebp,eip; struct Eipdebuginfo info; int i=0; ebp=read_ebp(); while(ebp!=0) { eip=*((uint32_t *)(ebp+4)); // change ip to addr // debuginfo_eip(uintptr_t addr, struct Eipdebuginfo *info) debuginfo_eip((uintptr_t)eip,&info); cprintf("ebp %0x eip %0x ",ebp,eip); cprintf("args "); for(i=0;i<=4;i++) cprintf("%0x ",*(uint32_t *)(ebp+8+4*i)); cprintf("\n"); cprintf(" eipfile: %s eipfunc: %s ",info.eip_file,info.eip_fn_name); cprintf("\n"); ebp=*((uint32_t *)ebp); }
相关文章推荐
- MIT 6.828 学习笔记5 Lab3实验报告
- MIT 6.828 学习笔记3 Lab1实验报告
- MIT-6.828 Lab2实验报告
- MIT6.828 Lab 5: File system, Spawn and Shell
- MIT6.828 Fall 2012 Lab 1: Booting a PC
- MIT6.828 LAB4 PartB
- MIT 6.828 JOS学习笔记4. Lab 1 Part 2.1: The Boot Loader
- MIT6.828 Lab2: Challenge
- MIT操作系统课程CS6.828实验(2) —— 实验工具指导
- MIT6.828课程JOS在macOS下的环境配置
- 以前做MIT 6.828练习的一点总结
- MIT-6.828-lab1.1
- Mit 分布式系统导论,Distributed Systems ,lab1 -lab6 总结,实验一到实验六总结
- mit 6.828
- MIT 6.828 JOS学习笔记5. Exercise 1.3
- [MIT 6.824 Distributed System] Lab 1: MapReduce (2016)
- MIT 6.828 学习笔记6 Lab4实验报告
- MIT操作系统课程CS6.828实验(3) —— 启动PC(Lab1)
- MIT jos 6.828 Fall 2014 训练记录(lab 5)