satyr 0.43
Loading...
Searching...
No Matches
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
42extern "C" {
43#endif
44
45#include "report_type.h"
46
47#include <json.h>
48
50{
51 enum sr_report_type type;
52};
53
54/* Flags that influence how the bthash is computed.
55 */
56enum 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
71struct sr_stacktrace *
72sr_stacktrace_parse(enum sr_report_type type, const char *input, char **error_message);
73
78char *
79sr_stacktrace_to_short_text(struct sr_stacktrace *stacktrace, int max_frames);
80
84struct sr_thread *
86
90struct sr_thread *
92
96void
97sr_stacktrace_set_threads(struct sr_stacktrace *stacktrace, struct sr_thread *threads);
98
102char *
104
108struct sr_stacktrace*
109sr_stacktrace_from_json(enum sr_report_type, json_object *root, char **error_message);
110
114struct sr_stacktrace*
115sr_stacktrace_from_json_text(enum sr_report_type, const char *input, char **error_message);
116
120char *
122
129char *
130sr_stacktrace_get_bthash(struct sr_stacktrace *stacktrace, enum sr_bthash_flags flags);
131
135void
137
138#ifdef __cplusplus
139}
140#endif
141
142#endif
Report type.
struct sr_stacktrace * sr_stacktrace_from_json(enum sr_report_type, json_object *root, char **error_message)
char * sr_stacktrace_get_bthash(struct sr_stacktrace *stacktrace, enum sr_bthash_flags flags)
char * sr_stacktrace_to_short_text(struct sr_stacktrace *stacktrace, int max_frames)
struct sr_stacktrace * sr_stacktrace_parse(enum sr_report_type type, const char *input, char **error_message)
void sr_stacktrace_free(struct sr_stacktrace *stacktrace)
struct sr_thread * sr_stacktrace_threads(struct sr_stacktrace *stacktrace)
struct sr_stacktrace * sr_stacktrace_from_json_text(enum sr_report_type, const char *input, char **error_message)
char * sr_stacktrace_get_reason(struct sr_stacktrace *stacktrace)
void sr_stacktrace_set_threads(struct sr_stacktrace *stacktrace, struct sr_thread *threads)
char * sr_stacktrace_to_json(struct sr_stacktrace *stacktrace)
struct sr_thread * sr_stacktrace_find_crash_thread(struct sr_stacktrace *stacktrace)