Having recently moved up from Dos assembly programming I am getting used to the 32 bit stuff. I have followed Softice's instructions for getting the symbols into it. When linking I get " warning LNK4037:CVPACK error". Using translate in softice's symbol loader I get a warning telling me the codeview info is incorrect. If I dissassemble using IDA i get a similar error. When the file is open under IDA the debug info is there. Can anyone point me in the right direction?

Posted on 2001-08-29 02:02:52 by qui-gon
For Win32 Apps use link options /DEBUG /DEBUGTYPE:CV /PDB:NONE. Source should be in same directory as exe/dll. Are you using a PE linker?

Posted on 2001-08-29 03:21:40 by japheth
Thanks for the reply. All the files are in the same directory and I am using only the standard linker Link.exe which came with the masm32 kit. I am using the debug string you suggest as it is in the softice manual.Any other ideas?
Best Regards
Posted on 2001-08-29 11:14:47 by qui-gon
You need CVPACK.EXE. It's a "Debugging Information Compactor" utility from MS that link calls.

I'm not sure if it's "freeware" or not. It did ship with the retail versions of MASM, and now ships with Visual Studio (VC++).

Good luck... :)
Posted on 2001-08-29 22:10:09 by S/390
Thanks S/390 for the tip........I scoured microsoft's site without success! I remembered someone gave me Ms visual basic version 6 enterprise edition which I could not get along with (he couldn't either I think!). The files are on there also. The version is later than the ones supplied with masm32 downloaded from Hutch's site. I have tried them and they work with softice!! I just hope I haven't upset anything else. For information the versions are as follows:

Supplied with masm32 v6

link.exe version 5.012.80780 which uses
mspdb50.dll version 6.00.7156. there is no cvpack.exe supplied

Supplied with Ms visual basic v6.0

link.exe version 6.00.8168
cvpack.exe version 6.00.8168
mspdb60.dll version 6.00.8168

Can anyone confirm these are the latest?
Best Regards
Posted on 2001-08-30 02:37:45 by qui-gon
Newer versions of LINK should work fine. I'm using 6.00.8447 that came with the processor pack update. :)
Posted on 2001-08-30 03:54:11 by S/390

Just be careful with the later versions of LINK, they usually have different default alignment for C++ which is too big for assembler files. The linker in MASM32 is from the win98ddk and it is default aligned for VxD files so it will come out smaller. You can use the later linker if you explicitly specify the alignment but it may display an error doing so.


Posted on 2001-08-30 08:18:35 by hutch--
You can get the latest version of CVPACK either on the windows 98 SDK or the windows 98/95 DDK it's on one of the two (i have a feeling it's the DDK). Both are freely available on the msn site. the sDK is (or was) available for $16 as opposed to the full $1000 subscrition cost. It's called the 'whistler' edition and it may still be available. Basically you get ALL the SDK onb a CD, but no updates, so it's a one off, for $16. ANd htta includes all the win32 docs u would ever need ;-) I have 2 copies of it !
Posted on 2001-08-31 09:01:43 by CodeBug
Hutch, first of all the alignment is easy to fix. /FILEALIGN:512 or
/OPT:NOWIN98. Second of all, the alignment isn't really "too big
for assembler files". It's too big for small project, but I'd recommend
the 4096-byte filealign for larger projects. Why? First of all, you're
not going to feel the slack space of the alignment very hard in larger
exe files. Second, 4096-byte file alignment makes the work of the
caching subsystem, the protection subsystem, the PE loader and
the swap system much easier, due to the paged nature of the x86.
I don't know how much this matters, but I feel that it might be "some"
on a larger application.

Just my two cents. And yeah, most of my asm is small enough that
I use 512-byte file align and section merging :)
Posted on 2001-08-31 10:38:37 by f0dder

The problem is that is is really hard to write a 1 meg or larger assembler file (not counting resources) in a lifetime. I straight code, this is an enormous amount of code yet the threshold for loading big C++ pigs is still not needed with a 1 meg program.

With properly written assembler you get very high density code for a given EXE size which is not common in C++ and similar. 16k alignment is a botch up by Microsoft to cover up the deficiencies of badly produced C++ code. You can get similar code density in Microsoft C but it is not packed with junk and it works better with :4096 as well.

Big files have longer load times, the gains in alignment for large files is trivial where the decrease in size is very noticably.


Posted on 2001-08-31 19:22:11 by hutch--
Hi Guys
Thanks for the input. I had found that the .exe file had gone to standard Ms bloatware size. The /FILESIZE:512 restored it to it's original sylph-like self. At least I can use the 'ice properly for debugging!


Posted on 2001-09-01 01:28:28 by qui-gon