tags:

views:

332

answers:

3

I'm painfully debugging a legacy VS 6.0 MFC app, and I'd really like to step into MFC code. Now, the code did ship with VS6, and the symbols (mfc42.pdb) too, but the debugger asserts

'Symbols loaded (source information stripped)'

upon attaching. By these tips, all copies of mfc42.pdb on my machine are indeed stripped (their size is 1.5M-2M, nowhere near 10M). I get meaningful stacks, but am not able to step in MFC code.

I'm currently trying to re-compile MFC to obtain codeview symbols (yes, the situation is that desparate). I tried following this nice walkthrough by Daniel Howard, but I keep bumping into the following linker errors:

... delayimp.lib Creating library ..\lib\mfc42.LIB and object ..\lib\mfc42.exp mfc42.exp : error LNK2001: unresolved external symbol "public: int __thiscall CTime::operator==(class CTime)const " (??8CTime@@QBEHV0@@Z) mfc42.exp : error LNK2001: unresolved external symbol "public: int __thiscall CTime::operator!=(class CTime)const " (??9CTime@@QBEHV0@@Z) mfc42.exp : error LNK2001: unresolved external symbol "public: int __thiscall CTime::operator<(class CTime)const " (??MCTime@@QBEHV0@@Z) mfc42.exp : error LNK2001: unresolved external symbol "public: int __thiscall CTime::operator>(class CTime)const " (??OCTime@@QBEHV0@@Z) mfc42.DLL : fatal error LNK1120: 4 unresolved externals

CTime was implemented in TIMECORE.cpp, which indeed doesn't implement such operators. I couldn't locate the operator users.

Anyone has any insight into this? Any indirect advice would be great too.

+1  A: 

My memory is usually pretty bad and this was a long time ago, but I seem to remember that a version of the libraries compiled and linked for debugging was one of the additional options of the VC6++ installer.

innaM
Thanks Manni. VC6++ indeed comes with MFC42d.dll and the likes, if that is what you mean - but i need full symbols (codeview) for the production version, MFC42.dll. Do you remember installing *that*?I checked again per your reply - there was this MFC installation component called 'Source Browser'. Adding it didn't seem to make a difference, and googling around indicates its probably some sort of an object browser / intellisense predecessor.
Ofek Shilon
A: 

I'm still using VC6/MFC. I'd like to check your problem if you email me the code.

boxoft
Thanks, but it's not really feasible (large, proprietary project). Do you succeed in compiling MFC on your environment?
Ofek Shilon
+1  A: 

It is defined in AFX.INL in VC98\MFC\Include\AFX.INL. You've probably added only the .cpp to your project.

Stepping into MFC code is a must have. MFC code is a must see. It makes you humble and angry at the same time.

FenchKiss Dev