私のプログラム "./myprog"の全体トレースリストを取得したい - 私はGDB 7.0-ubuntuを持っています(私のアーキテクチャの新しいバージョンは存在しません)。 私のGDB-スクリプト( "./trace_list.gdb"):GDBの助けを借りてプログラムのトレースリスト全体を取得するには?
gdb -q -x ./trace_list.gdb
file ./myprog
set print address off
display/x $r0
display/x $r1
display/x $r2
display/x $r3
display/x $r4
display/x $r5
display/x $r6
display/x $r7
display/x $r8
display/x $r9
display/x $r10
display/x $r11
display/x $r12
display/x $sp
display/x $lr
display/x $fps
b *0x323d0
set logging on
run
while 1
x/i $pc
ni
end
quit
それは、ある瞬間のために良い作品。 次に、書き込みます:
"./trace_list.gdb":26: Error in sourced command file:
Cannot access memory at address 0x6b980000
これ以上実行しません。
このエラーはなぜ発生しますか? プログラムのトレースリスト全体を取得するにはどうすればよいですか?私は他のツールを使用する必要がありますか?私には分かりません。このエラーが発生しないのはなぜ
「全トレースは実際には非常にまれに有用です」 - プログラムが難読化されている場合でも? –
いくつかのブレークポイントの間にプログラムのトレースを取得すると便利です。しかし、「アドレスでメモリにアクセスできない」と、キーボードを破棄してモニタをウィンドウの外に出すように強制します。 P.S.プログラムは、記号的な情報なしで静的に(gcc - 静的に)組み立てられます。 –
ありがとう、relpy! :) –