diff options
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.cc | 14 |
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 |