分析没有源代码的编译代码?

时间:2022-06-01 19:17:54

I'm working with an application that has a SDK for it and a bunch of dev tools, I also did a lot of code analysis using IDA Pro on it so I'm quite comfortable with it. It's basically, to put it short, a gameserver application, so you can see the kind of stuff I'm dealing with : supports mods, so there is to be some documented internals of it, which makes it easier to deal with its assembly.

我正在使用一个带有SDK的应用程序和一堆开发工具,我也使用IDA Pro进行了大量的代码分析,所以我对它很满意。基本上,简而言之,游戏服务器应用程序,所以你可以看到我正在处理的东西:支持mods,所以它有一些记录的内部,这使得它更容易处理它的程序集。

However the source code not being released it is difficult for me to put my finger on a source of, I would say, "CPU overhead" I'd like to identify in order to maybe rewrite that part using DLL injection for example to "replace" the offending code, or even suppress it, depending on how its needed.

然而,源代码没有被释放,我很难把我的手指放在一个源头上,我想说,“CPU开销”我想识别,以便可能使用DLL注入重写该部分,例如“替换” “违规代码,甚至压制它,取决于它的需要。

I wonder, is it possible to profile a binary executable that you can't get the source code of? Something that could analyse the code at the opcode/assembly level?

我想知道,是否可以分析一个你无法获得源代码的二进制可执行文件?能够分析操作码/汇编级代码的东西吗?

Thanks!

1 个解决方案

#1


You are correct that traditional profiles such as gprof work by inserting additional code at compile time and will not be helpful in your current situation.

你是正确的,传统的配置文件,如gprof通过在编译时插入额外的代码工作,并在你当前的情况下没有帮助。

Perhaps a tool like Valgrind can help.

也许像Valgrind这样的工具可以提供帮助。

#1


You are correct that traditional profiles such as gprof work by inserting additional code at compile time and will not be helpful in your current situation.

你是正确的,传统的配置文件,如gprof通过在编译时插入额外的代码工作,并在你当前的情况下没有帮助。

Perhaps a tool like Valgrind can help.

也许像Valgrind这样的工具可以提供帮助。