aboutsummaryrefslogtreecommitdiff
path: root/dump.c
diff options
context:
space:
mode:
Diffstat (limited to 'dump.c')
-rw-r--r--dump.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/dump.c b/dump.c
index 097e60b2b3..6bdb0dbe23 100644
--- a/dump.c
+++ b/dump.c
@@ -1609,10 +1609,18 @@ static void vmcoreinfo_update_phys_base(DumpState *s)
lines = g_strsplit((char *)vmci, "\n", -1);
for (i = 0; lines[i]; i++) {
- if (g_str_has_prefix(lines[i], "NUMBER(phys_base)=")) {
- if (qemu_strtou64(lines[i] + 18, NULL, 16,
+ const char *prefix = NULL;
+
+ if (s->dump_info.d_machine == EM_X86_64) {
+ prefix = "NUMBER(phys_base)=";
+ } else if (s->dump_info.d_machine == EM_AARCH64) {
+ prefix = "NUMBER(PHYS_OFFSET)=";
+ }
+
+ if (prefix && g_str_has_prefix(lines[i], prefix)) {
+ if (qemu_strtou64(lines[i] + strlen(prefix), NULL, 16,
&phys_base) < 0) {
- warn_report("Failed to read NUMBER(phys_base)=");
+ warn_report("Failed to read %s", prefix);
} else {
s->dump_info.phys_base = phys_base;
}