• 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: XCode, gdb and "Timed out fetching data"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XCode, gdb and "Timed out fetching data"


  • Subject: Re: XCode, gdb and "Timed out fetching data"
  • From: Laurence Harris <email@hidden>
  • Date: Thu, 22 Mar 2007 10:47:54 -0400


On Mar 22, 2007, at 10:24 AM, Sean McBride wrote:

On 3/21/07 10:55 AM, Jim Ingham said:

Not that I know of.  Not sure this is the best solution, however:
adding another way that debug builds run differently from optimized
builds doesn't seem desirable.

Yeah, I see your point. I guess I was thinking of it as an extra, like
guard malloc. If all stack variables were inited to 0, it would make
unintentional reliance on their initial value behave consistently.

It would, but initializing to 0 would actually give you exactly the behavior you want in many cases:


CObject	*object;
if ( condition )
{	object = new ...	}
delete object;

int	count;
[...]
return count;

Then as soon as you did a release build it could start falling down in a variety of places, and as Jim points out, when you tried to debug it you'd never see the problem.

If there were an option to auto-initialize stack variables in debug builds it should do so with something akin to 0xDEADBEEF.

Larry


Jim

On Mar 21, 2007, at 10:35 AM, Sean McBride wrote:

On 3/21/07 8:40 AM, Jim Ingham said:

One common cause of problems is trying to run the data formatters on
uninitialized objects. We don't actually have any way to tell for
sure when an object is good or not. We have some heuristics, but
stack objects sometimes point to the leftovers of another stack
object
that are "almost good enough" and fool us.

Is there any way for stack variables to be automatically initialised to zero (or something) when debugging? I believe Visual Studio allows this. That might help.

-- ____________________________________________________________ Sean McBride, B. Eng email@hidden Rogue Research www.rogue-research.com Mac Software Developer Montréal, Québec, Canada


_______________________________________________ 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

_______________________________________________ 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
  • Follow-Ups:
    • Re: XCode, gdb and "Timed out fetching data"
      • From: "William H. Schultz" <email@hidden>
References: 
 >XCode, gdb and "Timed out fetching data" (From: Scott F Bayes <email@hidden>)
 >Re: XCode, gdb and "Timed out fetching data" (From: Jim Ingham <email@hidden>)
 >Re: XCode, gdb and "Timed out fetching data" (From: "Sean McBride" <email@hidden>)
 >Re: XCode, gdb and "Timed out fetching data" (From: Jim Ingham <email@hidden>)
 >Re: XCode, gdb and "Timed out fetching data" (From: "Sean McBride" <email@hidden>)

  • Prev by Date: Re: XCode, gdb and "Timed out fetching data"
  • Next by Date: Re: "Multiple build commands" warning message
  • Previous by thread: Re: XCode, gdb and "Timed out fetching data"
  • Next by thread: Re: XCode, gdb and "Timed out fetching data"
  • Index(es):
    • Date
    • Thread