[CRIU] CRIU and gdb
Ruslan Kuprieiev
kupruser at gmail.com
Mon Apr 6 08:34:18 PDT 2015
Hi,
There is a project called CRIU that implements checkpoint\restore in
userspace.
It is able to save/restore process to/from files on disk(images).
While working on images->core dump conversion, I realized that criu images
could be used directly by gdb to debug a process. For example, there is
an outdated
project called google-coredumper[1] that lets applications create core dump
on demand. With CRIU we can achieve same thing but with a lot more data
produced. So I thought that it could be a good idea to teach gdb to use
criu images.
Here is one of the ways I see it:
1) some process $PID hangs
2) save process state with criu:
criu dump -t $PID -D imgs [other flags]
3) criu-images action will restore process from imgs with --leave-stopped
flag and then attach to it.
gdb
(gdb) criu-images imgs
It might also be useful to be able to save state of debugged process by
stopping it, detaching and calling criu to save its state.
What do you guys think about it?
[1] https://code.google.com/p/google-coredumper/
Thanks,
Ruslan
More information about the CRIU
mailing list