• 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 memory breakpoint - How?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xcode memory breakpoint - How?


  • Subject: Re: Xcode memory breakpoint - How?
  • From: Jeffrey Oleander <email@hidden>
  • Date: Wed, 4 Jul 2007 13:05:32 -0700 (PDT)

> Yves Poissant <email@hidden> wrote:
> I have a instance of a class where one of its member
> variable changes value.  I placed a breakpoint
> wherever an instruction might change its value but
> none of those breakpoint fire. I want to watch this
> member variable during application execution.
> So I set a watchpoint on that "m_figure" variable
> when I break in the constructor. In the debugger
> variable window, it looks like this:

> Arguments
>     this
>        m_figure <<<<<<< This is who I want to watch.

> However, when I click "Continue", I get the following
> message:
> "Watchpoint 12 deleted in thread 1 - The program has left
> the block in which its expression is valid"

> The object was never destructed so the memory holding
> this variable is certainly still valid. So instead of
setting
> a watchpoint, I would like to set a memory breakpoint
> at the variable's memory address.
> Can I do that in Xcode?

I recommend filing a bugreport asking for the feature.

We used to call it "trap on store" back in the 1970s.
You'd give it a range of addresses (variable names, array,
whatever) and the debugger would go into interpretive mode
in which it would step through the machine code until it
got to a store instruction, in which case it would check
the address to see whether it would be in the flagged
range.  If it was, it would do the equivalent of a
break-point.

Of course, this made it extremely slow, hideously slow;
you'll think it died and is never going to respond.  In
use, as someone else suggested, you'd set a conditional
break-point, then activate the trap on store and hope that
your conditional break-point caught it before the errant
store.  Assigning a scope to a trap on store makes it
useless, because scope has essentially no relationship to
this kind of bug that can reach across dynamic load
operations or anything else to clobber just about anything
in memory.

File a bugreport.



____________________________________________________________________________________
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/
 _______________________________________________
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: 
 >Xcode memory breakpoint - How? (From: "Yves Poissant" <email@hidden>)

  • Prev by Date: Re: Xcode memory breakpoint - How?
  • Next by Date: linking problem
  • Previous by thread: Re: Xcode memory breakpoint - How?
  • Next by thread: linking problem
  • Index(es):
    • Date
    • Thread