Changeset View
Changeset View
Standalone View
Standalone View
libraries/source/nvtt/src/src/nvcore/Debug.cpp
Show First 20 Lines • Show All 659 Lines • ▼ Show 20 Lines | # if NV_CPU_X86_64 | ||||
ucontext_t * ucp = (ucontext_t *)secret; | ucontext_t * ucp = (ucontext_t *)secret; | ||||
return (void *)ucp->uc_mcontext.gregs[REG_RIP]; | return (void *)ucp->uc_mcontext.gregs[REG_RIP]; | ||||
# elif NV_CPU_X86 | # elif NV_CPU_X86 | ||||
ucontext_t * ucp = (ucontext_t *)secret; | ucontext_t * ucp = (ucontext_t *)secret; | ||||
return (void *)ucp->uc_mcontext.gregs[14/*REG_EIP*/]; | return (void *)ucp->uc_mcontext.gregs[14/*REG_EIP*/]; | ||||
# elif NV_CPU_PPC | # elif NV_CPU_PPC | ||||
ucontext_t * ucp = (ucontext_t *)secret; | ucontext_t * ucp = (ucontext_t *)secret; | ||||
return (void *) ucp->uc_mcontext.regs->nip; | return (void *) ucp->uc_mcontext.regs->nip; | ||||
# elif NV_CPU_ARM | |||||
ucontext_t * ucp = (ucontext_t *)secret; | |||||
return (void *) ucp->uc_mcontext.arm_pc; | |||||
# elif NV_CPU_AARCH64 | # elif NV_CPU_AARCH64 | ||||
ucontext_t * ucp = (ucontext_t *)secret; | ucontext_t * ucp = (ucontext_t *)secret; | ||||
return (void *) ucp->uc_mcontext.pc; | return (void *) ucp->uc_mcontext.pc; | ||||
# else | # else | ||||
# error "Unknown CPU" | # error "Unknown CPU" | ||||
# endif | # endif | ||||
#endif | #endif | ||||
▲ Show 20 Lines • Show All 339 Lines • ▼ Show 20 Lines | #if (NV_OS_WIN32 && NV_CC_MSVC) || (defined(HAVE_SIGNAL_H) && defined(HAVE_EXECINFO_H)) | ||||
if (hasStackTrace()) | if (hasStackTrace()) | ||||
{ | { | ||||
void * trace[64]; | void * trace[64]; | ||||
int size = backtrace(trace, 64); | int size = backtrace(trace, 64); | ||||
Array<const char *> lines; | Array<const char *> lines; | ||||
writeStackTrace(trace, size, callstackLevelsToSkip + 1, lines); // + 1 to skip the call to dumpCallstack | writeStackTrace(trace, size, callstackLevelsToSkip + 1, lines); // + 1 to skip the call to dumpCallstack | ||||
for (uint i = 0; i < lines.count(); i++) { | for (uint i = 0; i < lines.count(); i++) { | ||||
Stan: From irc today
```
[10:07:44] ricotz: Stan, I assume it will build with the proposed patch… | |||||
messageHandler->log(lines[i], NULL); | messageHandler->log(lines[i], va_list()); | ||||
ItmsAuthorUnsubmitted Done Inline ActionsIt looks like va_list empty_va_list = {}; messageHandler->log(lines[i], empty_va_list); builds on GCC. I have yet to test it on my rpi emulator. Itms: It looks like
```
va_list empty_va_list = {};
messageHandler->log(lines[i], empty_va_list)… | |||||
delete lines[i]; | delete lines[i]; | ||||
} | } | ||||
} | } | ||||
#endif | #endif | ||||
} | } | ||||
/// Set the debug message handler. | /// Set the debug message handler. | ||||
▲ Show 20 Lines • Show All 238 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
From irc today