gdb should print out stack trace.
Sample session:
I'm interested in part starting with "Program received signal..."
Sample session:
Code Select
AirAlk:~() $ gdb ./crashapp
GNU gdb 6.3.50-20050815 (Apple version gdb-1820) (Sat Jun 16 02:40:11 UTC 2012)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries .. done
(gdb) run
Starting program: /Users/alk/crashapp
Reading symbols for shared libraries +.......................... done
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
0x0000000100000f93 in main (argc=1, argv=0x7fff5fbff8d0) at crash.c:7
7 *p = 123;
(gdb) bt full
#0 0x0000000100000f93 in main (argc=1, argv=0x7fff5fbff8d0) at crash.c:7
p = 0x0
(gdb)
I'm interested in part starting with "Program received signal..."