aboutsummaryrefslogtreecommitdiff
path: root/src/client/linux/dump_writer_common/ucontext_reader.cc
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2020-03-10 16:30:20 -0700
committerMike Frysinger <vapier@chromium.org>2020-03-10 23:49:55 +0000
commit75ca6a193d34f05fee66290028321a97e0a74910 (patch)
tree162cf0875aab30c0d79cecc6dca6cb9ac3faa0fd /src/client/linux/dump_writer_common/ucontext_reader.cc
parentUse ULONG_MAX instead of __WORDSIZE to determine ELF class (diff)
downloadbreakpad-75ca6a193d34f05fee66290028321a97e0a74910.tar.xz
Use public fpregset_t type to define fpstate_t
The _libc_fpstate struct tag is an implementation detail of glibc, and musl uses a different struct tag, _fpstate. Unfortunately, the public type fpregset_t is a pointer type, so is not suitable for allocating storage, or referring to constant storage. Instead, we can use std::remove_pointer<fpregset_t>::type to refer to the pointed-to type, regardless of the struct tag. Bug: google-breakpad:631 Change-Id: Iaf47f15b2d834dd8de839431f65a481e9b0c7f9e Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2096171 Reviewed-by: Mike Frysinger <vapier@chromium.org>
Diffstat (limited to 'src/client/linux/dump_writer_common/ucontext_reader.cc')
-rw-r--r--src/client/linux/dump_writer_common/ucontext_reader.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/linux/dump_writer_common/ucontext_reader.cc b/src/client/linux/dump_writer_common/ucontext_reader.cc
index 6ee6cc1e..ee515c41 100644
--- a/src/client/linux/dump_writer_common/ucontext_reader.cc
+++ b/src/client/linux/dump_writer_common/ucontext_reader.cc
@@ -49,7 +49,7 @@ uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
}
void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
- const struct _libc_fpstate* fp) {
+ const fpstate_t* fp) {
const greg_t* regs = uc->uc_mcontext.gregs;
out->context_flags = MD_CONTEXT_X86_FULL |
@@ -97,7 +97,7 @@ uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) {
}
void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
- const struct _libc_fpstate* fpregs) {
+ const fpstate_t* fpregs) {
const greg_t* regs = uc->uc_mcontext.gregs;
out->context_flags = MD_CONTEXT_AMD64_FULL;