holodec
holodec copied to clipboard
PDB files
It'll be nice if your decompiler could take advantage of PDB file during decompilation.
Yes, that would definitely be nice but is very far down my list of priorities at the moment. There are a few reasons for that. The first and most prominent one is that I got first results which are ok, but not on a level that I am satisfied with. A lot of the problems stem from the fact that the whole process that I use is not very well designed. I noticed that earlier but wanted to get at least some results first. That is why I am currently in the process of rewriting most of the code to be much cleaner. The second reason is that PDB files are a nice well of information but if you have PDB files you most likely also have the source code, which makes the whole process of decompilation unnecessary. That is also why DWARF parsing is not something I will do in the immediate future. The third reason is that currently, I do not support PE-binaries and concentrated most of the work on ELF-binaries. Once that is working I will try to include PE-binaries as well. Once that is done PDB-files and DWARF-information are next but that will take some time to do.
I agree with all of that. except
The second reason is that PDB files are a nice well of information but if you have PDB files you most likely also have the source code
Yes, If you have PDB file + Binary file you have the source code, BUT is there any tool to export that source code? nope, IDA does it, but it generates pseudo C code which takes time to make that codes compilable and snowman doesn't support PDB file.
Thanks for answer.
I am not too familiar with PDB files, but I doubt you can reconstruct the actual source from the PDB-file plus binary. The PDB file afaik only holds type/symbol information and the information needed to map back to a line in the source code. This is not enough to reconstruct the source code itself but it helps. What I really meant was that if you have the executable with the debugging information then you most likely also have access to the original source code that it was compiled with, because software is rarely distributed to users with debugging information attached.
IDA does it, but it generates pseudo C code
Do you mean IDA or Hex-Rays? Because Hex-Rays is a full-fledged decompiler and does much more than just analyze PDB-files.
Do you mean IDA or Hex-Rays? Because Hex-Rays is a full-fledged decompiler and does much more than just analyze PDB-files.
Hex-Rays IDA Pro is shipped with Hex-Rays Decompiler. In the main page of Hex-Rays Decompiler, the first paragraph says:
We are pleased to present our flagship product, the Hex-Rays Decompiler, which brings binary software analysis within reach of millions of programmers. It converts native processor code into a human readable C-like pseudocode text.
So produced code of Hex-Rays Decompiler have a chance to be compilable with a C\C++ compiler without reviewing and editing but in many cases such as __usercall subroutines decompiled code isn't a valid C code.
Regards.