记录二进制文件的行为?
我想弄清楚当命令行标志传递给 Windows 上的程序时,哪些指令的执行方式不同,其中我有编译(和优化)的二进制文件,没有调试符号或任何那种。我知道区别不会超过一些指令。
我该如何解决这个问题?是否有任何技术可以准确记录程序在特定时间段内执行的指令?
(请注意,这不涉及任何系统调用,只是由于命令行标志而在循环中设置了一个标志。)
I want to figure out which instructions are executed differently when a command-line flag is passed to a program on Windows, of which I have the compiled (and optimized) binary, with no debug symbols or anything of the sort. I know the difference will not be more than a handful of instructions.
How would I go about figuring this out? Are there any techniques for logging exactly which instructions a program executes over a certain period of time?
(Note that this does not involve any system calls, just a flag being set in a loop because of the command-line flag.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 AMD 的 CodeAnalyst 来执行此操作,使用基于指令的分析方法。它还具有一个 API,您可以在应用程序中触发事件,以便您可以监控特定区域。您还可以使用反汇编器,据我所知,您使用“指令”一词来表示高级代码操作和低级机器代码(执行不能改变,只有编译器发出的代码可以改变执行高级操作)。
You can use AMD's CodeAnalyst to do this, using the instruction based profiling method. It also has an API you can all within you app to trigger events so you can monitor specific regions. You can also use a disassembler, as from what I understand, your using the word 'instruction' to mean both high level code operations and low level machine code(who execution cannot change, only the emitted code from the compiler can change the execution of high level operations).