Try to make scope info logging more robust.

Add checks for validity of Vehicle ptrs in scope_dumper::VehicleInfo.
In Unix mode, try to handle SIGSEGVs when dumping scope info.
This commit is contained in:
Jonathan G Rennison
2016-02-25 19:21:06 +00:00
parent 0062881a46
commit cbc35e8aae
4 changed files with 57 additions and 0 deletions

View File

@@ -80,6 +80,16 @@ protected:
*/
virtual char *LogModules(char *buffer, const char *last) const;
#ifdef USE_SCOPE_INFO
/**
* Writes the scope info log to the buffer.
* This may only be called when IsMainThread() returns true
* @param buffer The begin where to write at.
* @param last The last position in the buffer to write to.
* @return the position of the \c '\0' character after the buffer.
*/
virtual char *LogScopeInfo(char *buffer, const char *last) const;
#endif
char *LogOpenTTDVersion(char *buffer, const char *last) const;
char *LogConfiguration(char *buffer, const char *last) const;