On 01/19/2018 10:25 AM, Marc-André Lureau wrote: > Python GDB support may use Python 2 or 3. > > Inferior.read_memory() may return a 'buffer' with Python 2 or a > 'memoryview' with Python 3 (see also > https://sourceware.org/gdb/onlinedocs/gdb/Inferiors-In-Python.html) > > The elf.add_vmcoreinfo_note() method expects a "bytes" object. Wrap > the returned memory with bytes(), which works with both 'memoryview' > and 'buffer'. > > Fixes a regression introduced with commit > d23bfa91b7789534d16ede6cb7d925bfac3f3c4c ("add vmcoreinfo"). > > Suggested-by: Peter Maydell <peter.mayd...@linaro.org> > Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> > --- > scripts/dump-guest-memory.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature