Source code for the selected function is not available

Discussion in 'C' started by bitcod, Jun 22, 2007.

  1. bitcod

    bitcod New Member

    Joined:
    Jun 22, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    "if the source code for the selected function is not available,the function object code appears in dissassamly wimdow"
    http://msdn2.microsoft.com/en-us/library/ms934288.aspx
    I installed/uninstalled VS.2005,checked all debugging options still every time when I debug program that containes a function when debugger encounter a function it goes to disassambly window.Debug-Release it is all set up corectlly.What should I do? Is there any command to disable dissasambly window
    Code:
    #include<stdio.h>
    void f();
    int main()
    {
    	f();
    }
    void f()//<-----------------goes to disassambly window
    {
    	printf("\n");
    }
     
  2. DaWei

    DaWei New Member

    Joined:
    Dec 6, 2006
    Messages:
    835
    Likes Received:
    5
    Trophy Points:
    0
    Occupation:
    Semi-retired EE
    Location:
    Texan now in Central NY
    Home Page:
    http://www.daweidesigns.com
    Possibly I misunderstand. Seems to work for me. Run to breakpoint:
    [​IMG]

    Step into:
    [​IMG]
     
  3. bitcod

    bitcod New Member

    Joined:
    Jun 22, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    Of course it works-it is just example code.I have problem with my Visual Studio 2005 pro debugger I have reinstalled Vista/XP and two disparate VS 2005, I want know what debuggin option I must check that is causing this problem.I have checked all debbuging options with my friend on his VS by phone still dosen't work.I have installed fresh original copy from my college MSDNAA it should be all set up right.What causes this "Source code for the selected function is not available" look at link
    http://msdn2.microsoft.com/en-us/library/ms934288.aspx
    What excatly i must do to preventing this happens
     
  4. DaWei

    DaWei New Member

    Joined:
    Dec 6, 2006
    Messages:
    835
    Likes Received:
    5
    Trophy Points:
    0
    Occupation:
    Semi-retired EE
    Location:
    Texan now in Central NY
    Home Page:
    http://www.daweidesigns.com
    Why the hell would you post something that works as an example of something that fails? Is it a full moon, or Silly Season, or something? :confused: :rolleyes:
     
  5. bitcod

    bitcod New Member

    Joined:
    Jun 22, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    IT DOESN'T WORK!.I post that example for everybody to see when this is happening.....Sometimes when you have logical bug in program that will take you to disassembly...I post it for you to see that I don't have logical bug...I meant of course it works for you...it dosen't work for me
    Everybody shoot answers
     
  6. DaWei

    DaWei New Member

    Joined:
    Dec 6, 2006
    Messages:
    835
    Likes Received:
    5
    Trophy Points:
    0
    Occupation:
    Semi-retired EE
    Location:
    Texan now in Central NY
    Home Page:
    http://www.daweidesigns.com
    It doesn't work. Of course it works. It doesn't work. Good luck on getting any more answers, even if you make up your mind. Posting the MSDN link doesn't help you if we read it, but you don't.
     
  7. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Are you sure its for function f() it goes to disassembly or its for printf() function.
     
  8. bitcod

    bitcod New Member

    Joined:
    Jun 22, 2007
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    In every program when debugger encounter function it goes to disassembly.In <options> <debugging><general><enable address-level debugging><show disassembly if source is no avilable>I have disable it.And now when program comes to the function on screen jumps out MessageBox"Source code is not available!" instead going to disassembly window
    printf() dosen't matter...empty function with int x; in it is still acting same
     
  9. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    The probably its with your debug environment.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice