1

I'm debugging the JOS kernel (from mit operating system lab) in qemu with ddd. I set a breakpoint on the assembly instruction calling the kernel main function i386_init defined in init.c. when i launch the kernel, ddd (gdb) breaks well on that instruction with the green arrow displayed ; but when i used the stepi command, the green arrow disappears and ddd does not open the file supposed to contain the i386_init() definition. And the debug process continues with gdb only. ddd does not follow the process. More over, when i opened the file init.c, ddd shows this error:

Line 1 of \"kern/init.c\" is at address 0xf0100040 but contains no code.\n

I have done some researches on this kind of error and it seems that the problem comes from dynamic libraries. But in my case, there's no dynamic library. So what can cause this kind of problem and how to fix it?

4

1 回答 1

1

问题是由我构建的交叉编译器引起的,我认为它可能有点错误。因为我更改了编译器,所以 ddd 现在可以正常工作了。

于 2015-02-11T15:13:54.387 回答