Re: tracking down error in MFC42.dll
- From: "Eric Margheim" <NOSPAM***eric@xxxxxxxxxxxxx***NOSPAM>
- Date: Wed, 30 Aug 2006 10:38:43 -0500
mfc42!CString::ConcatCopy + 0x1a
mfc42!operator+ +0x56
How did you resolve this?
1. Found the same version of mfc42.dll (it comes with Win2003 SP1).
2. Determined the addresses of the exported functions mentioned on the
call stack (Ordinal*). (I used WinDbg to do that, but the same can be done
with Dumpbin, Depends, etc.)
3. Run an application that uses mfc42.dll under debugger, downloaded
symbols
for mfc42.dll from the MS symbol server, and used the debugger to
determine
what function names correspond to the given addresses ('ln' command in
WinDbg
is very convenient for that (and VS2005 has a similar command), in older
VC
debuggers simply select the given address in Disassembly window and see
what function it belongs to).
The same could be done for your dll if it would be built with debug
information
(so in general it is recommended to generate debug information for release
builds too)
This part of the call stack is correct, so if necessary, it should be
possible to recover the name of the first function that belongs to your
component
(it will be possible if your component was built with debug
information).
This was with a release version that did not have debug info. I'm
attempting to duplicate with a debug version. If I can what tools do I
need to determine what function was the last function called within my
code?
If you put symbols (.pdb) of your dll on the target system (in the same
directory with the dll),
you will probably get the correct call stacks automatically. If symbols
were not available
by some reason, use the same approach as above - determine the location of
DllUnregisterServer in your dll, and use it (and debugger on your local
machine)
to calculate the function addresses and find the function names.
I put the .pdg file on the production server along with a debug build of the
DLL with debug information turned on. I'll see if I get an error today
what the call stack shows.
In the interim I'd like to try to use WinDbg to look into my DLL and use the
call stack info from yesterdays error, which was for a Release DLL with
debug symbols turned on.
I'm a real WinDbg neophyte so bare with me. Since dllhost.exe is the
actual process attaching to it is not going to get me where I need to go, is
this correct? Do I have to change my application to load my DLL inprocess
in order to dig into it to find out what code the call stack is referring
to?
Thanks for all your help.
.
- Follow-Ups:
- Re: tracking down error in MFC42.dll
- From: Oleg Starodumov
- Re: tracking down error in MFC42.dll
- References:
- tracking down error in MFC42.dll
- From: Eric Margheim
- Re: tracking down error in MFC42.dll
- From: Ajay Kalra
- Re: tracking down error in MFC42.dll
- From: Eric Margheim
- Re: tracking down error in MFC42.dll
- From: Oleg Starodumov
- Re: tracking down error in MFC42.dll
- From: Eric Margheim
- Re: tracking down error in MFC42.dll
- From: Oleg Starodumov
- Re: tracking down error in MFC42.dll
- From: Eric Margheim
- Re: tracking down error in MFC42.dll
- From: Oleg Starodumov
- tracking down error in MFC42.dll
- Prev by Date: Re: control list
- Next by Date: Re: Child dialogs not receiving focus
- Previous by thread: Re: tracking down error in MFC42.dll
- Next by thread: Re: tracking down error in MFC42.dll
- Index(es):
Relevant Pages
|