LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-02-2006, 01:26 AM   #1
dayalan_cse
Member
 
Registered: Oct 2006
Posts: 132

Rep: Reputation: 15
what is core dump and how to do it


hello,

how can i do core dump for c and c++ programs to debug using gdb. pls help me how can i do core dump?

Thanks & Regards
dayalan
 
Old 11-02-2006, 07:00 AM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
A core file is a binary file with the state of the world (so to speak) when a program dies. You can force a program to die and generate a core with kill -6 <PID>. You need to make sure your ulimit is setup to allow you to have core files.

You can use gdb to debug a program via a core by by typing "gdb <programexe> <corefile>".
 
Old 11-02-2006, 03:06 PM   #3
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
You can also generate a core file from a living application without killing it with the gcore command.
Gcore is only recently available under Gnu/Linux.
 
Old 11-03-2006, 12:59 AM   #4
dayalan_cse
Member
 
Registered: Oct 2006
Posts: 132

Original Poster
Rep: Reputation: 15
thanks

Quote:
Originally Posted by jlliagre
You can also generate a core file from a living application without killing it with the gcore command.
Gcore is only recently available under Gnu/Linux.

hi thank you to every one who responded to me. i am new for the linux your information has helped much.thank you once again.


Thanks & Regards
dayalan
 
  


Reply



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! khaleel5000 Linux - Software 6 06-29-2006 05:21 AM
gcc core dump divukman Programming 2 06-25-2006 07:35 AM
Core Dump MrPotatoHead AIX 3 01-14-2004 09:42 AM
core dump tomservo Linux - General 4 09-23-2002 05:35 PM
core dump lacrimae Linux - General 3 02-19-2002 01:43 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:44 PM.

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
Open Source Consulting | Domain Registration