> On May 23, 2015, at 3:15 PM, Jens Alfke <j...@mooseyard.com> wrote: > >> On May 23, 2015, at 3:04 PM, Kate Stone <katherine_st...@apple.com >> <mailto:katherine_st...@apple.com>> 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 k8st...@apple.com <mailto:k8st...@apple.com> Xcode Runtime Analysis Tools
_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (Xcode-users@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com This email sent to arch...@mail-archive.com