author | Andreas Schwab <schwab@suse.de> |
Fri, 11 Aug 2017 09:17:07 +0200 | |
branch | firefox52 |
changeset 989 | a72735108dbe |
permissions | -rw-r--r-- |
989
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
1 |
Index: mozilla/toolkit/crashreporter/google-breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
2 |
=================================================================== |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
3 |
--- mozilla.orig/toolkit/crashreporter/google-breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
4 |
+++ mozilla/toolkit/crashreporter/google-breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
5 |
@@ -40,15 +40,15 @@ namespace google_breakpad { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
6 |
|
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
7 |
#if defined(__i386__) |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
8 |
|
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
9 |
-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
10 |
+uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
11 |
return uc->uc_mcontext.gregs[REG_ESP]; |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
12 |
} |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
13 |
|
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
14 |
-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
15 |
+uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
16 |
return uc->uc_mcontext.gregs[REG_EIP]; |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
17 |
} |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
18 |
|
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
19 |
-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc, |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
20 |
+void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc, |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
21 |
const struct _libc_fpstate* fp) { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
22 |
const greg_t* regs = uc->uc_mcontext.gregs; |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
23 |
|
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
24 |
@@ -88,15 +88,15 @@ void UContextReader::FillCPUContext(RawC |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
25 |
|
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
26 |
#elif defined(__x86_64) |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
27 |
|
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
28 |
-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
29 |
+uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
30 |
return uc->uc_mcontext.gregs[REG_RSP]; |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
31 |
} |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
32 |
|
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
33 |
-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
34 |
+uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
35 |
return uc->uc_mcontext.gregs[REG_RIP]; |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
36 |
} |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
37 |
|
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
38 |
-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc, |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
39 |
+void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc, |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
40 |
const struct _libc_fpstate* fpregs) { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
41 |
const greg_t* regs = uc->uc_mcontext.gregs; |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
42 |
|
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
43 |
@@ -145,15 +145,15 @@ void UContextReader::FillCPUContext(RawC |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
44 |
|
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
45 |
#elif defined(__ARM_EABI__) |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
46 |
|
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
47 |
-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
48 |
+uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
49 |
return uc->uc_mcontext.arm_sp; |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
50 |
} |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
51 |
|
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
52 |
-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
53 |
+uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
54 |
return uc->uc_mcontext.arm_pc; |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
55 |
} |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
56 |
|
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
57 |
-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc) { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
58 |
+void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc) { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
59 |
out->context_flags = MD_CONTEXT_ARM_FULL; |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
60 |
|
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
61 |
out->iregs[0] = uc->uc_mcontext.arm_r0; |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
62 |
@@ -184,15 +184,15 @@ void UContextReader::FillCPUContext(RawC |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
63 |
|
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
64 |
#elif defined(__aarch64__) |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
65 |
|
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
66 |
-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
67 |
+uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
68 |
return uc->uc_mcontext.sp; |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
69 |
} |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
70 |
|
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
71 |
-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
72 |
+uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
73 |
return uc->uc_mcontext.pc; |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
74 |
} |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
75 |
|
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
76 |
-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc, |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
77 |
+void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc, |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
78 |
const struct fpsimd_context* fpregs) { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
79 |
out->context_flags = MD_CONTEXT_ARM64_FULL; |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
80 |
|
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
81 |
@@ -210,15 +210,15 @@ void UContextReader::FillCPUContext(RawC |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
82 |
|
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
83 |
#elif defined(__mips__) |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
84 |
|
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
85 |
-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
86 |
+uintptr_t UContextReader::GetStackPointer(const ucontext_t* uc) { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
87 |
return uc->uc_mcontext.gregs[MD_CONTEXT_MIPS_REG_SP]; |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
88 |
} |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
89 |
|
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
90 |
-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
91 |
+uintptr_t UContextReader::GetInstructionPointer(const ucontext_t* uc) { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
92 |
return uc->uc_mcontext.pc; |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
93 |
} |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
94 |
|
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
95 |
-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc) { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
96 |
+void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc) { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
97 |
#if _MIPS_SIM == _ABI64 |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
98 |
out->context_flags = MD_CONTEXT_MIPS64_FULL; |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
99 |
#elif _MIPS_SIM == _ABIO32 |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
100 |
Index: mozilla/toolkit/crashreporter/google-breakpad/src/client/linux/dump_writer_common/ucontext_reader.h |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
101 |
=================================================================== |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
102 |
--- mozilla.orig/toolkit/crashreporter/google-breakpad/src/client/linux/dump_writer_common/ucontext_reader.h |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
103 |
+++ mozilla/toolkit/crashreporter/google-breakpad/src/client/linux/dump_writer_common/ucontext_reader.h |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
104 |
@@ -41,21 +41,21 @@ namespace google_breakpad { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
105 |
|
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
106 |
// Wraps platform-dependent implementations of accessors to ucontext structs. |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
107 |
struct UContextReader { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
108 |
- static uintptr_t GetStackPointer(const struct ucontext* uc); |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
109 |
+ static uintptr_t GetStackPointer(const ucontext_t* uc); |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
110 |
|
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
111 |
- static uintptr_t GetInstructionPointer(const struct ucontext* uc); |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
112 |
+ static uintptr_t GetInstructionPointer(const ucontext_t* uc); |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
113 |
|
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
114 |
// Juggle a arch-specific ucontext into a minidump format |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
115 |
// out: the minidump structure |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
116 |
// info: the collection of register structures. |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
117 |
#if defined(__i386__) || defined(__x86_64) |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
118 |
- static void FillCPUContext(RawContextCPU *out, const ucontext *uc, |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
119 |
+ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc, |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
120 |
const struct _libc_fpstate* fp); |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
121 |
#elif defined(__aarch64__) |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
122 |
- static void FillCPUContext(RawContextCPU *out, const ucontext *uc, |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
123 |
+ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc, |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
124 |
const struct fpsimd_context* fpregs); |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
125 |
#else |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
126 |
- static void FillCPUContext(RawContextCPU *out, const ucontext *uc); |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
127 |
+ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc); |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
128 |
#endif |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
129 |
}; |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
130 |
|
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
131 |
Index: mozilla/toolkit/crashreporter/google-breakpad/src/client/linux/handler/exception_handler.cc |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
132 |
=================================================================== |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
133 |
--- mozilla.orig/toolkit/crashreporter/google-breakpad/src/client/linux/handler/exception_handler.cc |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
134 |
+++ mozilla/toolkit/crashreporter/google-breakpad/src/client/linux/handler/exception_handler.cc |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
135 |
@@ -439,9 +439,9 @@ bool ExceptionHandler::HandleSignal(int |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
136 |
// Fill in all the holes in the struct to make Valgrind happy. |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
137 |
memset(&g_crash_context_, 0, sizeof(g_crash_context_)); |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
138 |
memcpy(&g_crash_context_.siginfo, info, sizeof(siginfo_t)); |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
139 |
- memcpy(&g_crash_context_.context, uc, sizeof(struct ucontext)); |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
140 |
+ memcpy(&g_crash_context_.context, uc, sizeof(ucontext_t)); |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
141 |
#if defined(__aarch64__) |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
142 |
- struct ucontext* uc_ptr = (struct ucontext*)uc; |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
143 |
+ ucontext_t* uc_ptr = (ucontext_t*)uc; |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
144 |
struct fpsimd_context* fp_ptr = |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
145 |
(struct fpsimd_context*)&uc_ptr->uc_mcontext.__reserved; |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
146 |
if (fp_ptr->head.magic == FPSIMD_MAGIC) { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
147 |
@@ -452,7 +452,7 @@ bool ExceptionHandler::HandleSignal(int |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
148 |
// FP state is not part of user ABI on ARM Linux. |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
149 |
// In case of MIPS Linux FP state is already part of struct ucontext |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
150 |
// and 'float_state' is not a member of CrashContext. |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
151 |
- struct ucontext* uc_ptr = (struct ucontext*)uc; |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
152 |
+ ucontext_t* uc_ptr = (ucontext_t*)uc; |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
153 |
if (uc_ptr->uc_mcontext.fpregs) { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
154 |
memcpy(&g_crash_context_.float_state, uc_ptr->uc_mcontext.fpregs, |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
155 |
sizeof(g_crash_context_.float_state)); |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
156 |
@@ -476,7 +476,7 @@ bool ExceptionHandler::SimulateSignalDel |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
157 |
// ExceptionHandler::HandleSignal(). |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
158 |
siginfo.si_code = SI_USER; |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
159 |
siginfo.si_pid = getpid(); |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
160 |
- struct ucontext context; |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
161 |
+ ucontext_t context; |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
162 |
getcontext(&context); |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
163 |
return HandleSignal(sig, &siginfo, &context); |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
164 |
} |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
165 |
Index: mozilla/toolkit/crashreporter/google-breakpad/src/client/linux/handler/exception_handler.h |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
166 |
=================================================================== |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
167 |
--- mozilla.orig/toolkit/crashreporter/google-breakpad/src/client/linux/handler/exception_handler.h |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
168 |
+++ mozilla/toolkit/crashreporter/google-breakpad/src/client/linux/handler/exception_handler.h |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
169 |
@@ -191,7 +191,7 @@ class ExceptionHandler { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
170 |
struct CrashContext { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
171 |
siginfo_t siginfo; |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
172 |
pid_t tid; // the crashing thread. |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
173 |
- struct ucontext context; |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
174 |
+ ucontext_t context; |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
175 |
#if !defined(__ARM_EABI__) && !defined(__mips__) |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
176 |
// #ifdef this out because FP state is not part of user ABI for Linux ARM. |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
177 |
// In case of MIPS Linux FP state is already part of struct |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
178 |
Index: mozilla/toolkit/crashreporter/google-breakpad/src/client/linux/microdump_writer/microdump_writer.cc |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
179 |
=================================================================== |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
180 |
--- mozilla.orig/toolkit/crashreporter/google-breakpad/src/client/linux/microdump_writer/microdump_writer.cc |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
181 |
+++ mozilla/toolkit/crashreporter/google-breakpad/src/client/linux/microdump_writer/microdump_writer.cc |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
182 |
@@ -571,7 +571,7 @@ class MicrodumpWriter { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
183 |
|
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
184 |
void* Alloc(unsigned bytes) { return dumper_->allocator()->Alloc(bytes); } |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
185 |
|
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
186 |
- const struct ucontext* const ucontext_; |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
187 |
+ const ucontext_t* const ucontext_; |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
188 |
#if !defined(__ARM_EABI__) && !defined(__mips__) |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
189 |
const google_breakpad::fpstate_t* const float_state_; |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
190 |
#endif |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
191 |
Index: mozilla/toolkit/crashreporter/google-breakpad/src/client/linux/minidump_writer/minidump_writer.cc |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
192 |
=================================================================== |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
193 |
--- mozilla.orig/toolkit/crashreporter/google-breakpad/src/client/linux/minidump_writer/minidump_writer.cc |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
194 |
+++ mozilla/toolkit/crashreporter/google-breakpad/src/client/linux/minidump_writer/minidump_writer.cc |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
195 |
@@ -1247,7 +1247,7 @@ class MinidumpWriter { |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
196 |
const int fd_; // File descriptor where the minidum should be written. |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
197 |
const char* path_; // Path to the file where the minidum should be written. |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
198 |
|
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
199 |
- const struct ucontext* const ucontext_; // also from the signal handler |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
200 |
+ const ucontext_t* const ucontext_; // also from the signal handler |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
201 |
#if !defined(__ARM_EABI__) && !defined(__mips__) |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
202 |
const google_breakpad::fpstate_t* const float_state_; // ditto |
a72735108dbe
use ucontext_t instead of struct ucontext
Andreas Schwab <schwab@suse.de>
parents:
diff
changeset
|
203 |
#endif |