Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Tex-Twil

macrumors 68030
Original poster
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
 
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
 
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.
 
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
 
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.