Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/libraries/source/nvtt/patches/arm-build.patch
Property | Old Value | New Value |
---|---|---|
svn:eol-style | null | native \ No newline at end of property |
--- | |||||
src/nvcore/Debug.cpp | 8 ++++++++ | |||||
src/nvcore/Debug.h | 2 +- | |||||
2 files changed, 9 insertions(+), 1 deletion(-) | |||||
diff --git a/src/nvcore/Debug.cpp b/src/nvcore/Debug.cpp | |||||
index 7379971..ce632ca 100644 | |||||
--- a/src/nvcore/Debug.cpp | |||||
+++ b/src/nvcore/Debug.cpp | |||||
@@ -665,6 +665,9 @@ namespace | |||||
# elif NV_CPU_PPC | |||||
ucontext_t * ucp = (ucontext_t *)secret; | |||||
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 | |||||
ucontext_t * ucp = (ucontext_t *)secret; | |||||
return (void *) ucp->uc_mcontext.pc; | |||||
@@ -1021,7 +1024,12 @@ void debug::dumpCallstack(MessageHandler *messageHandler, int callstackLevelsToS | |||||
writeStackTrace(trace, size, callstackLevelsToSkip + 1, lines); // + 1 to skip the call to dumpCallstack | |||||
for (uint i = 0; i < lines.count(); i++) { | |||||
+#if NV_CPU_ARM || NV_CPU_AARCH64 || NV_OS_DARWIN || NV_OS_IOS | |||||
+ va_list empty_va_list = {}; | |||||
+ messageHandler->log(lines[i], empty_va_list); | |||||
+#else | |||||
messageHandler->log(lines[i], NULL); | |||||
+#endif | |||||
delete lines[i]; | |||||
} | |||||
} | |||||
diff --git a/src/nvcore/Debug.h b/src/nvcore/Debug.h | |||||
index eb80b53..8a48328 100644 | |||||
--- a/src/nvcore/Debug.h | |||||
+++ b/src/nvcore/Debug.h | |||||
@@ -166,7 +166,7 @@ NVCORE_API void NV_CDECL nvDebugPrint( const char *msg, ... ) __attribute__((for | |||||
namespace nv | |||||
{ | |||||
inline bool isValidPtr(const void * ptr) { | |||||
- #if NV_CPU_X86_64 || POSH_CPU_PPC64 | |||||
+ #if NV_CPU_X86_64 || POSH_CPU_PPC64 || NV_CPU_AARCH64 | |||||
if (ptr == NULL) return true; | |||||
if (reinterpret_cast<uint64>(ptr) < 0x10000ULL) return false; | |||||
if (reinterpret_cast<uint64>(ptr) >= 0x000007FFFFFEFFFFULL) return false; | |||||
-- |
Wildfire Games · Phabricator