Mac xCode "Loading program into debugger" takes very long ?

Tex-Twil

macrumors 68020
Original poster
May 28, 2008
2,477
10
Berlin
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
 

lee1210

macrumors 68040
Jan 10, 2005
3,182
1
Dallas, TX
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
 

Vizin

macrumors 6502a
Jun 30, 2007
532
0
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.
 

lee1210

macrumors 68040
Jan 10, 2005
3,182
1
Dallas, TX
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
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
5
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.
 

Eraserhead

macrumors G4
Nov 3, 2005
10,410
10,891
UK
I didn't think it loaded the debugger if you have no breakpoints. I might be wrong though.
 

Similar threads

  • wlisik
14
Replies
14
Views
2K
  • jasnw
2
Replies
2
Views
839
  • gimmesomemo
1
Replies
1
Views
648
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.