Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(32)

Unified Diff: src/client/mac/handler/ucontext_compat.h

Issue 664002: Generate minidumps for 64-bit ARM apps on iOS. (Closed) Base URL: http://google-breakpad.googlecode.com/svn/trunk
Patch Set: Response to review Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/client/mac/handler/minidump_generator.h ('k') | src/google_breakpad/common/minidump_cpu_arm64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/client/mac/handler/ucontext_compat.h
diff --git a/src/common/android/include/ucontext.h b/src/client/mac/handler/ucontext_compat.h
similarity index 71%
copy from src/common/android/include/ucontext.h
copy to src/client/mac/handler/ucontext_compat.h
index 29db8adee69a9eea9ed73e009c5df914e7756ffb..093f9a245a774a2c5e40580a4879e89e7317720b 100644
--- a/src/common/android/include/ucontext.h
+++ b/src/client/mac/handler/ucontext_compat.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2012, Google Inc.
+// Copyright 2013 Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -27,30 +27,21 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#ifndef GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_UCONTEXT_H
-#define GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_UCONTEXT_H
-
-#include <sys/cdefs.h>
-
-#ifdef __BIONIC_UCONTEXT_H
-#include <ucontext.h>
-#else
+#ifndef CLIENT_MAC_HANDLER_UCONTEXT_COMPAT_H_
+#define CLIENT_MAC_HANDLER_UCONTEXT_COMPAT_H_
#include <sys/ucontext.h>
-#ifdef __cplusplus
-extern "C" {
-#endif // __cplusplus
-
-// Provided by src/android/common/breakpad_getcontext.S
-int breakpad_getcontext(ucontext_t* ucp);
-
-#define getcontext(x) breakpad_getcontext(x)
-
-#ifdef __cplusplus
-} // extern "C"
-#endif // __cplusplus
-
-#endif // __BIONIC_UCONTEXT_H
+// The purpose of this file is to work around the fact that ucontext_t's
+// uc_mcontext member is an mcontext_t rather than an mcontext64_t on ARM64.
+#if defined(__arm64__)
+// <sys/ucontext.h> doesn't include the below file.
+#include <sys/_types/_ucontext64.h>
+typedef ucontext64_t breakpad_ucontext_t;
+#define breakpad_uc_mcontext uc_mcontext64
+#else
+typedef ucontext_t breakpad_ucontext_t;
+#define breakpad_uc_mcontext uc_mcontext
+#endif // defined(__arm64__)
-#endif // GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_UCONTEXT_H
+#endif // CLIENT_MAC_HANDLER_UCONTEXT_COMPAT_H_
« no previous file with comments | « src/client/mac/handler/minidump_generator.h ('k') | src/google_breakpad/common/minidump_cpu_arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 1004:630ec63f810e-tainted