Symbolic breakpoint parameters.


Alex Zavatone
 

Are any of you fine people aware of how to get the value of the first argument of a method call in a symbolic breakpoint?

I am trying to catch a condition and would like to compare the first variable’s value with a known value.

I already tried $arg1 without success.

Thanks in advance.
Alex Zavatone


Ben Kennedy
 

On 22 Mar 2019, at 1:37 pm, Alex Zavatone via Groups.Io <zav=mac.com@groups.io> wrote:

Are any of you fine people aware of how to get the value of the first argument of a method call in a symbolic breakpoint?
The argument already has a named variable; why can't you just use it? e.g. say this is the method you're debugging:

-(void)viewWillAppear:(BOOL)animated {
return;
}

Set a breakpoint on the return statement with a condition of "animated == YES".

b


Steve Mills
 

On Mar 22, 2019, at 15:37, Alex Zavatone via Groups.Io <zav=mac.com@groups.io> wrote:

Are any of you fine people aware of how to get the value of the first argument of a method call in a symbolic breakpoint?

I am trying to catch a condition and would like to compare the first variable’s value with a known value.

I already tried $arg1 without success.
Maybe $arg2? $arg1 might be the method name.

Steve via iPad


Alex Zavatone
 

General purpose breakpoint for multiple cases.

On Mar 22, 2019, at 3:52 PM, Ben Kennedy <ben-groups@zygoat.ca> wrote:


On 22 Mar 2019, at 1:37 pm, Alex Zavatone via Groups.Io <zav=mac.com@groups.io> wrote:

Are any of you fine people aware of how to get the value of the first argument of a method call in a symbolic breakpoint?
The argument already has a named variable; why can't you just use it? e.g. say this is the method you're debugging:

-(void)viewWillAppear:(BOOL)animated {
return;
}

Set a breakpoint on the return statement with a condition of "animated == YES".

b




Steve Mills
 

On Mar 22, 2019, at 18:22:32, Steve Mills via Groups.Io <sjmills=mac.com@groups.io> wrote:

Maybe $arg2? $arg1 might be the method name.
I'm at my desk now. $arg3 is the 1st parm. From my notes:

po $arg1 (the object receiving the call)
po $arg2 (the method name I think)
po $arg3 (the 1st parm)
po $arg4 (the 2nd parm)

--
Steve Mills
Drummer, Mac geek