how to produce core under Linux, Debug coreExcerpt from: Http://blog.163.com/[email protected]/blog/static/19554784201131791239753/When an unusual program exits, the kernel generates a core file (a memory image, plus debugging information) in the
1. Introduction to core files
When a program crashes, it generally generates a core file under the specified directory. The core file is only a memory image (with debugging information added) and is mainly used for debugging.
2. enable or disable
When developing and using Linux programs, the engine is sometimes inexplicable.The core of the slave is deleted. I checked it online and sorted out a simpleSingle debugging core file method.1. What is core dump?Core, that is, core memory, and dump
First, let's see what machine I use:
$ Uname-Linux Dev 2.4.21-9.30 axsmp #1 SMP Wed May 26 23:37:09 EDT 2004 i686 i686 i386 GNU/Linux
Take a look at some default parameters. Note that the core file size is 0, and the core file will not be generated
One, what is Coredump
We often hear that the program core dropped, need to locate the solution, the majority of this refers to the corresponding program due to a variety of anomalies or bugs caused in the operation of abnormal exit or stop, and
Preface
Recently encountered large projectsProgramWhen SIGSEGV appeared, I never knew to use the core dump tool to debug the program. It took nearly a week to locate the problem. The boss was angry and had serious consequences, I learned this
If you can run the program repeatedly, then we can easily use the following methods to run the program repeatedly started GDB debugging:
$gdb
(gdb) file./a.out
(GDB) Run
If the problematic program cannot be run repeatedly, but there is a core file
Develop/debug. NET core code on MAC using visual Studio codeThe. Net Core 1.0 is finally released, and one of the big selling points of the core is cross-platform. This cross-platform is not just a cross-platform operation, but also a cross-platform
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.