Revision f230a1cf deps/v8/src/platform-linux.cc
deps/v8/src/platform-linux.cc | ||
---|---|---|
38 | 38 |
#include <sys/types.h> |
39 | 39 |
#include <stdlib.h> |
40 | 40 |
|
41 |
#if defined(__GLIBC__) && !defined(__UCLIBC__) |
|
42 |
#include <execinfo.h> |
|
43 |
#include <cxxabi.h> |
|
44 |
#endif |
|
45 |
|
|
46 | 41 |
// Ubuntu Dapper requires memory pages to be marked as |
47 | 42 |
// executable. Otherwise, OS raises an exception when executing code |
48 | 43 |
// in that page. |
... | ... | |
66 | 61 |
|
67 | 62 |
#include "v8.h" |
68 | 63 |
|
69 |
#include "platform-posix.h" |
|
70 | 64 |
#include "platform.h" |
71 | 65 |
#include "v8threads.h" |
72 | 66 |
#include "vm-state-inl.h" |
... | ... | |
154 | 148 |
} |
155 | 149 |
|
156 | 150 |
|
157 |
void OS::DumpBacktrace() { |
|
158 |
// backtrace is a glibc extension. |
|
159 |
#if defined(__GLIBC__) && !defined(__UCLIBC__) |
|
160 |
POSIXBacktraceHelper<backtrace, backtrace_symbols>::DumpBacktrace(); |
|
161 |
#endif |
|
162 |
} |
|
163 |
|
|
164 |
|
|
165 | 151 |
class PosixMemoryMappedFile : public OS::MemoryMappedFile { |
166 | 152 |
public: |
167 | 153 |
PosixMemoryMappedFile(FILE* file, void* memory, int size) |
... | ... | |
313 | 299 |
} |
314 | 300 |
|
315 | 301 |
|
316 |
int OS::StackWalk(Vector<OS::StackFrame> frames) { |
|
317 |
// backtrace is a glibc extension. |
|
318 |
#if defined(__GLIBC__) && !defined(__UCLIBC__) |
|
319 |
return POSIXBacktraceHelper<backtrace, backtrace_symbols>::StackWalk(frames); |
|
320 |
#else |
|
321 |
return 0; |
|
322 |
#endif |
|
323 |
} |
|
324 |
|
|
325 |
|
|
326 | 302 |
// Constants used for mmap. |
327 | 303 |
static const int kMmapFd = -1; |
328 | 304 |
static const int kMmapFdOffset = 0; |
Also available in: Unified diff