How to find the C++ source lines given a crash address?

In VS2003 you used to be able to find source code lines from a crash address using the MAP file generated with /MAPINFO:LINES. In VS2005 this doesn't seem to be possible.

I have found a handfull of references on the web that say that the source line can be found from the crash address using the exe and the pdb file, but I can't figure out how to do this in VS 2005.

The code I'm wanting to debug is a wrapped unmanaged assembly written in C++ called from a main program written in VB.

Is this described in any of the documentation, if not then how can it be done



Answer this question

How to find the C++ source lines given a crash address?

  • Dave Yuhas

    If you have a pdb file, than you can use the CrashFinder as I wrote in my post. Even with the pdb file it is difficult, because the crash address might be somewhere in the callstack in a different module, that causes the error because a wrong address or parameter was given in the caller of the function that causes the crash.

    And hopefully the module that caused the crash is not relocated!



  • TetsuKaben

    It is possible that the crash address is outside the range of your program. If the crash address is inside a OS DLL you will only find the crash address if you have the pdb files for this files too. But usually you don't have them.



  • kurbylogic

    Take a look at this past post: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=150894&SiteID=1

    Hope this helps!

    Thanks,
    Ayman Shoukry
    VC++ Team


  • Massimo Galati

    Does anyone know how to use CrashFinder I followed all of the instructions in the article and couldn't get it to work.

    When I try to find a crash with it I get "no function at that address"

    The only copy I've been able to get is Apr98Bugslayer.exe, because the page with CrashFinder 2.1 seems to be gone.


  • mannato

    Search for CrashFinder in the MSDN. This is another way.

  • redfox70

    Thanks, I had already seen that post, it provides an alternative solution but it doesn't answer the question.

    In this case I don't have a minidump, I only have the crash address.

    Does this mean that there is no way to translate a crash address to to a source line other than by using the minidump

     


  • msnemailchange

    Thanks Martin,

    Crashfinder looks like the best option, since it seems that since they removed the /MAPINFO:LINES option in VS2005 it's not possible to translate the address any other way.

    I found crashfinder  here:

    http://www.wintellect.com/about/instructors/robbins/code.aspx

    So far it doesn't give a sensible answer but I'm still working on it.

     


  • TonyRusin

    My program crashed with the following entry in the event viewer application log:

    Event Type: Error
    Event Source: Application Error
    Event Category: (100)
    Event ID: 1000
    Date: 1/17/2007
    Time: 11:44:38 AM
    User: N/A
    Computer: ...
    Description:
    Faulting application MyApp.exe, version 1.0.0.1, faulting module MyApp.exe, version 1.0.0.1, fault address 0x00018aa4.

    I tried to use the CrashFinder program and entered the fault address 0x00018aa4, but it did not locate the crash.

    From CrashFinder program, it showed my program base address started at 0x400000 and all the DLLs started above 0x7000000.

    My question is how do I find out where the crash occured My program is compiled under VC2005 and I have the the PDB file.

    TIA
    Mike

  • How to find the C++ source lines given a crash address?