• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Stepping over inline functions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stepping over inline functions


  • Subject: Re: Stepping over inline functions
  • From: Eric Albert <email@hidden>
  • Date: Mon, 28 Nov 2005 17:39:08 -0800

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:
This email sent to email@hidden


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

  • Prev by Date: Re: Stepping over inline functions
  • Next by Date: Re: Linking universal binary framework with UNIX library
  • Previous by thread: Re: Stepping over inline functions
  • Next by thread: Re: Stepping over inline functions
  • Index(es):
    • Date
    • Thread