2017-10-24 12 views
1

私は今MIT-josMITのヨス・ラボ、どのように私は(bootmainにブレークポイントを設定することができます)まず

からOSの実装を学んでいると私は、ブート/メインに位置しbootmain(無効)をトレースしたいです.C

しかし、私はそこにブレークポイントを設定する方法がわからない、私は両方のブートにGDBのソースディレクトリを設定します

とOBJ /ブート

私はbootmain(無効)にブレークポイントを設定
(gdb) dir boot:obj/boot 
Source directories searched:  
/home/osdi/lab/boot:/home/osdi/lab/obj/boot:$cdir:$cwd 

、 GDBは文句:

(gdb) b bootmain 
Function "bootmain" not defined. 
Make breakpoint pending on future shared library load? (y or [n]) 
ので

、私が正しくbootmainにブレークポイントを設定する方法(無効?)

第二に、 私はアドレスでのみブレークポイントを設定することができます

(gdb) b *0x7c00 
Breakpoint 1 at 0x7c00 

私は、コードを一覧表示したい場合、GDBは再び「そのようなファイルやディレクトリを」文句を言うん

[ 0:7c00] => 0x7c00: cli  
Breakpoint 1, 0x00007c00 in ??() 
(gdb) list 
1 {standard input}: No such file or directory. 
    in {standard input} 

だから、どのように私は正確な情報を一覧表示することができますか?

おかげで〜

答えて

0

boot/boot.asm

call bootmain 
    7c45: e8 c0 00 00 00 call 7d0a <bootmain> 

Bootmain機能のトレース0x7d0a

から始まります
関連する問題