LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-08-2012, 08:08 PM   #1
ramsrambo
LQ Newbie
 
Registered: Mar 2010
Posts: 14

Rep: Reputation: 0
not getting any core dump


Hi,

I am using Ubuntu Maverick 64 bit.

Pl. look at the following c++ program

This program suppose to crash bcos a number is being divided by zero -

#include <iostream>

using namespace std;

int divint(int, int);

int main() {it
int x = 5, y = 2;
cout << divint(x, y);
x =3; y = 0;
cout << divint(x, y);
return 0;
}

int divint(int a, int b)
{
return a / b;
}

When I compile with g++ and execute it just throws floating point exception, does not core dump. Why?

I need the core dump. Should I look elsewhere to get the core dump?
 
Old 04-09-2012, 01:57 PM   #2
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,823

Rep: Reputation: 120Reputation: 120
Check your ulimit with: ulimit -a

If the core file size is set to 0, adjust it with:

ulimit -c unlimited
 
1 members found this post helpful.
Old 04-09-2012, 07:49 PM   #3
ramsrambo
LQ Newbie
 
Registered: Mar 2010
Posts: 14

Original Poster
Rep: Reputation: 0
Dear crabboy,

Thank you, Yeah! I got the core dump.

Ram
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Core Dump on Solaris (Question about core file) dayalan_cse Solaris / OpenSolaris 5 12-29-2014 08:56 AM
Creating a core dump from raw ram dump? cyent Programming 2 08-15-2010 06:57 PM
Core dump issues. Program crashes but does not generate core dump file sabeel_ansari Programming 1 10-07-2009 05:23 PM
Core dump in Ubuntu 8.04 (Empty core file) vineet7kumar Linux - Newbie 1 01-17-2009 06:52 PM
core dump lacrimae Linux - General 3 02-19-2002 02:43 PM


All times are GMT -5. The time now is 04:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration