1
Description: Reflect changes in libc6-dev 2.26:
2
- do no include <xlocale.h> which was removed
3
- ucontext -> ucontext_t (from <sys/ucontext.h>)
4
Author: Olivier Tilloy <olivier.tilloy@canonical.com>
6
--- a/buildtools/third_party/libc++/trunk/include/__locale
7
+++ b/buildtools/third_party/libc++/trunk/include/__locale
9
# include <support/solaris/xlocale.h>
10
#elif defined(_NEWLIB_VERSION)
11
# include <support/newlib/xlocale.h>
12
-#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) \
13
+#elif (defined(__APPLE__) || defined(__FreeBSD__) \
14
|| defined(__EMSCRIPTEN__) || defined(__IBMCPP__))
16
#elif defined(__Fuchsia__)
17
--- a/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
18
+++ b/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
19
@@ -40,15 +40,15 @@ namespace google_breakpad {
23
-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
24
+uintptr_t UContextReader::GetStackPointer(const struct ucontext_t* uc) {
25
return uc->uc_mcontext.gregs[REG_ESP];
28
-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
29
+uintptr_t UContextReader::GetInstructionPointer(const struct ucontext_t* uc) {
30
return uc->uc_mcontext.gregs[REG_EIP];
33
-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc,
34
+void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
35
const struct _libc_fpstate* fp) {
36
const greg_t* regs = uc->uc_mcontext.gregs;
38
@@ -88,15 +88,15 @@ void UContextReader::FillCPUContext(RawC
40
#elif defined(__x86_64)
42
-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
43
+uintptr_t UContextReader::GetStackPointer(const struct ucontext_t* uc) {
44
return uc->uc_mcontext.gregs[REG_RSP];
47
-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
48
+uintptr_t UContextReader::GetInstructionPointer(const struct ucontext_t* uc) {
49
return uc->uc_mcontext.gregs[REG_RIP];
52
-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc,
53
+void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
54
const struct _libc_fpstate* fpregs) {
55
const greg_t* regs = uc->uc_mcontext.gregs;
57
@@ -145,15 +145,15 @@ void UContextReader::FillCPUContext(RawC
59
#elif defined(__ARM_EABI__)
61
-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
62
+uintptr_t UContextReader::GetStackPointer(const struct ucontext_t* uc) {
63
return uc->uc_mcontext.arm_sp;
66
-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
67
+uintptr_t UContextReader::GetInstructionPointer(const struct ucontext_t* uc) {
68
return uc->uc_mcontext.arm_pc;
71
-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc) {
72
+void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc) {
73
out->context_flags = MD_CONTEXT_ARM_FULL;
75
out->iregs[0] = uc->uc_mcontext.arm_r0;
76
@@ -184,15 +184,15 @@ void UContextReader::FillCPUContext(RawC
78
#elif defined(__aarch64__)
80
-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
81
+uintptr_t UContextReader::GetStackPointer(const struct ucontext_t* uc) {
82
return uc->uc_mcontext.sp;
85
-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
86
+uintptr_t UContextReader::GetInstructionPointer(const struct ucontext_t* uc) {
87
return uc->uc_mcontext.pc;
90
-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc,
91
+void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
92
const struct fpsimd_context* fpregs) {
93
out->context_flags = MD_CONTEXT_ARM64_FULL;
95
@@ -210,15 +210,15 @@ void UContextReader::FillCPUContext(RawC
97
#elif defined(__mips__)
99
-uintptr_t UContextReader::GetStackPointer(const struct ucontext* uc) {
100
+uintptr_t UContextReader::GetStackPointer(const struct ucontext_t* uc) {
101
return uc->uc_mcontext.gregs[MD_CONTEXT_MIPS_REG_SP];
104
-uintptr_t UContextReader::GetInstructionPointer(const struct ucontext* uc) {
105
+uintptr_t UContextReader::GetInstructionPointer(const struct ucontext_t* uc) {
106
return uc->uc_mcontext.pc;
109
-void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc) {
110
+void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext_t *uc) {
111
#if _MIPS_SIM == _ABI64
112
out->context_flags = MD_CONTEXT_MIPS64_FULL;
113
#elif _MIPS_SIM == _ABIO32
114
--- a/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
115
+++ b/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
116
@@ -41,21 +41,21 @@ namespace google_breakpad {
118
// Wraps platform-dependent implementations of accessors to ucontext structs.
119
struct UContextReader {
120
- static uintptr_t GetStackPointer(const struct ucontext* uc);
121
+ static uintptr_t GetStackPointer(const struct ucontext_t* uc);
123
- static uintptr_t GetInstructionPointer(const struct ucontext* uc);
124
+ static uintptr_t GetInstructionPointer(const struct ucontext_t* uc);
126
// Juggle a arch-specific ucontext into a minidump format
127
// out: the minidump structure
128
// info: the collection of register structures.
129
#if defined(__i386__) || defined(__x86_64)
130
- static void FillCPUContext(RawContextCPU *out, const ucontext *uc,
131
+ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
132
const struct _libc_fpstate* fp);
133
#elif defined(__aarch64__)
134
- static void FillCPUContext(RawContextCPU *out, const ucontext *uc,
135
+ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc,
136
const struct fpsimd_context* fpregs);
138
- static void FillCPUContext(RawContextCPU *out, const ucontext *uc);
139
+ static void FillCPUContext(RawContextCPU *out, const ucontext_t *uc);
143
--- a/breakpad/src/client/linux/handler/exception_handler.cc
144
+++ b/breakpad/src/client/linux/handler/exception_handler.cc
145
@@ -457,9 +457,9 @@ bool ExceptionHandler::HandleSignal(int
146
// Fill in all the holes in the struct to make Valgrind happy.
147
memset(&g_crash_context_, 0, sizeof(g_crash_context_));
148
memcpy(&g_crash_context_.siginfo, info, sizeof(siginfo_t));
149
- memcpy(&g_crash_context_.context, uc, sizeof(struct ucontext));
150
+ memcpy(&g_crash_context_.context, uc, sizeof(struct ucontext_t));
151
#if defined(__aarch64__)
152
- struct ucontext* uc_ptr = (struct ucontext*)uc;
153
+ struct ucontext_t* uc_ptr = (struct ucontext_t*)uc;
154
struct fpsimd_context* fp_ptr =
155
(struct fpsimd_context*)&uc_ptr->uc_mcontext.__reserved;
156
if (fp_ptr->head.magic == FPSIMD_MAGIC) {
157
@@ -468,9 +468,9 @@ bool ExceptionHandler::HandleSignal(int
159
#elif !defined(__ARM_EABI__) && !defined(__mips__)
160
// FP state is not part of user ABI on ARM Linux.
161
- // In case of MIPS Linux FP state is already part of struct ucontext
162
+ // In case of MIPS Linux FP state is already part of struct ucontext_t
163
// and 'float_state' is not a member of CrashContext.
164
- struct ucontext* uc_ptr = (struct ucontext*)uc;
165
+ struct ucontext_t* uc_ptr = (struct ucontext_t*)uc;
166
if (uc_ptr->uc_mcontext.fpregs) {
167
memcpy(&g_crash_context_.float_state, uc_ptr->uc_mcontext.fpregs,
168
sizeof(g_crash_context_.float_state));
169
@@ -494,7 +494,7 @@ bool ExceptionHandler::SimulateSignalDel
170
// ExceptionHandler::HandleSignal().
171
siginfo.si_code = SI_USER;
172
siginfo.si_pid = getpid();
173
- struct ucontext context;
174
+ struct ucontext_t context;
175
getcontext(&context);
176
return HandleSignal(sig, &siginfo, &context);
178
--- a/breakpad/src/client/linux/handler/exception_handler.h
179
+++ b/breakpad/src/client/linux/handler/exception_handler.h
180
@@ -191,11 +191,11 @@ class ExceptionHandler {
181
struct CrashContext {
183
pid_t tid; // the crashing thread.
184
- struct ucontext context;
185
+ struct ucontext_t context;
186
#if !defined(__ARM_EABI__) && !defined(__mips__)
187
// #ifdef this out because FP state is not part of user ABI for Linux ARM.
188
// In case of MIPS Linux FP state is already part of struct
189
- // ucontext so 'float_state' is not required.
190
+ // ucontext_t so 'float_state' is not required.
191
fpstate_t float_state;
194
--- a/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
195
+++ b/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
196
@@ -604,7 +604,7 @@ class MicrodumpWriter {
198
void* Alloc(unsigned bytes) { return dumper_->allocator()->Alloc(bytes); }
200
- const struct ucontext* const ucontext_;
201
+ const struct ucontext_t* const ucontext_;
202
#if !defined(__ARM_EABI__) && !defined(__mips__)
203
const google_breakpad::fpstate_t* const float_state_;
205
--- a/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
206
+++ b/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
207
@@ -1323,7 +1323,7 @@ class MinidumpWriter {
208
const int fd_; // File descriptor where the minidum should be written.
209
const char* path_; // Path to the file where the minidum should be written.
211
- const struct ucontext* const ucontext_; // also from the signal handler
212
+ const struct ucontext_t* const ucontext_; // also from the signal handler
213
#if !defined(__ARM_EABI__) && !defined(__mips__)
214
const google_breakpad::fpstate_t* const float_state_; // ditto