WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
StackTrace.hpp
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#pragma once
6
7#include <string>
8
9namespace wpi::util {
10
11/**
12 * Get a stack trace, ignoring the first "offset" symbols.
13 *
14 * @param offset The number of symbols at the top of the stack to ignore
15 */
16std::string GetStackTrace(int offset);
17
18/**
19 * The default implementation used for GetStackTrace().
20 *
21 * @param offset The number of symbols at the top of the stack to ignore
22 */
23std::string GetStackTraceDefault(int offset);
24
25/**
26 * Set the implementation used by GetStackTrace().
27 *
28 * @param func Function called by GetStackTrace().
29 */
30void SetGetStackTraceImpl(std::string (*func)(int offset));
31
32} // namespace wpi::util
Definition raw_os_ostream.hpp:19
std::string GetStackTrace(int offset)
Get a stack trace, ignoring the first "offset" symbols.
void SetGetStackTraceImpl(std::string(*func)(int offset))
Set the implementation used by GetStackTrace().
std::string GetStackTraceDefault(int offset)
The default implementation used for GetStackTrace().