Tracing through MFC functions in NT - how? 
Author Message
 Tracing through MFC functions in NT - how?

Hi All

I am an MFC/C++ newbie, although I have many years
experience as a professional programmer. I am finding the
learning curve tough, and keep getting held up by
irritating hurdles. The current one is that I can step
through MFC functions fine on my Win98 box using VC++5,
but if I copy the same project folder to my NT4 box at
work, I cannot. I presume this is something to do with the
NT debug symbols? I noticed that there is an mfc42.pdb
file in the winnt\system32 folder, as there is in the
windows\system folder on my 98 box (presumably a different
file). Is this the file that resolves debug symbols on NT?

I also tried running the NT shortcut that the VC5 setup
creates to copy the NT debug symbols from the NT
installation CD (these are the .dbg files, right?), but it
said that the mfc42.dbg file did not match my dll - I'm
confused!

I have SP6 installed on the NT box.

Please tell me that it is indeed possible to trace into
mfc functions on an NT system - I really need to be able
to do this to help me understand and learn mfc.

Regards

Derek Johnston



Sat, 27 Dec 2003 05:39:30 GMT  
 Tracing through MFC functions in NT - how?

Quote:

> Hi All

> I am an MFC/C++ newbie, although I have many years
> experience as a professional programmer. I am finding the
> learning curve tough, and keep getting held up by
> irritating hurdles. The current one is that I can step
> through MFC functions fine on my Win98 box using VC++5,
> but if I copy the same project folder to my NT4 box at
> work, I cannot. I presume this is something to do with the
> NT debug symbols? I noticed that there is an mfc42.pdb
> file in the winnt\system32 folder, as there is in the
> windows\system folder on my 98 box (presumably a different
> file). Is this the file that resolves debug symbols on NT?

> I also tried running the NT shortcut that the VC5 setup
> creates to copy the NT debug symbols from the NT
> installation CD (these are the .dbg files, right?), but it
> said that the mfc42.dbg file did not match my dll - I'm
> confused!

> I have SP6 installed on the NT box.

> Please tell me that it is indeed possible to trace into
> mfc functions on an NT system - I really need to be able
> to do this to help me understand and learn mfc.

> Regards

> Derek Johnston

To step through MFC functions all you should need is the MFC source
files and the MFC42D.pdb file.  (Note the 'D', which is used for debug
builds.)  The MFC source files might not be installed by default, so if
you can't find them run the VC CD again and review the customize
options.  The NT debug symbols are unrelated to stepping through MFC.

--
Scott McPhillips [VC++ MVP]



Sat, 27 Dec 2003 08:50:15 GMT  
 Tracing through MFC functions in NT - how?

Quote:
>-----Original Message-----

>> Hi All

>> I am an MFC/C++ newbie, although I have many years
>> experience as a professional programmer. I am finding
the
>> learning curve tough, and keep getting held up by
>> irritating hurdles. The current one is that I can step
>> through MFC functions fine on my Win98 box using VC++5,
>> but if I copy the same project folder to my NT4 box at
>> work, I cannot. I presume this is something to do with
the
>> NT debug symbols? I noticed that there is an mfc42.pdb
>> file in the winnt\system32 folder, as there is in the
>> windows\system folder on my 98 box (presumably a
different
>> file). Is this the file that resolves debug symbols on
NT?

>> I also tried running the NT shortcut that the VC5 setup
>> creates to copy the NT debug symbols from the NT
>> installation CD (these are the .dbg files, right?), but
it
>> said that the mfc42.dbg file did not match my dll - I'm
>> confused!

>> I have SP6 installed on the NT box.

>> Please tell me that it is indeed possible to trace into
>> mfc functions on an NT system - I really need to be able
>> to do this to help me understand and learn mfc.

>> Regards

>> Derek Johnston

>To step through MFC functions all you should need is the
MFC source
>files and the MFC42D.pdb file.  (Note the 'D', which is
used for debug
>builds.)  The MFC source files might not be installed by
default, so if
>you can't find them run the VC CD again and review the
customize
>options.  The NT debug symbols are unrelated to stepping
through MFC.

>--
>Scott McPhillips [VC++ MVP]
>.

Hi Scott

I should have mentioned that I have indeed installed the
MFC source files. The MFC42D.pdb file is also present.

Derek



Sat, 27 Dec 2003 14:42:59 GMT  
 Tracing through MFC functions in NT - how?
Hi, DereK;

I assume you are doing a debug build and using mfc as shared library.

If so,   you need to copy the mfc42d.pdb file from the VC5 to
winnt\system32 directory.

In the output window in the IDE,  VC5 reports if a dll symbol can be loaded
or not.   What does it say about mfc42d.dll.
If it states, no matching symbolic information found for mfc42d.dll, then
the pdb file and dll does not match.
Check the mfc42d.dll on the Winnt to make sure it is from vc5.0.

You can use
http://support.microsoft.com/servicedesks/fileversion/dllinfo.asp to
determine which version of the mfc42d.dll you have.

Thanks

James Wang



Sun, 28 Dec 2003 02:37:17 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. MFC encapsulation for NT service functions

2. Trace Writing to particular Trace Listeners

3. MFC TRACE MACRO equivalent in C

4. tracing function calls like strace

5. function call trace

6. Function call trace

7. Tracing function entry and exit

8. trace function calls

9. Unable to trace MFC

10. trace function calls

11. Tracing into MFC source files (Help)

12. Newbie: How to TRACE when not using MFC?

 

 
Powered by phpBB® Forum Software