• 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: Conditional breakpoint on -retain
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Conditional breakpoint on -retain


  • Subject: Re: Conditional breakpoint on -retain
  • From: Chris Friesen <email@hidden>
  • Date: Thu, 10 Nov 2005 11:41:21 -0800


On Nov 10, 2005, at 10:14 AM, James Bucanek wrote:

Christian Schneider wrote on Thursday, November 10, 2005:
But the documentation says that I'd have complete access to all local
variables in the conditional statement, so I'd have thought that [self
isKindOfClass:[QTMovie class]] might be a valid statement.

"[self isKindOfClass:[QTMovie class]]" is not a "local variable". It's a method call (two, in fact). I find method and function calls iffy (at best) when used in conditional breakpoints.



GDB needs to have type info to keep you from crashing during expression evaluation of functions/methods. So you need to do something more like the following.


	(BOOL)[$r3 isKindOfClass:(Class)[NSString class]]

On ppc self will most likely be found at $r3. You can always test your expression in the debugger console.

In a small program you might be ok with making a subclass so you can stop in -retain or -release. But in a larger program you might have to change too much of your code so I would temporarily use a category.

-ChrisF

_______________________________________________
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: Conditional breakpoint on -retain (From: James Bucanek <email@hidden>)

  • Prev by Date: Debugger stack trace view disappears
  • Next by Date: Xcode 2.2 is now available
  • Previous by thread: Re: Conditional breakpoint on -retain
  • Next by thread: Apple Help busted in 10.4.3?
  • Index(es):
    • Date
    • Thread