libcamera: include/libcamera/base/backtrace.h Source File

libcamera v0.7.1 Supporting cameras in Linux since 2019

Loading...
Searching...
No Matches
backtrace.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: LGPL-2.1-or-later */
2/*
3 * Copyright (C) 2021, Ideas on Board Oy
4 *
5 * Call stack backtraces
6 */
7
8#pragma once
9
10#include <string>
11#include <vector>
12
13#include <libcamera/base/private.h>
14
15#include <libcamera/base/class.h>
16
17 namespace libcamera {
18
19 class Backtrace
20{
21public:
22 Backtrace();
23
24 std::string toString(unsigned int skipLevels = 0) const;
25
26private:
27 LIBCAMERA_DISABLE_COPY(Backtrace)
28
29 bool backtraceTrace();
30 bool unwindTrace();
31
32 std::vector<void *> backtrace_;
33 std::vector<std::string> backtraceText_;
34};
35
36} /* namespace libcamera */
class.h
Utilities to help constructing class interfaces.
LIBCAMERA_DISABLE_COPY
#define LIBCAMERA_DISABLE_COPY(klass)
Disable copy construction and assignment of the klass.
Definition class.h:27
libcamera::Backtrace::Backtrace
Backtrace()
Construct a backtrace.
Definition backtrace.cpp:157
libcamera::Backtrace::toString
std::string toString(unsigned int skipLevels=0) const
Convert a backtrace to a string representation.
Definition backtrace.cpp:281
libcamera
Top-level libcamera namespace.
Definition backtrace.h:17