Re: Help tracking error

From: Oleg Starodumov (oleg_staro_at_hotmail.com)
Date: 10/14/04

  • Next message: Oleg Starodumov: "Re: Viewing satic vars in the debug watch?"
    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


  • Next message: Oleg Starodumov: "Re: Viewing satic vars in the debug watch?"

    Relevant Pages

    • Re: Linking a LIB file
      ... <apellerin AT adeneo DOT adetelgroup DOT com> ... The dll source file contains: ... I even have a .def file for this dll file ... libraries. ...
      (microsoft.public.windowsce.embedded)
    • Re: how to protect source code of an application
      ... In ASP.NET 2.0 you can precompile everything and deploy little more than DLL ... .java file with the source), deployed on the client web server, and the ... have the source file and the only source files they have ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: NdisMInitializeWrapper Problem?
      ... The PCX500 driver from private folder is create PCX500.lib file. ... to create DLL already there is DLL but i am changing some code as to ... And my PCX500 Driver source file is: ...
      (microsoft.public.windowsce.platbuilder)
    • Re: Help tracking error
      ... If you have debug information for the executable, ... IMO the simplest way is to use a debugger: ... for a DLL, run its client and step until it has loaded the DLL). ... Select the disassembly line that corresponds to the given address, ...
      (microsoft.public.vc.debugger)
    • Re: How to reference custom control from App_Code folder?
      ... I have a custom control that is inside a DLL. ... source file for this DLL in a development folder on my machine, ... I presume that it's not compiling the source file, ...
      (microsoft.public.dotnet.framework.aspnet)