开发者

How to log all addresses executed while debugging with GDB?

Is it possible to log all executed addresses of a program while debugging it with GDB. So, what I try to achieve is to generate a list of addresses after the program executed successfully. I want to be able distinguish called addresses and not called addresses. An example of such a list would be (of course in practice a lot bigger):

0x80483e4
0x80483e6
0x80483e8
0x80483ea
0x80483ec
0x80483ef
0x80483e4

I have not found开发者_JS百科 a way to do this. Maybe you know a solution to my problem?


Why do you want to do that?

An exceedingly inefficient way to achive such trace in gdb:

while 1
 stepi
 x/i $pc
end

For analyzing coverage (parts of your program which are executed), try man gcov instead.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜