Re: Help tracking error
From: Oleg Starodumov (oleg_staro_at_hotmail.com)
Date: 10/14/04
- Previous message: Gary Chang[MSFT]: "Re: Conversion of VC6++ to VC.NET"
- In reply to: Mike Larson: "Help tracking error"
- Next in thread: Mike Larson: "Re: Help tracking error"
- Reply: Mike Larson: "Re: Help tracking error"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 14 Oct 2004 11:08:42 +0300
> I have developed a VC++ app that I compile into a DLL for use on a target
> machine, a Win98 machine. I cannot run the DLL on my development machine, a
> win2K machine, because I take advantage of being able to directly access
> hardware (I do plan on upgrading the DLL to work with Win2K and XP later but
> I have to fix this first).
>
> Anyway, I was able to install VC on the target machine and was able to
> catch an error that has been giving me grief. However, I can only see the
> code as disassembled. Is there a way I can trace the address in the
> disassembled code to the correcponding call in the C code?
>
You should produce debug information for the DLL, and make it available
on the target system.
If you are debugging a Debug build with default settings, you should already have
the debug information in two .PDB files in the output directory (yourdll.pdb and vc60.pdb
(assuming that you use VC60)).
Copy these files to the target and put them into the same directory as the DLL.
Also copy source files to the target. Then you can debug the DLL, and the debugger
should be able to find and load debug information for it.
After you have reproduced the problem, you might already be able to see
the offending source. If you still see disassembly, do R-Click | Go To Source
to see the source file. You might be asked for the path to the source file.
If you are debugging a Release build, produce debug information with the following
compiler and linker options:
Compiler: /Zi
Linker: /debug /debugtype:cv /pdb:yourdll.pdb /pdbtype:con /opt:ref
(all these options can be configured in the IDE, see documentation for the options)
If something still does not work, tell us - there are ways to troubleshoot it.
If you cannot reproduce the problem anymore but remember the faulting address,
there are also ways to recover the source file/line.
Regards,
Oleg
- Previous message: Gary Chang[MSFT]: "Re: Conversion of VC6++ to VC.NET"
- In reply to: Mike Larson: "Help tracking error"
- Next in thread: Mike Larson: "Re: Help tracking error"
- Reply: Mike Larson: "Re: Help tracking error"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|