Geeks Talk

Prepare for your Next Interview




Core Dump

This is a discussion on Core Dump within the Unix/Linux forums, part of the Operating Systems category; I want to create a core dump file by writing a C programing, i have i ready gone thorugh several reference but i am not able to create it in ...


Go Back   Geeks Talk > Operating Systems > Unix/Linux

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 01-09-2008
Junior Member
 
Join Date: Nov 2007
Location: INDIA
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
manabhanjan is on a distinguished road
Core Dump

I want to create a core dump file by writing a C programing, i have i ready gone thorugh several reference but i am not able to create it in RED HAT LINUX. plz suggest me how could i do this one and after that i need to run it in GDB.
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 01-12-2008
Contributing Member
 
Join Date: Dec 2007
Posts: 40
Thanks: 1
Thanked 8 Times in 7 Posts
sk_seeker is on a distinguished road
Re: Core Dump

Lets follow a logical sequence to answer your question.

1.
When are core files are created? When the program does something bad.

2.
What is something bad?? Can be many things, but lets list some issues
- divide by zero
- accessing a bad pointer i.e. a pointer that is not legal

3.
So, when you write a program to do one of the above bad things, you will generate a core dump. Try it out.

Hope that helps.
Reply With Quote
  #3 (permalink)  
Old 01-17-2008
Junior Member
 
Join Date: Jan 2008
Location: Tokyo
Posts: 22
Thanks: 1
Thanked 2 Times in 2 Posts
jana05 is on a distinguished road
Re: Core Dump

Been trying to post my reply to this thread, it doesnt seem to work. what the problem???

a small program like the following generates core dump in my system and i am using fedora 6.
1> make an variable of type int, ex: int p=5;
and 2> print it as a string
compile this program with gcc and run the exec file. this should generate the core dump file, but it keeps mum with just segmentation fault message, you need to issue the following command,
ulimit -c 100000
the number could be any size that your hard disk lets you afford. Then re-run this program again. It should generate the core dump file. examine that with gdb.
Reply With Quote
Reply

  Geeks Talk > Operating Systems > Unix/Linux


Thread Tools
Display Modes


Similar Threads

Thread Thread Starter Forum Replies Last Post
Core Functions for QTP ajadhav QTP 5 01-07-2008 01:26 PM
core java chandra.mr Java 3 01-01-2008 10:56 AM
Core java hemant_rbsharma Java 8 12-16-2007 05:58 AM
Core Java sweet_person JSP 1 08-15-2007 06:14 AM
Upload all views in a single dump arulsjc SAP R/3 0 05-19-2007 06:13 AM


All times are GMT -4. The time now is 12:34 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved