Skip to contentSkip to conversation

Dump patches

GIT PULL Applied Marc-André Lureau 2 participants 3 messages Jan 20, 2018 – Jan 22, 2018

lore
Share & tools
lore
#0 lore raw

The following changes since commit b384cd95eb9c6f73ad84ed1bb0717a26e29cc78f:

Merge remote-tracking branch 'remotes/ehabkost/tags/machine-next-pull-request' into staging (2018-01-19 16:35:25 +0000)

are available in the Git repository at:

https://github.com/elmarco/qemu.git tags/dump-pull-request

for you to fetch changes up to 6f49ec4034e55dfb675a56a62c9579384f7fb8cc:

dump-guest-memory.py: fix python 2 support (2018-01-20 20:59:00 +0100)

----------------------------------------------------------------

----------------------------------------------------------------

Marc-André Lureau (1):
dump-guest-memory.py: fix python 2 support

 scripts/dump-guest-memory.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 1 line
2.16.0.rc1.1.gef27df75a1
#1 lore raw

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

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").

---
 scripts/dump-guest-memory.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/dump-guest-memory.py +1 -1
index 09bec92b50..03fbf69f8a 100644
@@ -564,7 +564,7 @@ shape and this command should mostly work."""
 
         vmcoreinfo = self.phys_memory_read(addr, size)
         if vmcoreinfo:
-            self.elf.add_vmcoreinfo_note(vmcoreinfo.tobytes())
+            self.elf.add_vmcoreinfo_note(bytes(vmcoreinfo))
 
     def invoke(self, args, from_tty):
         """Handles command invocation from gdb."""
Signature · 1 line
2.16.0.rc1.1.gef27df75a1
#2 lore raw
In reply to Marc-André Lureau
Quoted 14 lines · Marc-André Lureau

The following changes since commit b384cd95eb9c6f73ad84ed1bb0717a26e29cc78f:

Merge remote-tracking branch 'remotes/ehabkost/tags/machine-next-pull-request' into staging (2018-01-19 16:35:25 +0000)

are available in the Git repository at:

https://github.com/elmarco/qemu.git tags/dump-pull-request

for you to fetch changes up to 6f49ec4034e55dfb675a56a62c9579384f7fb8cc:

dump-guest-memory.py: fix python 2 support (2018-01-20 20:59:00 +0100)

----------------------------------------------------------------

Quoted 7 lines

----------------------------------------------------------------

Marc-André Lureau (1):
dump-guest-memory.py: fix python 2 support

 scripts/dump-guest-memory.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

-- PMM