Commit Graph

3 Commits

Author SHA1 Message Date
Jonathan G Rennison
cbc35e8aae 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.
2016-02-25 19:21:06 +00:00
Jonathan G Rennison
0062881a46 Avoid using malloc in scope guard logger.
Use a temporary object with its own buffer, which lives on the stack.

Reformat SCOPE_INFO_FMT to not be all on one line.
Other minor reformatting.
2016-02-25 00:20:31 +00:00
Jonathan G Rennison
5cf2b04f6a Initial implementation of scope guard logging for including in crash logs.
This adds a mechanism to create scope guards with an associated std::function
which is called to output diagnostic info in the event of a crash.
Add a macro to make it easy to efficiently capture variables on the stack
and output a formatted message.
Requires C++11, #ifdefed out for legacy compilers.
2016-02-17 22:41:07 +00:00