libcamera  v0.3.2+116-83c5ad0f
Supporting cameras in Linux since 2019
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 {
21 public:
22  Backtrace();
23 
24  std::string toString(unsigned int skipLevels = 0) const;
25 
26 private:
28 
29  bool backtraceTrace();
30  bool unwindTrace();
31 
32  std::vector<void *> backtrace_;
33  std::vector<std::string> backtraceText_;
34 };
35 
36 } /* namespace libcamera */
Utilities to help constructing class interfaces.
Top-level libcamera namespace.
Definition: backtrace.h:17
Backtrace()
Construct a backtrace.
Definition: backtrace.cpp:157
std::string toString(unsigned int skipLevels=0) const
Convert a backtrace to a string representation.
Definition: backtrace.cpp:281
Representation of a call stack backtrace.
Definition: backtrace.h:19
#define LIBCAMERA_DISABLE_COPY(klass)
Disable copy construction and assignment of the klass.