Helios Engine
A modular ECS based data-oriented C++23 game engine framework
Loading...
Searching...
No Matches
helios::StacktraceConfig Struct Reference

Configuration for stacktrace capture and formatting. More...

#include <stacktrace.hpp>

Static Public Member Functions

static constexpr StacktraceConfig FromSourceLocation (const std::source_location &loc) noexcept
static constexpr StacktraceConfig FromSource (std::string_view file, uint_least32_t line) noexcept

Public Attributes

size_t max_frames = 10
 Maximum number of frames to emit after filtering.
size_t start_frame = 1
size_t skip_frames = 0
 Additional number of frames to skip from the computed start.
size_t max_depth = 0
 Maximum number of frames to scan from start frame.
std::string_view source_file
 Source file used to infer a relevant starting frame.
uint_least32_t source_line = 0
 Source line used to infer a relevant starting frame.
std::string_view source_function
 Source function used to infer a relevant starting frame.
std::string_view stop_before = "__libc_start_main"
 Marker to stop capture before frames that contain this token.
std::string_view include_frames_containing
 Keep only frames that contain this token.
std::string_view exclude_frames_containing
 Drop frames that contain this token.

Detailed Description

Configuration for stacktrace capture and formatting.

Definition at line 14 of file stacktrace.hpp.

Member Function Documentation

◆ FromSource()

constexpr StacktraceConfig helios::StacktraceConfig::FromSource ( std::string_view file,
uint_least32_t line )
inlinestaticnodiscardconstexprnoexcept

Definition at line 67 of file stacktrace.hpp.

◆ FromSourceLocation()

constexpr StacktraceConfig helios::StacktraceConfig::FromSourceLocation ( const std::source_location & loc)
inlinestaticnodiscardconstexprnoexcept

Definition at line 58 of file stacktrace.hpp.

Member Data Documentation

◆ exclude_frames_containing

std::string_view helios::StacktraceConfig::exclude_frames_containing

Drop frames that contain this token.

Empty token drops no frames.

Definition at line 56 of file stacktrace.hpp.

◆ include_frames_containing

std::string_view helios::StacktraceConfig::include_frames_containing

Keep only frames that contain this token.

Empty token keeps all frames.

Definition at line 50 of file stacktrace.hpp.

◆ max_depth

size_t helios::StacktraceConfig::max_depth = 0

Maximum number of frames to scan from start frame.

0 means no explicit depth limit.

Definition at line 29 of file stacktrace.hpp.

◆ max_frames

size_t helios::StacktraceConfig::max_frames = 10

Maximum number of frames to emit after filtering.

Definition at line 16 of file stacktrace.hpp.

◆ skip_frames

size_t helios::StacktraceConfig::skip_frames = 0

Additional number of frames to skip from the computed start.

Definition at line 23 of file stacktrace.hpp.

◆ source_file

std::string_view helios::StacktraceConfig::source_file

Source file used to infer a relevant starting frame.

Definition at line 32 of file stacktrace.hpp.

◆ source_function

std::string_view helios::StacktraceConfig::source_function

Source function used to infer a relevant starting frame.

Definition at line 38 of file stacktrace.hpp.

◆ source_line

uint_least32_t helios::StacktraceConfig::source_line = 0

Source line used to infer a relevant starting frame.

Definition at line 35 of file stacktrace.hpp.

◆ start_frame

size_t helios::StacktraceConfig::start_frame = 1

Default frame index to start from when source matching is disabled or fails.

Definition at line 20 of file stacktrace.hpp.

◆ stop_before

std::string_view helios::StacktraceConfig::stop_before = "__libc_start_main"

Marker to stop capture before frames that contain this token.

Typical values are "__libc_start_main", "_start" or "main".

Definition at line 44 of file stacktrace.hpp.