Makefile flags?

 
Post new topic   Reply to topic    mudlab.org Forum Index -> Coding
View previous topic :: View next topic  
Author Message
Malek



Joined: 23 Apr 2009
Posts: 3
Location: Ft Jackson, SC

PostPosted: Thu Apr 23, 2009 12:00 pm    Post subject: Makefile flags? Reply with quote

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
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Author Message
KaVir



Joined: 11 May 2005
Posts: 565
Location: Munich

PostPosted: Sun Apr 26, 2009 7:30 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Author Message
Malek



Joined: 23 Apr 2009
Posts: 3
Location: Ft Jackson, SC

PostPosted: Sun Apr 26, 2009 11:07 pm    Post subject: Reply with quote

Thanks, KaVir. got it working now Very Happy
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    mudlab.org Forum Index -> Coding All times are GMT
Page 1 of 1

 
Jump to:  
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

Powered by phpBB © 2001, 2002 phpBB Group
BBTech Template by © 2003-04 MDesign