diff options
author | Mike Day <ncmike@ncultra.org> | 2015-01-21 13:45:24 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-02-16 17:30:20 +0100 |
commit | 0d53d9fe8a0dcb849bc7c9836e9e6a287f9aa787 (patch) | |
tree | b1009b26af43d5e840058a8ab6600f2f367d0de8 /scripts | |
parent | ae3a7047d00cfa7ed221beda08f98487b7e17501 (diff) | |
download | qemu-0d53d9fe8a0dcb849bc7c9836e9e6a287f9aa787.zip qemu-0d53d9fe8a0dcb849bc7c9836e9e6a287f9aa787.tar.gz qemu-0d53d9fe8a0dcb849bc7c9836e9e6a287f9aa787.tar.bz2 |
exec: convert ram_list to QLIST
QLIST has RCU-friendly primitives, so switch to it.
Reviewed-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Mike Day <ncmike@ncultra.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/dump-guest-memory.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/dump-guest-memory.py b/scripts/dump-guest-memory.py index 1ed8b67..dc8e44a 100644 --- a/scripts/dump-guest-memory.py +++ b/scripts/dump-guest-memory.py @@ -108,16 +108,16 @@ shape and this command should mostly work.""" assert (val["hi"] == 0) return val["lo"] - def qtailq_foreach(self, head, field_str): - var_p = head["tqh_first"] + def qlist_foreach(self, head, field_str): + var_p = head["lh_first"] while (var_p != 0): var = var_p.dereference() yield var - var_p = var[field_str]["tqe_next"] + var_p = var[field_str]["le_next"] def qemu_get_ram_block(self, ram_addr): ram_blocks = gdb.parse_and_eval("ram_list.blocks") - for block in self.qtailq_foreach(ram_blocks, "next"): + for block in self.qlist_foreach(ram_blocks, "next"): if (ram_addr - block["offset"] < block["length"]): return block raise gdb.GdbError("Bad ram offset %x" % ram_addr) |