Want to know compiler option for getting 'core' file

Post questions regarding programming in C/C++ in Linux/Unix.

Moderators: Darobat, RecursiveS, Dante Shamest, Bugdude, Wizard

Want to know compiler option for getting 'core' file

Postby palakdebnath » Tue Feb 03, 2009 4:45 pm

Hi,

When I'm running my application sometimes I'm getting core dump. But it is not creating any 'core' file. I want to get core file during core dump. I'm running my application on Suse Linux, compiler is g++. I do have makefile to compile my application.

I'm not sure whether there is any compiler option is available for not to generate 'core' file during core dump or not. Can anyone let me know what is the compiler option to get core file?

Thanks in advance.

Thanks,
Palak
palakdebnath
 
Posts: 24
Joined: Wed Jun 04, 2008 4:21 pm

Postby Alvaro » Tue Feb 03, 2009 5:46 pm

This is not a compiler option. Try setting the maximum size of a core file to some large value using ulimit.
User avatar
Alvaro
Moderator
 
Posts: 5185
Joined: Mon Sep 22, 2003 4:57 pm
Location: NY, USA

Postby palakdebnath » Wed Feb 04, 2009 10:46 am

Hi Alvaro,

Thanks for quick reply. Using 'ulimit -c <limit>' I can set coe file size. But what could the value for core size limit? If I change that limit, does it permanent? Does this change only for my accout or it will impact all the user?

Thanks,
Palak
palakdebnath
 
Posts: 24
Joined: Wed Jun 04, 2008 4:21 pm

Postby Alvaro » Wed Feb 04, 2009 12:23 pm

ulimit is a bash built-in command. It will only affect your current session. You can put your ulimit command in .bashrc to make the effect more permanent.
User avatar
Alvaro
Moderator
 
Posts: 5185
Joined: Mon Sep 22, 2003 4:57 pm
Location: NY, USA

Postby palakdebnath » Wed Feb 04, 2009 2:42 pm

What size shall I define to fit the core file size? Please give an idea.
palakdebnath
 
Posts: 24
Joined: Wed Jun 04, 2008 4:21 pm

Postby Alvaro » Wed Feb 04, 2009 2:50 pm

I don't know. Try 2GB. If you still don't get a core file, try something else. You need to learn to figure these things out yourself, either by trying, by reading the documentation, by googling, or a combination of the three.
User avatar
Alvaro
Moderator
 
Posts: 5185
Joined: Mon Sep 22, 2003 4:57 pm
Location: NY, USA

Re: Want to know compiler option for getting 'core' file

Postby psncodes1 » Tue Apr 25, 2017 5:45 am

I am sure that google play gift cards is the type of the thing that everyone need of , But you can get it by the google play gift card generator online.
psncodes1
 
Posts: 5
Joined: Sun Jul 17, 2016 3:26 am

Re: Want to know compiler option for getting 'core' file

Postby heng » Fri Jun 02, 2017 10:10 pm

heng
 
Posts: 2
Joined: Fri Jun 02, 2017 9:46 pm


Return to Unix/Linux

Who is online

Users browsing this forum: No registered users and 2 guests

cron