 |
 |
 |
 |
 |
Author |
Message |
Malek
Joined: 23 Apr 2009 Posts: 3 Location: Ft Jackson, SC
|
Posted: Thu Apr 23, 2009 12:00 pm Post subject: Makefile flags? |
|
|
Hi!
I'm using GCC 4.2.4 on a Kubuntu VM, and I'm having trouble getting my code to dump core files when I hit a segfault.
These are my current flags:
Code: | CC = gcc
C_FLAGS = -Wall -g -pedantic
L_FLAGS = -lz -lpthread -lcrypt |
Any help would be great. Thanks! |
|
Back to top |
|
 |
|
 |
 |
 |
 |
 |
 |
 |
 |
Author |
Message |
KaVir

Joined: 11 May 2005 Posts: 565 Location: Munich
|
Posted: Sun Apr 26, 2009 7:30 pm Post subject: |
|
|
I was never much good with makefiles, but you could try adding "-ggdb" to the C_FLAGS. I believe gdb can work with the "-g" option, but I always use both.
Also, make sure you've set "ulimit -c unlimited", otherwise it won't be able to drop a core dump. |
|
Back to top |
|
 |
|
 |
 |
 |
 |
 |
 |
 |
 |
Author |
Message |
Malek
Joined: 23 Apr 2009 Posts: 3 Location: Ft Jackson, SC
|
Posted: Sun Apr 26, 2009 11:07 pm Post subject: |
|
|
Thanks, KaVir. got it working now  |
|
Back to top |
|
 |
|
 |
 |
 |
 |
 |
 |
 |
 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
 |
 |
 |
 |
|
 |