Reputation: 311
I was having some problems with memory (exc-bad-access) in Objective-C, XCode, for iPhone, so I searched a little bit and found about the (awesome) NSZombieEnabled. Everyone outhere is just explaining how cool this is ... but it doesn't work for me :/
I followed the following 'tutorial': http://www.cocoadev.com/index.pl?DebuggingAutorelease
So basically when I launch (in debug mode) GDB sais
"Undefined command: "NSZombieEnabled". Try "help".
And it basically stops (in the status bar it says - error in GDB - terminating).
Upvotes: 0
Views: 716
Reputation: 162722
The problem is most likely in your ~/.gdbinit
file in that the error you have provided indicates that gdb was trying -- and failing -- to parse a command.
In .gdbinit
, the command should look like:
set env NSZombieEnabled=YES
To help further, you'd need to drop your .gdbinit
in the question. However, there is rarely a need to use a .gdbinit file (for all but advanced debugging). I'd suggest deleting it.
For autorelease debugging, use Instruments....
Upvotes: 2