Prepare for your Next Interview
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 ...
|
|||
|
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.
|
| Sponsored Links |
|
|||
|
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. |
|
|||
|
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. |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| 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 |