CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: Debugging Woes

  1. #1
    Join Date
    Dec 2003
    Posts
    72

    Debugging Woes

    Hi. I have a two programs I made in Visual Studio. One has no GUI and one does. When debugging, the one without the GUI seems to tell me the line of C++ code where an error occurs (with a yellow arrow). But, when an error occurs in the one with the GUI, it just gives me assembly code. How do I make the one with the GUI show me the place in my C++ code where the program crashed? Both programs have the exact same project settings, except one is a console program and one is a windows program.

  2. #2
    Join Date
    Jun 2010
    Location
    Germany
    Posts
    2,675

    Re: Debugging Woes

    Assuming the app in question does have debugging information, and as to your description it should have, you have probably been dropped inside some CRT, MFC or other system code for which there's no source available. Have a look at the call stack window and click on the topmost (with respect to the displayed list) entry representing your own code. That should take you to the point in your code that issued the call leading to the crash. (At least VC++ 2010 seems to display call stack entries for which no source code is available grayed. This should simplify finding that point in your code in the call stack display.)
    I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.

    This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.

  3. #3
    Join Date
    Dec 2003
    Posts
    72

    Re: Debugging Woes

    I inserted some code artificially to test it:

    Code:
    wxSocketBase* l_sock;
    l_sock->Destroy();
    In my console app, when this code runs, it shows me the place in the C++ code and it isn't greyed out. It says at the top of the stack:

    Meltdown Master.exe!ServerThread::Entry() Line 601 + 0x10 bytes C++

    In my GUI app, every line is greyed out for that same code and none of them take me to anywhere in my code. I notice in my GUI app it says:

    Meltdown.exe!00486c89()
    [Frames below may be incorrect and/or missing, no symbols loaded for Meltdown.exe]

    What could this mean?

  4. #4
    Join Date
    Dec 2003
    Posts
    72

    Re: Debugging Woes

    I checked the settings again. Both are exactly the same. Both generate debugging info. Both are building from the same debug libraries. Every setting is the same except one is console subsystem and one is windows subsystem. The console one correctly tells me the function name and line number of the error. The gui one just tells me no symbols are loaded for my application (Meltdown.exe).

  5. #5
    Join Date
    Dec 2003
    Posts
    72

    Re: Debugging Woes

    I installed this symbols pack from Microsoft and it seems to magically work now. Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured