Zrythm
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
backtrace.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: © 2020 Alexandros Theodotou <alex@zrythm.org>
3 *
4 * SPDX-License-Identifier: LicenseRef-ZrythmLicense
5 */
6
13#ifndef __UTILS_BACKTRACE_H__
14#define __UTILS_BACKTRACE_H__
15
16#include <stdbool.h>
17
33char *
35 const char * exe_path,
36 const char * prefix,
37 int max_lines,
38 bool with_lines,
39 bool write_to_file);
40
41#define backtrace_get(prefix, max_lines, write_to_file) \
42 _backtrace_get (NULL, prefix, max_lines, false, write_to_file)
43
44#define backtrace_get_with_lines(prefix, max_lines, write_to_file) \
45 _backtrace_get ( \
46 (ZRYTHM && ZRYTHM->exe_path) ? ZRYTHM->exe_path : NULL, prefix, max_lines, \
47 ZRYTHM && ZRYTHM->exe_path ? true : false, write_to_file)
48
53#endif
char * _backtrace_get(const char *exe_path, const char *prefix, int max_lines, bool with_lines, bool write_to_file)
Returns the backtrace with max_lines number of lines and a string prefix.