473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

how to create a core dump file in G++ compiller

I got a segmentation fault..
I came to know that the problem could be easliy solved be the core dump files.
could any tell how to create a core dump file and how to read a core dump file.
I am using g++ compliier..
Oct 3 '07 #1
1 10062
arne
315 Expert 100+
I got a segmentation fault..
I came to know that the problem could be easliy solved be the core dump files.
could any tell how to create a core dump file and how to read a core dump file.
I am using g++ compliier..
If your program crashes, it will leave a core file (named 'core'), unless the allowed core file size is 0: invoke 'ulimited -c' to check. If the result is '0', call ' ulimit -c unlimited' to set the core file size to "infinite".

There is also the gcore utility which can create a core file of a running process (useful if you need a snapshot of a program in a weird state).

For core dump ananlysis, use gdb, e.g.

Expand|Select|Wrap|Line Numbers
  1. gdb <executable file> <core file>
  2.  
Google is your friend to find out how to proceed from here on.

HTH,
arne
Oct 4 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Nick Craig-Wood | last post by:
I've just discovered that my python (Python 2.3.4 from debian package 2.3.4-1 running on debian testing x86 + linux 2.4.26) core dumps when I set recursionlimit very high and do lots of recursion....
6
by: John Liu | last post by:
I've two questions, they may or may not be related - 1. I copied the entire data directory from postgreSQL 7.3.2 (AIX4.3) to the installation postgreSQL 7.3.4 (AIX5.1), the same filesystem setup....
0
by: Fredrik Melin | last post by:
I have a app on a remote server which hangs periodically. Never happens on the developement machine, so its hard to debug. How can I create a dump file for my app when it hangs, so I can have a...
8
by: nkrisraj | last post by:
Hi, I have a following structure: typedef struct { RateData rdr; int RateID; char RateBalance; } RateInfo;
10
by: wong_powah | last post by:
I want to find out where (which line) my C program core dump. How to do that? Is there a web site describing the procedure? One approach is to use stack trace of the mdb debugger, but I does not...
14
by: Sheldon | last post by:
Hi, I have a python script that uses a C extention. I keep getting a recurring problem that causes a core dump a few lines after the C extention return data back tp python. I tried using pbd and...
1
by: mthread | last post by:
Hi, Given below is the core dump generated from my application. The issue is, I have compiled my code with -g option . But the core dump show neither the file name nor line number which caused the...
14
by: Sheldon | last post by:
Hi, Can anyone tell me why this script file.c and file.h causes a core dump when it is compiled and run? Any help is appreciated. Sheldon snip....
5
by: johnericaturnbull | last post by:
Hi - I am very new to python. I get this random core dump and am looking for a good way to catch the error. I know the function my core dump occurs. Is there any error catching/handling that I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.