| Index: src/checks.cc
|
| diff --git a/src/checks.cc b/src/checks.cc
|
| index a4514bf965094891cfb371ea46c05a6b1d26f05d..2b1c76cb9b1bc35b7ef19288bf6daee662d03c64 100644
|
| --- a/src/checks.cc
|
| +++ b/src/checks.cc
|
| @@ -30,6 +30,8 @@
|
| #if V8_LIBC_GLIBC || V8_OS_BSD
|
| # include <cxxabi.h>
|
| # include <execinfo.h>
|
| +#elif V8_OS_QNX
|
| +# include <backtrace.h>
|
| #endif // V8_LIBC_GLIBC || V8_OS_BSD
|
| #include <stdio.h>
|
|
|
| @@ -64,6 +66,26 @@ static V8_INLINE void DumpBacktrace() {
|
| }
|
| }
|
| free(symbols);
|
| +#elif V8_OS_QNX
|
| + char out[1024];
|
| + bt_accessor_t acc;
|
| + bt_memmap_t memmap;
|
| + bt_init_accessor(&acc, BT_SELF);
|
| + bt_load_memmap(&acc, &memmap);
|
| + bt_sprn_memmap(&memmap, out, sizeof(out));
|
| + i::OS::PrintError(out);
|
| + bt_addr_t trace[100];
|
| + int size = bt_get_backtrace(&acc, trace, ARRAY_SIZE(trace));
|
| + i::OS::PrintError("\n==== C stack trace ===============================\n\n");
|
| + if (size == 0) {
|
| + i::OS::PrintError("(empty)\n");
|
| + } else {
|
| + bt_sprnf_addrs(&memmap, trace, size, const_cast<char*>("%a\n"),
|
| + out, sizeof(out), NULL);
|
| + i::OS::PrintError(out);
|
| + }
|
| + bt_unload_memmap(&memmap);
|
| + bt_release_accessor(&acc);
|
| #endif // V8_LIBC_GLIBC || V8_OS_BSD
|
| }
|
|
|
|
|