123
cp debug.log debug.save
$ ps -C a.out 1234 ? 00:00:00 a.out
$ gdb (gdb) attach 1234
(gdb) generate-core-file
$ gdb ./a.out core.1234