Using GDB to generate the Coredump file "reprint"

Source: Internet
Author: User

This article was reproduced from: http://blog.csdn.net/sky_qing/article/details/8548989

If you experience a process with high CPU utilization during testing or if you need to debug the process while you are stuck, you can use the GDB command to generate the Coredump file and then debug the Coredump file to locate the problem.

So how do I use GDB to generate a coredump file? In fact, the steps are simple:

1. Install GDB and then use the command ' GDB '. (Assuming the process number to debug is 21509)

2. Attach gdb to process 21509 using the ' Attach 21590 ' command.

3. Generate the Coredump file core_name using the ' gcore core_name ' command.

4. Disconnect using the ' Detach ' command.

5. Use the ' q ' command to exit GDB.

At this point, a coredump file named Core_name is generated in the current directory. You can use the GDB tool to debug the Coredump file below.

Using GDB to generate the Coredump file "reprint"

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.