Anybody got a tool to peer into a guest domain?
Folks --
I'm -still- trying to get FreeBSD 6.0 up and running on VT-x hardware. I'm at a point, per an earlier mail of mine where QEMU seg faults and leaves the guest domain in a blocked state. I'd like to know what code was executing in the guest domain at the point QEMU seg faulted.
So, I'm looking for a tool to dump the register state of the guest domain and show some memory regions: code around the eip and esp leap to mind. What's a good tool for doing this?
-- Randy
Quoted 5 lines · Randy Thelen
I'm -still- trying to get FreeBSD 6.0 up and running on VT-x hardware.
I'm at a point, per an earlier mail of mine where QEMU seg faults and
leaves the guest domain in a blocked state. I'd like to know what code was executing in the guest domain at the point QEMU seg faulted.So, I'm looking for a tool to dump the register state of the guest domain and show some memory regions: code around the eip and esp leap to mind. What's a good tool for doing this?
The gdb debugger stub has been updated to work with HVM guests. See some docs under tools/debugger/gdb. tools/misc/xenctx might also work. Not sure it's been updated for HVm guests though.
-- Keir
Quoted 1 line · Keir Fraser
The gdb debugger stub has been updated to work with HVM guests. See some docs under
tools/debugger/gdb.
After reading the README in that directory and following its directions, I'm still not successful at getting gdbserver to run.
Here is what I did:
$ ./gdbbuild ... $ cp gdb-6.2.1-linux-i386-xen/gdb/gdbserver/gdbserver /usr/bin/
(email I've read since that operation indicate I should rename gdbserver to gdbserver-xen. And the README states that the file will already be called gdbserver-xen, which it isn't.)
$ xm list Name ID Mem(MiB) VCPUs State Time(s) Domain-0 0 1677 2 r----- 721.9 Linux-hvm 10 256 1 -b---- 25.0 $ gdbserver 127.0.0.1:9999 --attach 10 Cannot attach to process 10: Operation not permitted (1) $
Hmm.
$ whoami root $
Some documentation indicates that I need to compile the guest domain kernel with:
Quoted 3 lines
Build your kernel with debug. I use the flags
"verbose=y domu_debug=y debug=y". although I dont know if these are all required.
But, I'm trying to debug a HVM domain with a FreeBSD, which leaves me with what options? And, I'm debugging an arbitrary piece of code in that domain ... btxldr? ficl? Don't know. That's part of why I need to peer into the domain.
-- Randy
Quoted 7 lines · Randy Thelen
Some documentation indicates that I need to compile the guest domain kernel with:
Quoted 3 lines
Build your kernel with debug. I use the flags
"verbose=y domu_debug=y debug=y". although I dont know if these are all required.But, I'm trying to debug a HVM domain with a FreeBSD, which leaves me with what options? And, I'm debugging an arbitrary piece of code in that domain ... btxldr? ficl? Don't know. That's part of why I need to peer into the domain.
Those are build options for Xen.
There should be others on the list who can give tips (e.g., maybe some of the Intel guys).
-- Keir