satyr
0.43
Toggle main menu visibility
Loading...
Searching...
No Matches
include
stacktrace.h
Go to the documentation of this file.
1
/*
2
stacktrace.h
3
4
Copyright (C) 2013 Red Hat, Inc.
5
6
This program is free software; you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation; either version 2 of the License, or
9
(at your option) any later version.
10
11
This program is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
15
16
You should have received a copy of the GNU General Public License along
17
with this program; if not, write to the Free Software Foundation, Inc.,
18
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
*/
20
#ifndef SATYR_STACKTRACE_H
21
#define SATYR_STACKTRACE_H
22
27
40
41
#ifdef __cplusplus
42
extern
"C"
{
43
#endif
44
45
#include "
report_type.h
"
46
47
#include <json.h>
48
49
struct
sr_stacktrace
50
{
51
enum
sr_report_type type;
52
};
53
54
/* Flags that influence how the bthash is computed.
55
*/
56
enum
sr_bthash_flags
57
{
58
/* Default hashing process.
59
*/
60
SR_BTHASH_NORMAL = 1 << 0,
61
62
/* Return the plaintext that would be hashed. Useful mainly for debugging.
63
*/
64
SR_BTHASH_NOHASH = 1 << 1,
65
};
66
71
struct
sr_stacktrace
*
72
sr_stacktrace_parse
(
enum
sr_report_type type,
const
char
*input,
char
**error_message);
73
78
char
*
79
sr_stacktrace_to_short_text
(
struct
sr_stacktrace
*stacktrace,
int
max_frames);
80
84
struct
sr_thread
*
85
sr_stacktrace_find_crash_thread
(
struct
sr_stacktrace
*stacktrace);
86
90
struct
sr_thread
*
91
sr_stacktrace_threads
(
struct
sr_stacktrace
*stacktrace);
92
96
void
97
sr_stacktrace_set_threads
(
struct
sr_stacktrace
*stacktrace,
struct
sr_thread
*threads);
98
102
char
*
103
sr_stacktrace_to_json
(
struct
sr_stacktrace
*stacktrace);
104
108
struct
sr_stacktrace
*
109
sr_stacktrace_from_json
(
enum
sr_report_type, json_object *root,
char
**error_message);
110
114
struct
sr_stacktrace
*
115
sr_stacktrace_from_json_text
(
enum
sr_report_type,
const
char
*input,
char
**error_message);
116
120
char
*
121
sr_stacktrace_get_reason
(
struct
sr_stacktrace
*stacktrace);
122
129
char
*
130
sr_stacktrace_get_bthash
(
struct
sr_stacktrace
*stacktrace,
enum
sr_bthash_flags flags);
131
135
void
136
sr_stacktrace_free
(
struct
sr_stacktrace
*stacktrace);
137
138
#ifdef __cplusplus
139
}
140
#endif
141
142
#endif
report_type.h
Report type.
sr_stacktrace_from_json
struct sr_stacktrace * sr_stacktrace_from_json(enum sr_report_type, json_object *root, char **error_message)
sr_stacktrace_get_bthash
char * sr_stacktrace_get_bthash(struct sr_stacktrace *stacktrace, enum sr_bthash_flags flags)
sr_stacktrace_to_short_text
char * sr_stacktrace_to_short_text(struct sr_stacktrace *stacktrace, int max_frames)
sr_stacktrace_parse
struct sr_stacktrace * sr_stacktrace_parse(enum sr_report_type type, const char *input, char **error_message)
sr_stacktrace_free
void sr_stacktrace_free(struct sr_stacktrace *stacktrace)
sr_stacktrace_threads
struct sr_thread * sr_stacktrace_threads(struct sr_stacktrace *stacktrace)
sr_stacktrace_from_json_text
struct sr_stacktrace * sr_stacktrace_from_json_text(enum sr_report_type, const char *input, char **error_message)
sr_stacktrace_get_reason
char * sr_stacktrace_get_reason(struct sr_stacktrace *stacktrace)
sr_stacktrace_set_threads
void sr_stacktrace_set_threads(struct sr_stacktrace *stacktrace, struct sr_thread *threads)
sr_stacktrace_to_json
char * sr_stacktrace_to_json(struct sr_stacktrace *stacktrace)
sr_stacktrace_find_crash_thread
struct sr_thread * sr_stacktrace_find_crash_thread(struct sr_stacktrace *stacktrace)
sr_stacktrace
Definition
stacktrace.h:50
sr_thread
Definition
thread.h:52
Generated by
1.17.0