aboutsummaryrefslogtreecommitdiff
path: root/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2023-08-10 22:58:49 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-08-10 22:58:49 +0000
commitc3c25b3748e23f22d7eb5c0cf6ed671259a25aa0 (patch)
treef98d11d6a158167e19fc9141c79d877280a616a6 /src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc
parent8d0176459cfc11e28e9427a7eadcf7a42f654f62 (diff)
parent332a4371eda197cfcbcd01bf197482aecde23a1a (diff)
downloadgoogle-breakpad-c3c25b3748e23f22d7eb5c0cf6ed671259a25aa0.tar.gz
Upgrade google-breakpad to v2023.01.27 am: 332a4371ed
Original change: https://android-review.googlesource.com/c/platform/external/google-breakpad/+/2704174 Change-Id: I2b9d3aeb0d60cce168eaa83dbf2e3225f26fe34e Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc')
-rw-r--r--src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc b/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc
index ea6b9a12..a8455165 100644
--- a/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc
+++ b/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc
@@ -1,5 +1,4 @@
-// Copyright (c) 2009, Google Inc.
-// All rights reserved.
+// Copyright 2009 Google LLC
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -11,7 +10,7 @@
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
-// * Neither the name of Google Inc. nor the names of its
+// * Neither the name of Google LLC nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
@@ -63,6 +62,8 @@
#endif
using namespace google_breakpad;
+using google_breakpad::elf::FileID;
+using google_breakpad::elf::kDefaultBuildIdSize;
namespace {
@@ -337,7 +338,7 @@ TEST_F(LinuxPtraceDumperChildTest, MappingsIncludeLinuxGate) {
ASSERT_TRUE(dumper.Init());
void* linux_gate_loc =
- reinterpret_cast<void *>(dumper.auxv()[AT_SYSINFO_EHDR]);
+ reinterpret_cast<void*>(dumper.auxv()[AT_SYSINFO_EHDR]);
ASSERT_TRUE(linux_gate_loc);
bool found_linux_gate = false;
@@ -462,6 +463,9 @@ TEST(LinuxPtraceDumperTest, VerifyStackReadWithMultipleThreads) {
#elif defined(__mips__)
pid_t* process_tid_location =
reinterpret_cast<pid_t*>(one_thread.mcontext.gregs[1]);
+#elif defined(__riscv)
+ pid_t* process_tid_location =
+ reinterpret_cast<pid_t*>(one_thread.mcontext.__gregs[4]);
#else
#error This test has not been ported to this platform.
#endif
@@ -559,6 +563,8 @@ TEST_F(LinuxPtraceDumperTest, SanitizeStackCopy) {
uintptr_t heap_addr = thread_info.regs.rcx;
#elif defined(__mips__)
uintptr_t heap_addr = thread_info.mcontext.gregs[1];
+#elif defined(__riscv)
+ uintptr_t heap_addr = thread_info.mcontext.__gregs[4];
#else
#error This test has not been ported to this platform.
#endif