View detailed error causes for core dumped

Source: Internet
Author: User

What is core dump?

Debug one today ProgramThe core dump is used.
What is core dump?
Core means memory, dump means throwing it out and heap it out.
When developing and using UNIX programs, sometimes the program is inexplicably down, but there is no prompt (sometimes the prompt is core dumped ). at this time, you can check whether it is like core. process number file generation. This file is generated by the operating system throwing out the memory content when the program is down. It can be used as a reference for debugging programs.
Core dump is also called core dump. When an exception occurs during the program running and the program exits abnormally, the operating system stores the current memory status of the program in a core file, which is called core dump.

How to use core files?
GDB-C core file path [Application Path]
Enter where and press enter to display the row in which the program is deleted and in which function.

Why is no core file generated?
Sometimes the program is down, but the core file is not generated. the generation of the core file is related to the environment settings of the current system. You can use the following statement to set the file and then run the program to generate the core file.
Ulimit-C Unlimited
The core file is generally generated in the same path as the running program, and the file name is generally the core. Process number.

PS:
I encountered a core dump error because the class definition contains pointer member variables. However, when defining an object, the class does not call the Destructor that initializes the pointer member variables.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.