ios - Using of symbolic breakpoints for child classes in Xcode? -


i have class someclass inherited uiview , want track method setframe: called.

in case of uiview add symbolic breakpoint value -[uiview setframe:] can't same own class - never called/stopped on breakpoint. , of course can't use -[uiview setframe:] because called times. how solve issue?

i override setframe: in own class in case don't need symbolic breakpoint , it's better use usual breakpoint instead. in case need add changes in own class , not appropriate me.

if understand correctly, want put breakpoint on -[uiview setframe:] have stop when "self" object of class someclass. can breakpoint condition. like:

(int) strcmp("someclass", (const char *)class_getname((id)[(id) $arg1 class])) == 0 

the trick here $arg1 alias register holds first argument, , in objc methods first argument self. note, $arg1 register alias defined architectures use registers argument passing; in particular 32-bit x86 not pass arguments way. following answer has description of how first argument on common architectures:

symbolic breakpoint when dispatch_async called specific queue

this may slow down process bit, since stop @ every call [uiview setframe] there's no way avoid except suggest override setframe: , stop there.

i bit obnoxiously overdoing casting here. don't have debug information many of these functions, have tell debugger return types are.

by way, lldb command line has "break on selector" type break on implementations of given selector. there's no ui way call up, in console can do:

(lldb) break set -s setframe: 

so set breakpoint on setframe: methods, , add same condition (you can passing -c flag break set command. if breakpoint ends matching many functions, can disable individual hits looking indices break list , disabling them 1 one using bkpt.loc form you'll see in break list output..


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -