You can evaluate an Objective-C _expression_ in a Swift frame by overriding the default language like so:
(lldb) expr -fx --language=objc++ -- $rax (unsigned long) $0 = 0x00006080000c2ca0
… and then set a conditional breakpoint on free that tests the first argument to see if it matches:
(lldb) breakpoint set -n free -c "$arg1 == 0x00006080000c2ca0”
Of course this will slow down calls to free dramatically so you may need to be rather patient if there’s a lot of heap activity between setting the breakpoint and freeing the pointer you’re looking for. 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.
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
|