tags:

views:

49

answers:

1

There is probably a really simple answer for this ... I have a project where I have a single active break point set in the program.m. My problem is that when I hit "build & Debug" both the editor in the main view and the editor in the debugger immediately drop into the code for one of apples .h files.

I copied the code into a new project and it works fine, I am just curious what I have done to this one to make this start happening?

EDIT_001

I narrowed it down to these lines which is at the top of my code. My break point is further down, but on hitting "build & debug" both editors jump into "CFByteOrder.h" although execution does continue normally, its hard to see where you are in the code.

I am using 10.6 | Debug | x86_64, the break point can be anywhere below these lines, it always jumps into CFByteOrder.h, commenting out those 3 lines and everything works ok again. Also it all works fine if you copy and paste the code into a new project, very strange, maybe I accidentally set some option on the project.

NSLog(@"MDDStructure V002 ... ");
if(CFByteOrderGetCurrent() == CFByteOrderLittleEndian) {
    NSLog(@"BYTEORDER: Little Endian");
}

EDIT_002

I am going to mark this as accepted as I can't reproduce the behaviour in a new scene, so I can only conclude that somehow / somewhere my original project became corrupted.

gary

+1  A: 

CFByteOrderGetCurrent() is inlined code, so what you see in the header is actually the code that's getting compiled into your source file. As to why your breakpoint is stopping too early, could be a lot of things, but first I'd make sure a) that the Debug Symbols type is set to DWARF or DWARF with dSYM, and b) that you Clean All and rebuild, to make sure your debug symbols match your executable.

cdespinosa