Unfortunately I lost my source code and I just have the output file that made with gcc in linux and I don’t have any access to my pc now.is there any way to convert output file to source file (in c under linux)?
|
So you had a cow, but you inadvertently converted it to hamburger, and now you want your cow back. Sorry, it just doesn't work that way. Simply restore the source file from your backups. Ah, you didn't have backups. Unfortunately, the universe doens't give you a break for that. You can decompile the binary. That won't give you your source code, but it'll give you some source code with the same behavior. You won't get the variable names unless it was a debug binary. You won't get the exact same logic unless you compiled without optimizations. Obviously, you won't get comments. I've used Boomerang to decompile some programs, and the result was more readable than the machine code. I don't know if it's the best tool out there. Anyway, don't expect miracles. |
|||
|