mirror of
https://github.com/chromium/crashpad.git
synced 2025-01-15 01:57:58 +08:00
linux: Add a second CaptureContext symbol name
glibc 2.26 defines ucontext_t from a struct ucontext_t while Bionic and older versions of glibc use a struct ucontext. Bug: crashpad:30 Change-Id: I473c317dbdbbedfad601c7594cfa7df7f7c01cb9 Reviewed-on: https://chromium-review.googlesource.com/972613 Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
parent
afd3186280
commit
6d4626090d
@ -15,10 +15,17 @@
|
||||
// namespace crashpad {
|
||||
// void CaptureContext(ucontext_t* context);
|
||||
// } // namespace crashpad
|
||||
#define CAPTURECONTEXT_SYMBOL _ZN8crashpad14CaptureContextEP8ucontext
|
||||
|
||||
// The type name for a ucontext_t varies by libc implementation and version.
|
||||
// Bionic and glibc 2.25 typedef ucontext_t from struct ucontext. glibc 2.26+
|
||||
// typedef ucontext_t from struct ucontext_t. Alias the symbol names to maintain
|
||||
// compatibility with both possibilities.
|
||||
#define CAPTURECONTEXT_SYMBOL _ZN8crashpad14CaptureContextEP10ucontext_t
|
||||
#define CAPTURECONTEXT_SYMBOL2 _ZN8crashpad14CaptureContextEP8ucontext
|
||||
|
||||
.text
|
||||
.globl CAPTURECONTEXT_SYMBOL
|
||||
.globl CAPTURECONTEXT_SYMBOL2
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
.balign 16, 0x90
|
||||
#elif defined(__arm__) || defined(__aarch64__)
|
||||
@ -26,6 +33,7 @@
|
||||
#endif
|
||||
|
||||
CAPTURECONTEXT_SYMBOL:
|
||||
CAPTURECONTEXT_SYMBOL2:
|
||||
|
||||
#if defined(__i386__)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user