From 94c42088212898f28ee94ac8ddd850ebe8b19d5a Mon Sep 17 00:00:00 2001 From: Zyan Wu Date: Wed, 8 Sep 2021 17:45:07 +0800 Subject: [PATCH] fix: minidump-2-core doesn't work for new arm64 dumps The app will check if process_architecture is ARM64_OLD which is 0x8003 but newman is a new arch which is ARM64 (0x12) We can fix the issue by checking both values Test: "/google/src/cloud/zyanwu/latest/google3/blaze-bin/chrome/dongle/platform/tools/minidump --crash_report_id=49ed111b84c0736e --crash_server=crash --build_number=265669 --build_branch=1.56 --product=newman-user --eureka_root=/usr/local/google/home/zyanwu/eureka --symbol_cache_dir=/usr/local/google/home/zyanwu/android/debug/symbols --debug" can work and it can convert the minidump to core dump then load gdb. Bug: 199144156 Change-Id: I1590a5b617e55ae8347aad426ba5b636ff6dcdfb Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3146740 Reviewed-by: Sterling Augustine Reviewed-by: Nelson Billing --- src/tools/linux/md2core/minidump-2-core.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tools/linux/md2core/minidump-2-core.cc b/src/tools/linux/md2core/minidump-2-core.cc index 7549d3ad..7e351d16 100644 --- a/src/tools/linux/md2core/minidump-2-core.cc +++ b/src/tools/linux/md2core/minidump-2-core.cc @@ -600,7 +600,8 @@ ParseSystemInfo(const Options& options, CrashedProcess* crashinfo, exit(1); } #elif defined(__aarch64__) - if (sysinfo->processor_architecture != MD_CPU_ARCHITECTURE_ARM64_OLD) { + if (sysinfo->processor_architecture != MD_CPU_ARCHITECTURE_ARM64_OLD && + sysinfo->processor_architecture != MD_CPU_ARCHITECTURE_ARM64) { fprintf(stderr, "This version of minidump-2-core only supports ARM (64bit).\n"); exit(1);