This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
get backtrace of KVM VM from host
- From: Justin Cinkelj <justin dot cinkelj at xlab dot si>
- To: elfutils-devel at sourceware dot org
- Date: Mon, 21 May 2018 10:26:08 +0200
- Subject: get backtrace of KVM VM from host
(crossposting from KVM maillist)
Hi
Is it possible to get stack backtrace into KVM VM from the host side? So
if I run './stack -p PID' (stack from elfutilfs
https://sourceware.org/elfutils/), I get backtrace of some process. I
would like to do the same for VM. I can assume VM will run only a kernel
(a unikernel, like OSv or IncludeOS), so most/all debug symbols will be
there in a single file, and at least IncludeOS doesnt load any code
beside its own kernel.
I did notice KVM_GET_REGS and KVM_SET_MEMORY_REGION, and at least for
trivial examples (like https://github.com/dpw/kvm-hello-world) this
provides enough information to track which code was loaded into VM,
observe current stack content and registers. I can only guess much more
work is required to get similar result with qemu-kvm. Hence I'm asking
if this is already implemented.
Thank you,
Justin