Wait for failure callstack to be received.

This commit is contained in:
Bartosz Taudul 2020-09-29 18:39:48 +02:00
parent d8e653ecb4
commit 3135191e90
2 changed files with 13 additions and 0 deletions

View File

@ -2869,6 +2869,17 @@ bool Worker::IsThreadStringRetrieved( uint64_t id )
return strcmp( name, "???" ) != 0;
}
bool Worker::IsCallstackRetrieved( uint32_t callstack )
{
auto& cs = GetCallstack( callstack );
for( auto& v : cs )
{
auto frameData = GetCallstackFrame( v );
if( !frameData ) return false;
}
return true;
}
bool Worker::IsSourceLocationRetrieved( int16_t srcloc )
{
auto& sl = GetSourceLocation( srcloc );
@ -2881,6 +2892,7 @@ bool Worker::HasAllFailureData()
{
if( m_failureData.thread != 0 && !IsThreadStringRetrieved( m_failureData.thread ) ) return false;
if( m_failureData.srcloc != 0 && !IsSourceLocationRetrieved( m_failureData.srcloc ) ) return false;
if( m_failureData.callstack != 0 && !IsCallstackRetrieved( m_failureData.callstack ) ) return false;
return true;
}

View File

@ -755,6 +755,7 @@ private:
bool IsThreadStringRetrieved( uint64_t id );
bool IsSourceLocationRetrieved( int16_t srcloc );
bool IsCallstackRetrieved( uint32_t callstack );
bool HasAllFailureData();
void HandleFailure( const char* ptr, const char* end );
void DispatchFailure( const QueueItem& ev, const char*& ptr );