chenzero@chenzero:~/work/testdmp/Debug$ gdb testdmp GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i686-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from testdmp...done. (gdb) set follow-fork-mode child (gdb) set detach-on-fork off (gdb) b testdmp.cpp:10 Breakpoint 1 at 0x80484d3: file ../src/testdmp.cpp, line 10. (gdb) b testdmp.cpp:14 Breakpoint 2 at 0x8048501: file ../src/testdmp.cpp, line 14. (gdb) run Starting program: /windows/e/work/testdmp/Debug/testdmp [New process 5524] Reading symbols from /usr/lib/debug/lib/i386-linux-gnu/libc-2.19.so...done. Reading symbols from /usr/lib/debug/lib/i386-linux-gnu/ld-2.19.so...done. [Switching to process 5524] Breakpoint 2, main (argc=1, argv=0xbfffeb84) at ../src/testdmp.cpp:14 14 p = getppid(); (gdb) info inferiors Num Description Executable * 2 process 5524 /windows/e/work/testdmp/Debug/testdmp 1 process 5520 /windows/e/work/testdmp/Debug/testdmp (gdb) continue Continuing. child ... :5520 5524 [Inferior 2 (process 5524) exited normally] (gdb) info inferiors Num Description Executable * 2 /windows/e/work/testdmp/Debug/testdmp 1 process 5520 /windows/e/work/testdmp/Debug/testdmp (gdb) inferior 1 [Switching to inferior 1 [process 5520] (/windows/e/work/testdmp/Debug/testdmp)] [Switching to thread 1 (process 5520)] #0 0xb7fdccb0 in ?? () (gdb) continue Continuing. Breakpoint 1, main (argc=1, argv=0xbfffeb84) at ../src/testdmp.cpp:10 10 p = getpid(); *** Error in `gdb': free(): invalid pointer: 0x083a7d08 *** parent ..: 5520 5524 Aborted (core dumped)