• 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: How do I set a watchpoint?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do I set a watchpoint?


  • Subject: Re: How do I set a watchpoint?
  • From: Kate Stone <email@hidden>
  • Date: Thu, 28 May 2015 16:24:37 -0700

On May 23, 2015, at 3:15 PM, Jens Alfke <email@hidden> wrote:

On May 23, 2015, at 3:04 PM, Kate Stone <email@hidden> wrote:

You can evaluate an Objective-C _expression_ in a Swift frame by overriding the default language like so:

Thanks! But it’s a little weird that I’d need to, since “$rax” isn’t ObjC syntax either. That is, I would have thought that the register names are detected as special cases, not as part of language parsing…

LLDB allows identifiers to be defined starting with $, and these are treated consistently when parsing the language just like any other identifier.  Register values can be readily used in C-based languages as if they were pointers, but they have far less obvious meaning in a Swift context where everything is more strongly typed and is safe by design.

Should I file a bug on the inability to parse register names in Swift mode?

We’re already tracking suggestions along these lines, but if you have specific requests or examples of what you’re trying to accomplish then it never hurts to file a bug to provide us as much context as possible.

I don’t think watchpoints are going to do you much good here because freeing an allocation doesn’t change the allocated memory, just the bookkeeping in malloc’s internal data structures.

It does, when I enable MallocScribble. Could you explain the syntax to set a watchpoint, too? Thanks again…

Per LLDB’s command line help:

(lldb) watchpoint set
The following subcommands are supported:

      _expression_ -- Set a watchpoint on an address by supplying an _expression_.
                    Use the '-w' option to specify the type of watchpoint and
                    the '-x' option to specify the byte size to watch for. If
                    no '-w' option is specified, it defaults to write. If no
                    '-x' option is specified, it defaults to the target's
                    pointer byte size. Note that there are limited hardware
                    resources for watchpoints. If watchpoint setting fails,
                    consider disable/delete existing ones to free up
                    resources.  This command takes 'raw' input (no need to
                    quote stuff).
      variable   -- Set a watchpoint on a variable. Use the '-w' option to
                    specify the type of watchpoint and the '-x' option to
                    specify the byte size to watch for. If no '-w' option is
                    specified, it defaults to write. If no '-x' option is
                    specified, it defaults to the variable's byte size. Note
                    that there are limited hardware resources for watchpoints.
                    If watchpoint setting fails, consider disable/delete
                    existing ones to free up resources.

For more help on any particular subcommand, type 'help <command> <subcommand>'.

Kate Stone email@hidden
 Xcode Runtime Analysis Tools

 _______________________________________________
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: How do I set a watchpoint?
      • From: Jens Alfke <email@hidden>
References: 
 >How do I set a watchpoint? (From: Jens Alfke <email@hidden>)
 >Re: How do I set a watchpoint? (From: Kate Stone <email@hidden>)
 >Re: How do I set a watchpoint? (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Off center guides
  • Next by Date: Re: How do I set a watchpoint?
  • Previous by thread: Re: How do I set a watchpoint?
  • Next by thread: Re: How do I set a watchpoint?
  • Index(es):
    • Date
    • Thread