[wpiutil] StackTrace: Add ability to override default implementation (#3951)

This commit is contained in:
Peter Johnson
2022-01-21 17:22:41 -08:00
committed by GitHub
parent 78d0bcf49d
commit a467392cbd
4 changed files with 34 additions and 2 deletions

View File

@@ -16,6 +16,20 @@ namespace wpi {
*/
std::string GetStackTrace(int offset);
/**
* The default implementation used for GetStackTrace().
*
* @param offset The number of symbols at the top of the stack to ignore
*/
std::string GetStackTraceDefault(int offset);
/**
* Set the implementation used by GetStackTrace().
*
* @param func Function called by GetStackTrace().
*/
void SetGetStackTraceImpl(std::string (*func)(int offset));
} // namespace wpi
#endif // WPIUTIL_WPI_STACKTRACE_H_