From d3905bd4bb5773563bf4fb0f95e773aa63b3513b Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 10 Oct 2021 14:14:33 +0200 Subject: [PATCH] Add context to zone text failures. --- server/TracyWorker.cpp | 5 +++-- server/TracyWorker.hpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 68eff753..942ee251 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -4838,10 +4838,11 @@ void Worker::ZoneDoubleEndFailure( uint64_t thread, const ZoneEvent* ev ) m_failureData.srcloc = ev ? ev->SrcLoc() : 0; } -void Worker::ZoneTextFailure( uint64_t thread ) +void Worker::ZoneTextFailure( uint64_t thread, const char* text ) { m_failure = Failure::ZoneText; m_failureData.thread = thread; + m_failureData.message = text; } void Worker::ZoneValueFailure( uint64_t thread, uint64_t value ) @@ -5054,7 +5055,7 @@ void Worker::ProcessZoneText() auto td = RetrieveThread( m_threadCtx ); if( !td || td->stack.empty() || td->nextZoneId != td->zoneIdStack.back() ) { - ZoneTextFailure( m_threadCtx ); + ZoneTextFailure( m_threadCtx, m_pendingSingleString.ptr ); return; } diff --git a/server/TracyWorker.hpp b/server/TracyWorker.hpp index a4a641da..a8aaca52 100644 --- a/server/TracyWorker.hpp +++ b/server/TracyWorker.hpp @@ -715,7 +715,7 @@ private: void ZoneStackFailure( uint64_t thread, const ZoneEvent* ev ); void ZoneDoubleEndFailure( uint64_t thread, const ZoneEvent* ev ); - void ZoneTextFailure( uint64_t thread ); + void ZoneTextFailure( uint64_t thread, const char* text ); void ZoneValueFailure( uint64_t thread, uint64_t value ); void ZoneColorFailure( uint64_t thread ); void ZoneNameFailure( uint64_t thread );