XCode 4.2 and (gdb) Console

You are not sure where an exception comes from. It’s simple. Use info command.

info line *0x######


echo "put your stack trace here" | tr ' ' '\n' | sed 's/^/info line \*/g'


echo "0x22e5052 0x2476d0a 0x3d47e0 0x3a42b1 \
0x3bbfa7 0x97e87 0x535e8 0x55e74 0x556ca \
0x41b85 0x17fb4e6 0x17fb457 0x9855ced9 \
0x985606de" | tr ' ' '\n' | sed 's/^/info line \*/g'

Then, put the result into (gdb) console.

Update (for lazy people):

Put this content into ~/bin/stacktrace.sh

echo "$*" | tr ' ' '\n' | sed 's/^/info line \*/g'

Then, change execution permisions:

chmod +x ~/bin/stacktrace.sh

Then, call it

~/bin/stacktrace.sh 0x22e5052 0x2476d0a 0x3d47e0 0x3a42b1