Symbolic breakpoints + some line offset.


Alex Zavatone
 

Hi all.  In our iOS app, I’ve got an annoying crash that is being reported by Crashlytics, but that none of the team has seen in house nor can reproduce in house.  

It’s at __56-[UIPresentationController runTransitionForCurrentState]_block_invoke + X.

X in this case is 456

I’ve got a symbolic breakpoint at -[UIPresentationController runTransitionForCurrentState].

When creating the symbolic breakpoint, is it possible to specify the  _block_invoke section or even specify the line number offset from the symbol?

Thanks,
Alex Zavatone


 



On Sep 19, 2019, at 8:35 AM, Alex Zavatone via Groups.Io <zav@...> wrote:

It’s at __56-[UIPresentationController runTransitionForCurrentState]_block_invoke + X.
X in this case is 456
I’ve got a symbolic breakpoint at -[UIPresentationController runTransitionForCurrentState].

A "block_invoke" function is the interior of a block, so it's probably being called after the parent method returned, and the breakpoint won't help.

(Blocks get compiled into separate C functions by Clang.)

When creating the symbolic breakpoint, is it possible to specify the  _block_invoke section or even specify the line number offset from the symbol?

I think so, since it's technically a separate function in the generated binary. Have you tried adding a symbolic breakpoint on the entire symbol name "_56-UI…_block_invoke"? (Strip off the first underscore from the name in the crash log, as that gets added by the linker and isn't used at runtime.)

—Jens


Alex Zavatone
 



On Sep 19, 2019, at 11:25 AM, Jens Alfke <jens@...> wrote:



On Sep 19, 2019, at 8:35 AM, Alex Zavatone via Groups.Io <zav@...> wrote:

It’s at __56-[UIPresentationController runTransitionForCurrentState]_block_invoke + X.
X in this case is 456
I’ve got a symbolic breakpoint at -[UIPresentationController runTransitionForCurrentState].

A "block_invoke" function is the interior of a block, so it's probably being called after the parent method returned, and the breakpoint won't help.

(Blocks get compiled into separate C functions by Clang.)

When creating the symbolic breakpoint, is it possible to specify the  _block_invoke section or even specify the line number offset from the symbol?

I think so, since it's technically a separate function in the generated binary. Have you tried adding a symbolic breakpoint on the entire symbol name "_56-UI…_block_invoke"? (Strip off the first underscore from the name in the crash log, as that gets added by the linker and isn't used at runtime.)

Yes, I have.  Since we haven’t been able to reproduce this crash in house, I haven’t seen it reproduced yet and have set up 4 exception breakpoints starting with just -[UIPresentationController runTransitionForCurrentState] and adding additional bits to each one since I’m not sure if they will work or not.

Thanks, Snej.