Re: Problems getting stack trace for VC6 build




I'm trying to get to use DBGHELP to get a stack trace. When I build
with VC7.1, everything works fine. When I build with VC6 (which
unfortunately is still used in our production environment), however,
the code is unable to find file/line information for the stack frames,
returning error 487 (invalid address). Interestingly, when I debug the
application is Visual Studio (VS.NET 2003) I have problems as well: I
can only see the disassembly view (with interleaved source) and any
attempt to go to the source code displays a dialog with the message
"The source code cannot be displayed".


Try the following options:

Compiler: /Zi /Od (the latter is optional, of course)
Linker: /debug /debugtype:cv /pdb:yourapp.pdb /pdbtype:con
(plus /opt:ref in release build)

All these options can be set in project settings, if necessary.

In the Modules view, my modules are listed with "Symbols loaded"
although the icon has a red exclamation mark decorating it (no idea
what that means).


It means that the module has been relocated (loaded at an address other
than its preferred base address).

--
Oleg
[VC++ MVP http://www.debuginfo.com/]


.



Relevant Pages

  • removing all dependency on MSVCR*.DLL
    ... linked into both VC6 modules and VS2005 modules. ... have the VS2005 runtime installed simply to run the installer. ... Linux and Mac version of the software and want to keep the source code ... string functions that are NOT proprietary Microsoft string functions ...
    (microsoft.public.vc.language)
  • Re: Event Sink in Visual C++ 6.0
    ... download this sample no matter how hard I try. ... > but the link to source code is gone. ... > shipped with VC6, ...
    (microsoft.public.vc.atl)
  • Re: Oracle Express
    ... source code of the Linux kernel and then used your modifications for ... I don't touch kernel code and I wouldn't touch a product where ...
    (comp.databases.informix)
  • Re: Porting from VC6 to VS2005
    ... few errors so you will probably change your source code. ... Create a backup directory. ... In my experience it is always pretty easy to get your code so it will compile both on VC6 and the later version, though I did resort to the macro trick for getting correct for loop scoping in VC6. ... The main trouble with VC6 is not that it would not accept correct code, but rather that it would allow some bad code. ...
    (microsoft.public.vc.mfc)
  • How can I conditionally include resources?
    ... I'm using VC6. ... sharing the same source code. ... I've set a preprocessor definition and I'm ... the source code in the other project's directory, but that seems like a bit ...
    (microsoft.public.vc.ide_general)

Loading