Archived

This topic is now archived and is closed to further replies.

msiren

recovering .cpp with visual studio!!!!!

Recommended Posts

So a question about visual studio. We all, who have used visual c++, know that when compiling in debug mode vs makes these huge files in the debug dir, so we have to buy bigger harddrives(a conspiracy by microsoft and hardware vendors surely). Ok so to the point. These huge files should contain all kind of debug data. Even the original source code lines. I have come to believe this. If you know for 100% this is not true please say so with no delay. But if this is true and I accidently deleted a .cpp source file or something like w2k crasher while doing stuff and when rebooting you let w2k check harddrives and the scandisk or what ever loses one or two of these .cpp files, just to take a wild example, would it be possible to recover the code from these huge debug data what evah files???? Is there any program that would allow browsing the info in these files or even a program that would extract the .cpp sources from these files?

Share this post


Link to post
Share on other sites
firstly, you''re conception of what object files include may be a bit blurred. you might want to possibly read up on the "PE COFF" standard Microsoft uses for Win32. AFAIK, MS does NOT include the original source code into the object files, (unless encrypted and assuming visual studio 5.0 and 6.0). however, there is a COFF disassembler which comes with visual studio, called "dumpbin.exe" which allows you to view the contents of object and image files in categorical layout.

if you are worried about keeping your source code safe, you should try using Windows 2000, visual source safe and a RAID HDD implementation.

do i think "debug" files being large, are a conspiracy between MS and HDD vendors". not, really. i appreciate the ability to step through code, edit and continue, watch variables while debugging.


peace.

To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.

Share this post


Link to post
Share on other sites
this is NOT to say, that a compiler could NOT include source code into the object file, but this method is NOT taken with Microsoft VisualStudio 5.0 and 6.0.

peace.

To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.

Share this post


Link to post
Share on other sites
If the debug files contained the source code, then Visual Studio wouldn''t require the source files to be available during debugging. It does, and therefore that (to me) is a strong indication that the source code is not included. I think it does include references to line numbers perhaps, but not the code itself.

Share this post


Link to post
Share on other sites