C++ 什么工具可以将DLL反编译成C++源代码?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1322194/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What tool can decompile a DLL into C++ source code?
提问by Lea Cohen
I have an old DLL that stopped working (log2vis.dll) and I want to look inside it to see what objects it uses.
The DLL was written in C++ (not .NET). Is there a tool that will decompile/disassemble C++ files?
我有一个停止工作的旧 DLL (log2vis.dll),我想查看它的内部以查看它使用的对象。
DLL 是用 C++(不是 .NET)编写的。是否有可以反编译/反汇编 C++ 文件的工具?
回答by unwind
This might be impossible or at least very hard. The DLL's contents don't depend (a lot) on it being written in C++; it's all machine code. That code might have been optimized so a lot of information that was present in the original source code is simply gone.
这可能是不可能的,或者至少非常困难。DLL 的内容并不(很多)依赖于它是用 C++ 编写的;都是机器码。该代码可能已经过优化,因此原始源代码中存在的许多信息都消失了。
That said, hereis one article that goes through a lot of material about doing this.
也就是说,这里有一篇文章介绍了很多关于这样做的材料。
回答by Malkocoglu
回答by RvdK
I think a C++ DLL is a machine code file. Therefore decompiling will only result in assembler code. If you can read that and create C++ from that you're good to go.
我认为 C++ DLL 是一个机器代码文件。因此反编译只会产生汇编代码。如果您可以阅读并从中创建 C++,那么您就可以开始了。
回答by Szczepan
回答by Szczepan
There really isn't any way of doing this as most of the useful information is discarded in the compilation process. However, you may want to take a look at this siteto see if you can find some way of extracting something from the DLL.
确实没有任何方法可以做到这一点,因为大多数有用的信息在编译过程中都被丢弃了。但是,您可能需要查看此站点,看看是否可以找到某种方法从 DLL 中提取某些内容。
回答by Naim Arnold
The closest you will everget to doing such thing is a dissasembler, or debug info (Log2Vis.pdb).
你最近曾到做这样的事是反汇编,或调试信息(Log2Vis.pdb)。