[Qemu-devel] [PULL 1/1] dump-guest-memory.py: fix python 2 support

2018-01-20 Thread Marc-André Lureau
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 memor

[Qemu-devel] [PULL 1/1] dump-guest-memory.py: fix python 2 support

2018-01-17 Thread Marc-André Lureau
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 expect a byte string, but Python 2 buffer doesn't pro