WPILibC++ 2024.3.2
StackTrace.h
Go to the documentation of this file.
1// Copyright (c) FIRST and other WPILib contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the WPILib BSD license file in the root directory of this project.
4
5#ifndef WPIUTIL_WPI_STACKTRACE_H_
6#define WPIUTIL_WPI_STACKTRACE_H_
7
8#include <string>
9
10namespace wpi {
11
12/**
13 * Get a stack trace, ignoring the first "offset" symbols.
14 *
15 * @param offset The number of symbols at the top of the stack to ignore
16 */
17std::string GetStackTrace(int offset);
18
19/**
20 * The default implementation used for GetStackTrace().
21 *
22 * @param offset The number of symbols at the top of the stack to ignore
23 */
24std::string GetStackTraceDefault(int offset);
25
26/**
27 * Set the implementation used by GetStackTrace().
28 *
29 * @param func Function called by GetStackTrace().
30 */
31void SetGetStackTraceImpl(std::string (*func)(int offset));
32
33} // namespace wpi
34
35#endif // WPIUTIL_WPI_STACKTRACE_H_
Definition: ntcore_cpp.h:26
std::string GetStackTraceDefault(int offset)
The default implementation used for GetStackTrace().
void SetGetStackTraceImpl(std::string(*func)(int offset))
Set the implementation used by GetStackTrace().
std::string GetStackTrace(int offset)
Get a stack trace, ignoring the first "offset" symbols.