Click to See Complete Forum and Search --> : compiled code --> source code???
robgramer
April 30th, 2003, 09:30 AM
hi,
i accidentally erased a rather important source code file (simple text file created with vi on a linux machine) but luckily compiled it beforehand.
is it possible to take a compiled program and get back the original (or nearly original) source code text?
thanks!
-R.G.
robgramer
April 30th, 2003, 09:40 AM
i'm using the "cc" compiler in linux to compile my programs.
-R.G.
Andreas Masur
April 30th, 2003, 09:40 AM
Take a look at this thread (http://www.codeguru.com/forum/showthread.php?s=&threadid=172993)...
robgramer
April 30th, 2003, 10:00 AM
hi,
thanks for the link to that thread. i did read it and found it interesting. so are you recommending that i get that program "ice" or whatever it's called?
-R.G.
Gabriel Fleseriu
April 30th, 2003, 10:13 AM
Originally posted by robgramer
hi,
thanks for the link to that thread. i did read it and found it interesting. so are you recommending that i get that program "ice" or whatever it's called?
-R.G.
Before spending your money on SoftIce, take the time and read that thread. It is not possible to reverse engineer a C++ program. No tool on this planet is able to take a compiled file and to re-create the C++ code for it.
In your case, it is much less expensive to re-write the code than to try to reverse engineer the image.
robgramer
April 30th, 2003, 10:33 AM
ok, thanks. i'm writing in just C actually, but it seems that what you've said applies to C as well. yeah, i'm definitely not going to buy a program like softice. i am just a beginning programmer who made a mistake of deleting a file and was curious if there was an easy fix to getting my source code back.
thanks again for the help.
-R.G.
Gabriel Fleseriu
April 30th, 2003, 10:38 AM
Originally posted by robgramer
ok, thanks. i'm writing in just C actually, but it seems that what you've said applies to C as well. yeah, i'm definitely not going to buy a program like softice. i am just a beginning programmer who made a mistake of deleting a file and was curious if there was an easy fix to getting my source code back.
thanks again for the help.
-R.G.
I've heard that there are some tools that reverse images to C, but I've also heard that the produced code is practically un-readable. In other words, not worth the effort. For the sake of completeness, I must say that I never used such a tool, so my information is not "first hand".
Sorry that you've lost the code, I know how frustrating that is. I wish you good luck in re-writing it :)
Paul McKenzie
April 30th, 2003, 10:53 AM
Originally posted by robgramer
ok, thanks. i'm writing in just C actually, but it seems that what you've said applies to C as well. yeah, i'm definitely not going to buy a program like softice. i am just a beginning programmer who made a mistake of deleting a file and was curious if there was an easy fix to getting my source code back.
thanks again for the help.
-R.G. Maybe when you rewrite it, the program will be better than the first version :)
Regards,
Paul McKenzie
Graham
April 30th, 2003, 10:59 AM
Doesn't linux have a recycle bin that you can retrieve accidentally deleted files from?
<sarcasm>And there was me believing all that stuff about how Linux does everything so much better than Windows :) </sarcasm>
Philip Nicoletti
April 30th, 2003, 11:10 AM
Well, I use gnome on my Linux boxes, and if I
delete using the window manager, it goes to
my trash folder. If I remove from a terminal it
doesn't (but I don't think Windows does either).
And with daily/weekly backups from my raid 5 system
to another raid 5 system located about 75 miles
away, its pretty difficult for me to lose much data !
robgramer
April 30th, 2003, 12:29 PM
unfortunately i deleted the file from the command prompt in linux so it's deleted in the full sense of the word i think.
if i had done this in windows (even in DOS), the file wouldn't have been erased, only its reference in the File Allocation Table if I remember correctly. And there are many programs that can "un-delete" files (you simply lose the first character of the file name for some reason).
-R.G.
Luis G
April 30th, 2003, 01:08 PM
I've heard of an undelete tool for Linux, try searching freshmeat.net
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.