Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

lldb class has incompatible superclass

I have suddenly become unable to print out object properties or call methods inside of lldb. The only thing that prints out is:

error: class '<ClassName>' has incompatible superclasses
note: inherits from superclass 'NSObject' here

This is true for even the most basic object types, such as: NSArray, NSDictionary, and NSString. Here's a specific example:

(lldb) po functie.length
error: class 'NSString' has incompatible superclasses
note: inherits from superclass 'NSObject' here
error: 1 errors parsing expression

The only methods that are available are those available in NSObject, such as -class. Extending from the previous example:

(lldb) po [functie class]
__NSCFString

If anybody has any idea what the problem is, your input would be greatly appreciated. Thank you.

like image 746
dudeman Avatar asked Jun 04 '15 00:06

dudeman


1 Answers

Try this one:

  1. Select your project in the left project navigator.

  2. Switch to the Build Settings tab.

  3. Search for Debug Information Format.

  4. Set the value for Debug to DWARF.

  5. Clean Build Folder: hold Option + Command + Shift + K (That is ⌥ + ⌘ + ⇧ + K).

  6. Rebuild your project: ⌘ + R.

Good luck.

like image 65
Lizhen Hu Avatar answered Sep 20 '22 01:09

Lizhen Hu