error recovery via decompile?

error recovery via decompile?

Today, while creating a new module, I opened an existing module's source code to use as a template, and ended up saving the new code before realizing I hadn't renamed the new file. So, of course, it saved over the old source code file. And I had neglected to backup the original file before starting this adventure (I know - cardinal sin for a programmer!). I have not yet recompiled the new module, so the compiled module is still from the original file, and I am wondering if there is a way to recover the original source file from the compiled module. It is a small module, containing only some global variable declarations, so I can recreate it (if I have to!) but I was hoping to not have to type it all in again. Any ideas?

4 帖子 / 0 全新
最新文章
如需更全面地了解编译器优化,请参阅优化注意事项
Steve Lionel (Intel)的头像

Not that I know of.

Steve

Steve

I knew that would be the answer, but I had to ask! I have now re-entered all the data from an old printout, then recompiled and noted which variables were missing from the old printout and added them back in. Not as tedious as I thought it would be, since I had the printout anyway. Oh, and I won't forget those backups now! Thanks.

Several "decompilers" exist, but all result in some obscure but correct assembler code.

Another solution for overwriting files is to avoid any filesaving and disc writing afterwards (impossible) and use a tool to capture lost non-consecutive file segments on non-file disk sections.
In other words:

Bad luck for you.

So if you lost a goldmine, keep your hands off from mouse and keyboard, don't shutdown your computer and call a data-recover-specialist (find his telephone number right now).

If it was just a silvermine, you still made a serious error.
Not a programmers one as you mentioned, but one any computer user should avoid.

What you didn't do:
- Automatic full-backups, daily or periodically
- If necessary, important intraday copies in between
- Have your backup procedure checked, are you able to recover any existing backup ?
- Backups removed from your building and store elsewhere

davinci

登陆并发表评论。