|
@@ -1,7 +1,7 @@
|
|
-From 1ebe516ac0b1ae7b8421f33adb40d11bdbbf4d94 Mon Sep 17 00:00:00 2001
|
|
|
|
|
|
+From 62457fa5271a6b22210ec0adefe6fee944f785f7 Mon Sep 17 00:00:00 2001
|
|
From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
|
|
From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
|
|
Date: Thu, 31 Mar 2022 00:35:10 +0000
|
|
Date: Thu, 31 Mar 2022 00:35:10 +0000
|
|
-Subject: [PATCH 16/21] third_party: crashpad: add support for riscv
|
|
|
|
|
|
+Subject: [PATCH 17/22] third_party: crashpad: add support for riscv
|
|
|
|
|
|
Credit to work contributed in Github.
|
|
Credit to work contributed in Github.
|
|
https://github.com/felixonmars/archriscv-packages/tree/master/chromium
|
|
https://github.com/felixonmars/archriscv-packages/tree/master/chromium
|
|
@@ -31,10 +31,10 @@ Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
|
|
20 files changed, 475 insertions(+), 2 deletions(-)
|
|
20 files changed, 475 insertions(+), 2 deletions(-)
|
|
|
|
|
|
diff --git a/third_party/crashpad/crashpad/minidump/minidump_context.h b/third_party/crashpad/crashpad/minidump/minidump_context.h
|
|
diff --git a/third_party/crashpad/crashpad/minidump/minidump_context.h b/third_party/crashpad/crashpad/minidump/minidump_context.h
|
|
-index 3a3e603cb0d2d..cf074d2b8236b 100644
|
|
|
|
|
|
+index c10743d84899d..616b43654d11f 100644
|
|
--- a/third_party/crashpad/crashpad/minidump/minidump_context.h
|
|
--- a/third_party/crashpad/crashpad/minidump/minidump_context.h
|
|
+++ b/third_party/crashpad/crashpad/minidump/minidump_context.h
|
|
+++ b/third_party/crashpad/crashpad/minidump/minidump_context.h
|
|
-@@ -592,6 +592,41 @@ struct MinidumpContextMIPS64 {
|
|
|
|
|
|
+@@ -637,6 +637,41 @@ struct MinidumpContextMIPS64 {
|
|
uint64_t fir;
|
|
uint64_t fir;
|
|
};
|
|
};
|
|
|
|
|
|
@@ -77,7 +77,7 @@ index 3a3e603cb0d2d..cf074d2b8236b 100644
|
|
|
|
|
|
#endif // CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_H_
|
|
#endif // CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_H_
|
|
diff --git a/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc b/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
|
|
diff --git a/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc b/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
|
|
-index 2f2d90ba47071..ad26739432f51 100644
|
|
|
|
|
|
+index 6ae25b8fe12f8..cfd86fa9f4d58 100644
|
|
--- a/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
|
|
--- a/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
|
|
+++ b/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
|
|
+++ b/third_party/crashpad/crashpad/minidump/minidump_context_writer.cc
|
|
@@ -102,6 +102,13 @@ MinidumpContextWriter::CreateFromSnapshot(const CPUContext* context_snapshot) {
|
|
@@ -102,6 +102,13 @@ MinidumpContextWriter::CreateFromSnapshot(const CPUContext* context_snapshot) {
|
|
@@ -94,7 +94,7 @@ index 2f2d90ba47071..ad26739432f51 100644
|
|
default: {
|
|
default: {
|
|
LOG(ERROR) << "unknown context architecture "
|
|
LOG(ERROR) << "unknown context architecture "
|
|
<< context_snapshot->architecture;
|
|
<< context_snapshot->architecture;
|
|
-@@ -454,4 +461,41 @@ size_t MinidumpContextMIPS64Writer::ContextSize() const {
|
|
|
|
|
|
+@@ -557,4 +564,41 @@ size_t MinidumpContextMIPS64Writer::ContextSize() const {
|
|
return sizeof(context_);
|
|
return sizeof(context_);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -137,10 +137,10 @@ index 2f2d90ba47071..ad26739432f51 100644
|
|
+
|
|
+
|
|
} // namespace crashpad
|
|
} // namespace crashpad
|
|
diff --git a/third_party/crashpad/crashpad/minidump/minidump_context_writer.h b/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
|
|
diff --git a/third_party/crashpad/crashpad/minidump/minidump_context_writer.h b/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
|
|
-index 80b312b23c2a4..278830085c162 100644
|
|
|
|
|
|
+index 9acc7fa012f84..da48628f5ae0d 100644
|
|
--- a/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
|
|
--- a/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
|
|
+++ b/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
|
|
+++ b/third_party/crashpad/crashpad/minidump/minidump_context_writer.h
|
|
-@@ -330,6 +330,47 @@ class MinidumpContextMIPS64Writer final : public MinidumpContextWriter {
|
|
|
|
|
|
+@@ -369,6 +369,47 @@ class MinidumpContextMIPS64Writer final : public MinidumpContextWriter {
|
|
MinidumpContextMIPS64 context_;
|
|
MinidumpContextMIPS64 context_;
|
|
};
|
|
};
|
|
|
|
|
|
@@ -189,10 +189,10 @@ index 80b312b23c2a4..278830085c162 100644
|
|
|
|
|
|
#endif // CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_WRITER_H_
|
|
#endif // CRASHPAD_MINIDUMP_MINIDUMP_CONTEXT_WRITER_H_
|
|
diff --git a/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc b/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
|
|
diff --git a/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc b/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
|
|
-index 78847c11970e5..b2a1486dfbbf0 100644
|
|
|
|
|
|
+index 51c91c4c90e6f..4945b3976e5e3 100644
|
|
--- a/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
|
|
--- a/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
|
|
+++ b/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
|
|
+++ b/third_party/crashpad/crashpad/minidump/minidump_misc_info_writer.cc
|
|
-@@ -135,6 +135,10 @@ std::string MinidumpMiscInfoDebugBuildString() {
|
|
|
|
|
|
+@@ -175,6 +175,10 @@ std::string MinidumpMiscInfoDebugBuildString() {
|
|
static constexpr char kCPU[] = "mips";
|
|
static constexpr char kCPU[] = "mips";
|
|
#elif defined(ARCH_CPU_MIPS64EL)
|
|
#elif defined(ARCH_CPU_MIPS64EL)
|
|
static constexpr char kCPU[] = "mips64";
|
|
static constexpr char kCPU[] = "mips64";
|
|
@@ -204,10 +204,10 @@ index 78847c11970e5..b2a1486dfbbf0 100644
|
|
#error define kCPU for this CPU
|
|
#error define kCPU for this CPU
|
|
#endif
|
|
#endif
|
|
diff --git a/third_party/crashpad/crashpad/snapshot/capture_memory.cc b/third_party/crashpad/crashpad/snapshot/capture_memory.cc
|
|
diff --git a/third_party/crashpad/crashpad/snapshot/capture_memory.cc b/third_party/crashpad/crashpad/snapshot/capture_memory.cc
|
|
-index 06d92581330bf..a8b52d11b9b53 100644
|
|
|
|
|
|
+index cb8231bdb97ca..08de6392466f7 100644
|
|
--- a/third_party/crashpad/crashpad/snapshot/capture_memory.cc
|
|
--- a/third_party/crashpad/crashpad/snapshot/capture_memory.cc
|
|
+++ b/third_party/crashpad/crashpad/snapshot/capture_memory.cc
|
|
+++ b/third_party/crashpad/crashpad/snapshot/capture_memory.cc
|
|
-@@ -112,6 +112,16 @@ void CaptureMemory::PointedToByContext(const CPUContext& context,
|
|
|
|
|
|
+@@ -117,6 +117,16 @@ void CaptureMemory::PointedToByContext(const CPUContext& context,
|
|
for (size_t i = 0; i < std::size(context.mipsel->regs); ++i) {
|
|
for (size_t i = 0; i < std::size(context.mipsel->regs); ++i) {
|
|
MaybeCaptureMemoryAround(delegate, context.mipsel->regs[i]);
|
|
MaybeCaptureMemoryAround(delegate, context.mipsel->regs[i]);
|
|
}
|
|
}
|
|
@@ -244,10 +244,10 @@ index 811a7209587d2..5b09abdb96761 100644
|
|
|
|
|
|
} // namespace crashpad
|
|
} // namespace crashpad
|
|
diff --git a/third_party/crashpad/crashpad/snapshot/cpu_context.cc b/third_party/crashpad/crashpad/snapshot/cpu_context.cc
|
|
diff --git a/third_party/crashpad/crashpad/snapshot/cpu_context.cc b/third_party/crashpad/crashpad/snapshot/cpu_context.cc
|
|
-index 2e29f70398c9f..e2f8097e2cae1 100644
|
|
|
|
|
|
+index 9b7b3f14f1164..b717e5ea007f9 100644
|
|
--- a/third_party/crashpad/crashpad/snapshot/cpu_context.cc
|
|
--- a/third_party/crashpad/crashpad/snapshot/cpu_context.cc
|
|
+++ b/third_party/crashpad/crashpad/snapshot/cpu_context.cc
|
|
+++ b/third_party/crashpad/crashpad/snapshot/cpu_context.cc
|
|
-@@ -197,10 +197,12 @@ bool CPUContext::Is64Bit() const {
|
|
|
|
|
|
+@@ -226,10 +226,12 @@ bool CPUContext::Is64Bit() const {
|
|
case kCPUArchitectureX86_64:
|
|
case kCPUArchitectureX86_64:
|
|
case kCPUArchitectureARM64:
|
|
case kCPUArchitectureARM64:
|
|
case kCPUArchitectureMIPS64EL:
|
|
case kCPUArchitectureMIPS64EL:
|
|
@@ -261,10 +261,10 @@ index 2e29f70398c9f..e2f8097e2cae1 100644
|
|
default:
|
|
default:
|
|
NOTREACHED();
|
|
NOTREACHED();
|
|
diff --git a/third_party/crashpad/crashpad/snapshot/cpu_context.h b/third_party/crashpad/crashpad/snapshot/cpu_context.h
|
|
diff --git a/third_party/crashpad/crashpad/snapshot/cpu_context.h b/third_party/crashpad/crashpad/snapshot/cpu_context.h
|
|
-index fb23c4679f0af..e120a980448d6 100644
|
|
|
|
|
|
+index 4e21b56c590da..42b405f863428 100644
|
|
--- a/third_party/crashpad/crashpad/snapshot/cpu_context.h
|
|
--- a/third_party/crashpad/crashpad/snapshot/cpu_context.h
|
|
+++ b/third_party/crashpad/crashpad/snapshot/cpu_context.h
|
|
+++ b/third_party/crashpad/crashpad/snapshot/cpu_context.h
|
|
-@@ -352,6 +352,20 @@ struct CPUContextMIPS64 {
|
|
|
|
|
|
+@@ -362,6 +362,20 @@ struct CPUContextMIPS64 {
|
|
uint64_t fir;
|
|
uint64_t fir;
|
|
};
|
|
};
|
|
|
|
|
|
@@ -285,7 +285,7 @@ index fb23c4679f0af..e120a980448d6 100644
|
|
//! \brief A context structure capable of carrying the context of any supported
|
|
//! \brief A context structure capable of carrying the context of any supported
|
|
//! CPU architecture.
|
|
//! CPU architecture.
|
|
struct CPUContext {
|
|
struct CPUContext {
|
|
-@@ -382,6 +396,8 @@ struct CPUContext {
|
|
|
|
|
|
+@@ -402,6 +416,8 @@ struct CPUContext {
|
|
CPUContextARM64* arm64;
|
|
CPUContextARM64* arm64;
|
|
CPUContextMIPS* mipsel;
|
|
CPUContextMIPS* mipsel;
|
|
CPUContextMIPS64* mips64;
|
|
CPUContextMIPS64* mips64;
|