mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Merge remote-tracking branch 'remotes/elmarco/tags/dump-pull-request' into staging
# gpg: Signature made Tue 02 Jan 2018 13:51:26 GMT # gpg: using RSA key 0xDAE8E10975969CE5 # gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" # gpg: aka "Marc-André Lureau <marcandre.lureau@gmail.com>" # Primary key fingerprint: 87A9 BD93 3F87 C606 D276 F62D DAE8 E109 7596 9CE5 * remotes/elmarco/tags/dump-pull-request: dump-guest-memory.py: fix "You can't do that without a process to debug" dump: fix note_name_equal() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
@@ -788,12 +788,7 @@ static bool note_name_equal(DumpState *s,
|
||||
get_note_sizes(s, note, &head_size, &name_size, NULL);
|
||||
head_size = ROUND_UP(head_size, 4);
|
||||
|
||||
if (name_size != len ||
|
||||
memcmp(note + head_size, "VMCOREINFO", len)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return name_size == len && memcmp(note + head_size, name, len) == 0;
|
||||
}
|
||||
|
||||
/* write common header, sub header and elf note to vmcore */
|
||||
|
||||
@@ -35,6 +35,8 @@ static void vmcoreinfo_realize(DeviceState *dev, Error **errp)
|
||||
{
|
||||
VMCoreInfoState *s = VMCOREINFO(dev);
|
||||
FWCfgState *fw_cfg = fw_cfg_find();
|
||||
/* for gdb script dump-guest-memory.py */
|
||||
static VMCoreInfoState * volatile vmcoreinfo_state G_GNUC_UNUSED;
|
||||
|
||||
/* Given that this function is executing, there is at least one VMCOREINFO
|
||||
* device. Check if there are several.
|
||||
@@ -56,6 +58,7 @@ static void vmcoreinfo_realize(DeviceState *dev, Error **errp)
|
||||
&s->vmcoreinfo, sizeof(s->vmcoreinfo), false);
|
||||
|
||||
qemu_register_reset(vmcoreinfo_reset, dev);
|
||||
vmcoreinfo_state = s;
|
||||
}
|
||||
|
||||
static const VMStateDescription vmstate_vmcoreinfo = {
|
||||
|
||||
@@ -546,8 +546,7 @@ shape and this command should mostly work."""
|
||||
return None
|
||||
|
||||
def add_vmcoreinfo(self):
|
||||
vmci = '(VMCoreInfoState *)' + \
|
||||
'object_resolve_path_type("", "vmcoreinfo", 0)'
|
||||
vmci = 'vmcoreinfo_realize::vmcoreinfo_state'
|
||||
if not gdb.parse_and_eval("%s" % vmci) \
|
||||
or not gdb.parse_and_eval("(%s)->has_vmcoreinfo" % vmci):
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user