Question

I'm trying to use Purify 6 to analyze a memory corruption in one of our executables built with VC++ 2003 (7.1).

When I instrument the binary with the command:

purify /Replace=yes /Run=no myprog.exe

The instrumentation aborts telling me the executable was incrementally linked. Puzzled, I checked the build options but /INCREMENTAL:NO was there. To be sure, I rebuilt it and the option was correctly passed at link time.

Is there a way to know whether an executable was incrementally linked or not ?

I had a look at what dumpbin /HEADERS says but didn't see anything relevant.

Thanks.

Was it helpful?

Solution

Option 1:

c:...>dumpbin /summary whatever.exe

Look for a ".textbss" section.

I'm not sure this is 100% reliable, but in my experience the linker always adds this section when doing incremental linking.

Option 2:

Look for an ".ilk" file next to the executable. Visual Studio seems to be good about cleaning these up when they're not used, so disabling incremental linking and building (not even a "rebuild") should remove it.

Option 3:

Enable build logging (Tools/Options/Projects) and look for "/INCREMENTAL" or "/INCREMENTAL:NO" in the buildlog.html file that it generates.

Option 4:

Parse the .vcproj file. (ick!)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top