Cannot break on symbol -[UIView _viewHierarchyUnpreparedForConstraint:]

625 views Asked by At

I am debugging a problem with programmatically adding constraints. When my app crashes LLDB tells me to break on -[UIView _viewHierarchyUnpreparedForConstraint:] to debug the problem further. However, when I add a breakpoint with LLDB :

b s -n  -[UIView _viewHierarchyUnpreparedForConstraint:]

I get the following warning from LLDB: WARNING: Unable to resolve breakpoint to any actual locations.

I also tried adding a symbolic breakpoint using the Breakpoint navigator + option.

So it looks to me as if this symbol does not exist. How can i see a list of all the symbols generated in order to make sure that this symbol exists or not?

thanks for your help

-Malena

1

There are 1 answers

0
Jim Ingham On

The lldb command line is space-delimited, so if you want to pass arguments or option values to it that have spaces in them, you need to use quotes to protect the spaces. See if this works:

(lldb) b s -n  "-[UIView _viewHierarchyUnpreparedForConstraint:]"

The careful reader would have noted that the command as you typed it had "-[UIView" as the option value for -n and then a dangling argument "_viewHierarchyUnpreparedForConstraint:]" and by rights (since break set takes no arguments) you should have gotten an error about break set taking no arguments. THAT is a bug...

To answer your other question, the lldb command:

(lldb) image dump symtab

will dump all the symbols in the program. You can scope this to a particular library by adding it to the command line, so for instance this one is probably in UIKit, so:

(lldb) image dump symtab UIKit

will show you only the symbols in UIKit. There's also a command to lookup particular symbols by name, image lookup -n though in general if the breakpoint setter can't find them, image lookup isn't going to find them either.