xCode "Loading program into debugger" takes very long ?

Discussion in 'Mac Programming' started by Tex-Twil, Nov 22, 2009.

  1. Tex-Twil macrumors 68020

    Tex-Twil

    Joined:
    May 28, 2008
    Location:
    Europe
    #1
    Hello,
    so here I am reading "Programming in Objective-C 2.0" and writing my first hello word programs.

    I have a very simple program but when I debug it, it takes like 30 seconds before the debugging really starts. The Debug console says "Loading program into debugger" and "sharedlibrary apply-load-rules all". Then I have to wait 30 seconds and then the debug stops at my 1st break point.

    What's going on ?

    I have xCode 3.2 on SL.

    Thanks,
    Tex
     
  2. Vizin macrumors 6502a

    Joined:
    Jun 30, 2007
  3. lee1210 macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #3
    If you set a breakpoint on main does it take as long?

    Have you tried manually running gdb on your debug binary to see if it takes the same amount of time?

    -Lee
     
  4. Vizin macrumors 6502a

    Joined:
    Jun 30, 2007
    #4
    Yes to both. Setting the breakpoint has no effect. When I run it in gdb it hangs at "This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ........" for about 45 seconds.
     
  5. lee1210 macrumors 68040

    lee1210

    Joined:
    Jan 10, 2005
    Location:
    Dallas, TX
    #5
    At this point I would approach this like any other performance problem, as I can't reproduce this on my system...
    You can take a look with instruments to see what GDB is spending its time.

    I would run GDB without the program given, start watching, and run:
    file myProgram

    See if you have a long delay here. If so, take a look at where the most time was spent. If not, restart your watch with instruments and run your program, and once you hit the breakpoint, stop recording with instruments and see where the time was spent.

    -Lee
     
  6. Tex-Twil thread starter macrumors 68020

    Tex-Twil

    Joined:
    May 28, 2008
    Location:
    Europe
    #6
    As far as I'm concerned, I started another project an now it load fast ..
     
  7. lloyddean macrumors 6502a

    Joined:
    May 10, 2009
    Location:
    Des Moines, WA
    #7
    By chance is it a C++ based project that makes use of STL?
     
  8. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #8
    I've noticed this recently. It seems to be random. If you disable breakpoints it works as expected, so that must be affecting it somehow.
     
  9. Eraserhead macrumors G4

    Eraserhead

    Joined:
    Nov 3, 2005
    Location:
    UK
    #9
    I didn't think it loaded the debugger if you have no breakpoints. I might be wrong though.
     

Share This Page