I have been using Xcode for several years now and it has stopped providing information in the gdb window when my iOS application receives any SIGABRT or EXEC_BAD_ACCESS etc. Now, when I launch the application and generate any kind of SIGABRT, I get:
Thread 1: Program received signal: "SIGABRT"
But in the debug output window, where the error description and stack trace, as a rule, I do not get. This makes debugging very difficult - I have to set random breakpoints until I go through the program and find the line that caused SIGABRT, and fixing the problem can be very tedious without any debugging information.
When I enter "information signals" in the gdb window, I get:
SIGABRT Yes Yes Yes Aborted
for the signal settings that I think are correct.
The only way to get any information I found is to set a breakpoint using:
(gdb) fb -[NSException raise] (gdb) fb objc_exception_throw (gdb) fb malloc_error_break
and then when cigabra happens i use
(gdb) set $exception = *(id *)($ebp + 8) (gdb) po $exception (gdb) po [$exception name] (gdb) po [$exception reason]
I should mention that I am using Xcode 4.2 and iOS SDK
source share