Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am currently writing an iOS app with Xcode 4.3.2. In most parts of my code, debugging with LLDB works just fine. However at some point I am getting a strange message while stepping through my code. When I hover over an iVar, it says

Error [IRForTarget]: Couldn't find Objective-C indirect ivar symbol OBJC_IVAR_$_MyFancyClass.iVar

instead of showing me the value. However, in the Variables View, I can see it just fine. Until I'm selecting Print Description of ... that is, because then, Xcode crashes... When I use GDB, the hovering works but the type and values of the variable are wrong.

I recon that there is something wrong with my code which in turn causes the debuggers to fail. However, the code runs fine. I'd love to provide some samplecode but the class is rather long and I can't pinpoint the exact location of my screwup. So has anybody encountered a similar behavior?

UPDATE: Actually, it seems as if this happens everywhere in my code, not just in some specific files. If it helps, while LLDB show the above message, GDB always shows an object of the Class that is owning the iVar, instead of the iVar itself. It looks as if there is something wrong with the memory management. For example, if I say something like

[notificationCenter addObserver:self selector:@selector(foo) name:bar object:objA];

the selector is invoked even when I have

[notificationCenter postNotificationName:bar object:objB];
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
509 views
Welcome To Ask or Share your Answers For Others

1 Answer

The cause of this error are incorrect build settings, as indicated by the discussion in the question post comments. This can be fixed by setting "Deployment Postprocessing" back to NO for Debug-Mode (the default value).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...