Created
January 29, 2023 07:07
-
-
Save helywin/800e8f4bad92838a45713a2f20dd9138 to your computer and use it in GitHub Desktop.
gRPC absel patch for HoloLens
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From f00bd6a99589b4ddf748d5bb0cd07b8b66b6a48d Mon Sep 17 00:00:00 2001 | |
From: helywin <jiang770882022@hotmail.com> | |
Date: Sun, 29 Jan 2023 15:05:59 +0800 | |
Subject: [PATCH] modify | |
--- | |
absl/debugging/symbolize.cc | 6 ++++++ | |
absl/debugging/symbolize_uwp.inc | 12 ++++++++++++ | |
2 files changed, 18 insertions(+) | |
create mode 100644 absl/debugging/symbolize_uwp.inc | |
diff --git a/absl/debugging/symbolize.cc b/absl/debugging/symbolize.cc | |
index 638d3954..24ac327d 100644 | |
--- a/absl/debugging/symbolize.cc | |
+++ b/absl/debugging/symbolize.cc | |
@@ -19,9 +19,13 @@ | |
#if !(WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)) || \ | |
WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) | |
// UWP doesn't have access to win32 APIs. | |
+#if _M_ARM64 | |
+#define ABSL_INTERNAL_HAVE_SYMBOLIZE_UWP | |
+#else | |
#define ABSL_INTERNAL_HAVE_SYMBOLIZE_WIN32 | |
#endif | |
#endif | |
+#endif | |
// Emscripten symbolization relies on JS. Do not use them in standalone mode. | |
#if defined(__EMSCRIPTEN__) && !defined(STANDALONE_WASM) | |
@@ -30,6 +34,8 @@ | |
#if defined(ABSL_INTERNAL_HAVE_ELF_SYMBOLIZE) | |
#include "absl/debugging/symbolize_elf.inc" | |
+#elif defined(ABSL_INTERNAL_HAVE_SYMBOLIZE_UWP) | |
+#include "absl/debugging/symbolize_uwp.inc" | |
#elif defined(ABSL_INTERNAL_HAVE_SYMBOLIZE_WIN32) | |
// The Windows Symbolizer only works if PDB files containing the debug info | |
// are available to the program at runtime. | |
diff --git a/absl/debugging/symbolize_uwp.inc b/absl/debugging/symbolize_uwp.inc | |
new file mode 100644 | |
index 00000000..cfb71bc6 | |
--- /dev/null | |
+++ b/absl/debugging/symbolize_uwp.inc | |
@@ -0,0 +1,12 @@ | |
+namespace absl { | |
+ABSL_NAMESPACE_BEGIN | |
+ | |
+ | |
+void InitializeSymbolizer(const char*) {} | |
+ | |
+bool Symbolize(const void* pc, char* out, int out_size) { | |
+ return false; | |
+} | |
+ | |
+ABSL_NAMESPACE_END | |
+} // namespace absl | |
-- | |
2.29.2.windows.2 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment