From: Avi Kivity <avi@qumranet.com>
To: david ahern <daahern@cisco.com>
Cc: kvm-devel <kvm-devel@lists.sourceforge.net>
Subject: Re: tools to dump guest memory and generate core file
Date: Tue, 18 Mar 2008 08:15:28 +0200 [thread overview]
Message-ID: <47DF5E00.7040700@qumranet.com> (raw)
In-Reply-To: <47DF0066.1090602@cisco.com>
david ahern wrote:
> Attaching gdb to qemu you work with addresses as seen by the qemu process; the
> idea is to work with addresses as seen inside the guest.
>
> For example, in the qemu console you can examine guest kernel memory such as
> task structs using guest kernel based addresses:
>
> (qemu) x /128w 0xc0327a80
> 00000000c0327a80: 0x00000000 0xc039a000 0x00000002 0x00000000
> 00000000c0327a90: 0x00000000 0xffffffff 0x0000008c 0x00000078
> 00000000c0327aa0: 0xc0327aa0 0xc0327aa0 0x00000000 0x00000000
> 00000000c0327ab0: 0xffffff9b 0xdae71a00 0x003d098c 0xdae71a00
> 00000000c0327ac0: 0x003d098c 0x00000000 0x00000000 0xffffffff
> ...
>
> where 0xc0327a80 is the address of the first task (init_task symbol). This form
> is really painful to decipher much less follow the task list.
>
>
> Now, if you attach gdb to the qemu process,
>
> gdb /usr/local/bin/qemu-system-x86_64 2346
>
I meant connecting to the gdb stub in qemu that represents the guest:
(gdb) target remote localhost:1234
Of course, it means starting qemu with the gdb stub enabled. We might
add a monitor command to start it after the fact.
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
next prev parent reply other threads:[~2008-03-18 6:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-17 3:02 tools to dump guest memory and generate core file david ahern
2008-03-17 8:59 ` Avi Kivity
2008-03-17 23:36 ` david ahern
2008-03-18 6:15 ` Avi Kivity [this message]
2008-03-18 9:30 ` Uri Lublin
2008-03-19 0:19 ` david ahern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47DF5E00.7040700@qumranet.com \
--to=avi@qumranet.com \
--cc=daahern@cisco.com \
--cc=kvm-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.