qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>, qemu-devel@nongnu.org
Cc: Eduardo Habkost <ehabkost@redhat.com>, Cleber Rosa <crosa@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] dump-guest-memory.py: skip vmcoreinfo section if not available
Date: Wed, 31 Jan 2018 11:47:03 +0100	[thread overview]
Message-ID: <414b4919-291f-0f3e-733f-417a4c03c890@redhat.com> (raw)
In-Reply-To: <20180131104120.16708-1-marcandre.lureau@redhat.com>

On 01/31/18 11:41, Marc-André Lureau wrote:
> On some architectures, qemu doesn't support vmcoreinfo device,
> and dump-guest-memory fails:
> 
> (gdb) dump-guest-memory /tmp/vmcore  ppc64-le
> guest RAM blocks:
> target_start     target_end       host_addr        message count
> ---------------- ---------------- ---------------- ------- -----
> 0000000000000000 0000000200000000 00003ffd86980000 added       1
> 0000200080000000 0000200080800000 00003ffd86170000 added       2
> Python Exception <class 'gdb.error'> No symbol "vmcoreinfo_realize" in current context.:
> Error occurred in Python command: No symbol "vmcoreinfo_realize" in current context.
> 
> Check that vmcoreinfo_realize symbol exists before evaluating an
> expression with it.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  scripts/dump-guest-memory.py | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/scripts/dump-guest-memory.py b/scripts/dump-guest-memory.py
> index 03fbf69f8a..51acfcd0c0 100644
> --- a/scripts/dump-guest-memory.py
> +++ b/scripts/dump-guest-memory.py
> @@ -546,6 +546,8 @@ shape and this command should mostly work."""
>          return None
>  
>      def add_vmcoreinfo(self):
> +        if gdb.lookup_symbol("vmcoreinfo_realize")[0] is None:
> +            return
>          vmci = 'vmcoreinfo_realize::vmcoreinfo_state'
>          if not gdb.parse_and_eval("%s" % vmci) \
>             or not gdb.parse_and_eval("(%s)->has_vmcoreinfo" % vmci):
> 

Reviewed-by: Laszlo Ersek <lersek@redhat.com>

      reply	other threads:[~2018-01-31 10:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-31 10:41 [Qemu-devel] [PATCH] dump-guest-memory.py: skip vmcoreinfo section if not available Marc-André Lureau
2018-01-31 10:47 ` Laszlo Ersek [this message]

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=414b4919-291f-0f3e-733f-417a4c03c890@redhat.com \
    --to=lersek@redhat.com \
    --cc=crosa@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).