Debug core dump file under Linux

Source: Internet
Author: User

Reference articles

0 Core dump File

When the program runs abnormally terminates or crashes, the operating system records the memory state of the program at the time and saves it in a file, which is called the core dump and becomes the kernel dump.

In addition to the memory information, some critical program run states also dump down, such as register information (including program pointers, stack pointers, etc.), memory management information, other processor and operating system status and information.

1 Open Core Dump
ulimit-c [num]

  

This command allows you to see if the core dump function is turned on.

The default output is 0, which indicates that the core dump maximum makefile size is 0, which means it is closed.

This value is independent of each terminal and is not shared. And only allow the first time to set a relatively large value, the latter can only be smaller than this value, create a new interrupt to modify it again

The resulting core dump file, named Core, is stored under the current folder

1 Build Core

After running:

2 Debug Core

GDB Program name core file name

  

The rest is gdb.

Debug core dump file under Linux

Related Article

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.