Save/load crash information.

This commit is contained in:
Bartosz Taudul 2018-08-20 02:27:24 +02:00
parent 619fba41ab
commit 99b7a39c52
2 changed files with 8 additions and 1 deletions

View File

@ -7,7 +7,7 @@ namespace Version
{
enum { Major = 0 };
enum { Minor = 3 };
enum { Patch = 203 };
enum { Patch = 204 };
}
}

View File

@ -287,6 +287,11 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
m_hostInfo = std::string( tmp, tmp+sz );
}
if( fileVer >= FileVersion( 0, 3, 204 ) )
{
f.Read( &m_data.m_crashEvent, sizeof( m_data.m_crashEvent ) );
}
if( fileVer >= FileVersion( 0, 3, 202 ) )
{
f.Read( sz );
@ -2977,6 +2982,8 @@ void Worker::Write( FileWrite& f )
f.Write( &sz, sizeof( sz ) );
f.Write( m_hostInfo.c_str(), sz );
f.Write( &m_data.m_crashEvent, sizeof( m_data.m_crashEvent ) );
sz = m_data.frames.Data().size();
f.Write( &sz, sizeof( sz ) );
for( auto& fd : m_data.frames.Data() )