Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stepping over inline functions



On Nov 28, 2005, at 5:24 PM, email@hidden wrote:

The debugger has always behaved this way. I have a bug to fix this
somehow, but it is a but tricky since the debugger doesn't actually
know that these lines come from an inlined function, only that the
source file has changed.  I don't want to step over stuff that's not
an inlined function.

The reason you are seeing it more frequently now is that the gcc
version in Xcode 2.2 has started obeying the always_inline attribute
even at -O0, whereas earlier versions would generally make a function
and use that for all inlines at -O0.

I hope the reason for changing gcc's behavior in this situation was a good one. It seems like it would be a whole lot easier to simply go back to generating a single function at -O0. It would probably be nice to step over inline code at other optimizations though...

The reason for making always_inline always inline is that, well, you use it if you want to always inline. :) For example, most (not all) people agree that things like vector intrinsics should always be inlined, regardless of whether you're building with -O0.


I could see an argument for marking NSMakeRange and similar functions "inline" rather than "always_inline" and therefore letting the compiler make the decision about whether to inline them. Then they wouldn't be inlined when you build with -O0 and debugging would work much more like what you'd expect. If you think that makes sense, please file a bug report.

Hope this helps,
Eric

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden
References: 
 >Re: Stepping over inline functions (From: email@hidden)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.