Is there a way to stop all touchUpInside buttons?

Sometimes this happens when you get a project with very unmanaged code, so you cannot figure out how to solve a simple problem. In most cases, the debugger helps us reach the root point for a start, I just want to know how strong the xcode debugger is. Since I used some asm debugger such as OllyDbg, this gives us no. The option for the breakpoint I used is a breakpoint on a click event or a tap event. So, is there a way to place a similar breakpoint in an xcode project?

+4
source share
1 answer

It looks like you are looking for a way to trap anytime that UIButton gets a listen. To do this, I would set a symbolic breakpoint. In the Breakpoint Navigator (⌘7), click the plus sign at the bottom of the screen and select Add Symbolic Breakpoint

enter image description here

In the dialog box, add the following to the Symbol field :

-[UIControl sendAction:to:forEvent:]

enter image description here

, . , UIButtons. , , . . , , , , , . . , . .

enter image description here

. , (F6) (, 12), , . , . r15 (!), r14, r12 rbx ( 4-7). , " " , "" . :.

(lldb) register read r15
 r15 = 0x00007fc6f4a24510
(lldb) po 0x00007fc6f4a24510
<UIButton: 0x7fc6f4a24510; frame = (0 0; 414 100); opaque = NO; autoresize = RM+BM; layer = <CALayer: 0x7fc6f4a247b0>>

(lldb) po [[(UIButton *)0x00007fc6f4a24510 titleLabel] text]
Done
+8

Source: https://habr.com/ru/post/1623507/


All Articles