Commit 35aee89a authored by yangguo's avatar yangguo Committed by Commit bot

Fix android build.

TBR=jochen@chromium.org

Review-Url: https://codereview.chromium.org/2426913002
Cr-Commit-Position: refs/heads/master@{#40395}
parent c2c6a9a6
...@@ -8,9 +8,10 @@ ...@@ -8,9 +8,10 @@
#include "src/ic/stub-cache.h" #include "src/ic/stub-cache.h"
#include "src/list-inl.h" #include "src/list-inl.h"
#if defined(DEBUG) && defined(V8_OS_LINUX) #if defined(DEBUG) && defined(V8_OS_LINUX) && !defined(V8_OS_ANDROID)
#define SYMBOLIZE_FUNCTION
#include <execinfo.h> #include <execinfo.h>
#endif // DEBUG && V8_OS_LINUX #endif // DEBUG && V8_OS_LINUX && !V8_OS_ANDROID
namespace v8 { namespace v8 {
namespace internal { namespace internal {
...@@ -40,9 +41,9 @@ uint32_t ExternalReferenceEncoder::Encode(Address address) const { ...@@ -40,9 +41,9 @@ uint32_t ExternalReferenceEncoder::Encode(Address address) const {
if (entry == nullptr) { if (entry == nullptr) {
void* function_addr = address; void* function_addr = address;
v8::base::OS::PrintError("Unknown external reference %p.\n", function_addr); v8::base::OS::PrintError("Unknown external reference %p.\n", function_addr);
#if defined(DEBUG) && defined(V8_OS_LINUX) #ifdef SYMBOLIZE_FUNCTION
v8::base::OS::PrintError("%s\n", backtrace_symbols(&function_addr, 1)[0]); v8::base::OS::PrintError("%s\n", backtrace_symbols(&function_addr, 1)[0]);
#endif // DEBUG && V8_OS_LINUX #endif // SYMBOLIZE_FUNCTION
v8::base::OS::Abort(); v8::base::OS::Abort();
} }
return static_cast<uint32_t>(reinterpret_cast<intptr_t>(entry->value)); return static_cast<uint32_t>(reinterpret_cast<intptr_t>(entry->value));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment