aboutsummaryrefslogtreecommitdiffstats
path: root/internal.h
blob: 19755223338434ad2e9746ecdc7ffcbeadef35b0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* See LICENSE file for copyright and license details. */
#include <alloca.h>
#include <errno.h>
#include <inttypes.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>


struct liberror_error {
	struct liberror_backtrace *backtrace;
};


struct liberror_backtrace {
	size_t refcount;
	size_t n;
	uintptr_t rips[];
};


extern _Thread_local struct liberror_backtrace *liberror_saved_backtrace;


void liberror_print_backtrace(struct liberror_error *, FILE *, const char *);
int liberror_save_backtrace(struct liberror_error *);