Add some (disabled) code to help debug OOS
This was SVN commit r7569.
This commit is contained in:
parent
1e228d8c17
commit
0fa4bc9b21
@ -209,7 +209,8 @@ void CSimulation2Impl::DumpState()
|
|||||||
|
|
||||||
file << "\n";
|
file << "\n";
|
||||||
|
|
||||||
m_ComponentManager.DumpDebugState(file);
|
// m_ComponentManager.DumpDebugState(file);
|
||||||
|
m_ComponentManager.SerializeState(file);
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////
|
||||||
|
@ -20,13 +20,22 @@
|
|||||||
#include "StdSerializer.h"
|
#include "StdSerializer.h"
|
||||||
|
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
CStdSerializer::CStdSerializer(ScriptInterface& scriptInterface, std::ostream& stream) :
|
CStdSerializer::CStdSerializer(ScriptInterface& scriptInterface, std::ostream& stream) :
|
||||||
CBinarySerializer(scriptInterface), m_Stream(stream)
|
CBinarySerializer(scriptInterface), m_Stream(stream)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void CStdSerializer::Put(const char* UNUSED(name), const u8* data, size_t len)
|
void CStdSerializer::Put(const char* name, const u8* data, size_t len)
|
||||||
{
|
{
|
||||||
|
#if 0 // annotate the stream to help debugging if you're reading the output in a hex editor
|
||||||
|
m_Stream.put('[');
|
||||||
|
m_Stream.write(name, strlen(name));
|
||||||
|
m_Stream.put(']');
|
||||||
|
#else
|
||||||
|
UNUSED2(name);
|
||||||
|
#endif
|
||||||
|
|
||||||
m_Stream.write((const char*)data, len);
|
m_Stream.write((const char*)data, len);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user