satyr
0.43
Toggle main menu visibility
Loading...
Searching...
No Matches
include
core
core/stacktrace.h
Go to the documentation of this file.
1
/*
2
core_stacktrace.h
3
4
Copyright (C) 2010 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_CORE_STACKTRACE_H
21
#define SATYR_CORE_STACKTRACE_H
22
27
28
#ifdef __cplusplus
29
extern
"C"
{
30
#endif
31
32
#include "
../report_type.h
"
33
#include <inttypes.h>
34
#include <json.h>
35
#include <stdbool.h>
36
37
struct
sr_core_thread
;
38
struct
sr_location
;
39
43
struct
sr_core_stacktrace
44
{
45
enum
sr_report_type type;
46
48
uint16_t
signal
;
49
50
char
*executable;
51
57
struct
sr_core_thread
*
crash_thread
;
58
59
struct
sr_core_thread
*threads;
60
62
bool
only_crash_thread
;
63
};
64
71
struct
sr_core_stacktrace
*
72
sr_core_stacktrace_new
(
void
);
73
80
void
81
sr_core_stacktrace_init
(
struct
sr_core_stacktrace
*stacktrace);
82
88
void
89
sr_core_stacktrace_free
(
struct
sr_core_stacktrace
*stacktrace);
90
99
struct
sr_core_stacktrace
*
100
sr_core_stacktrace_dup
(
struct
sr_core_stacktrace
*stacktrace);
101
107
int
108
sr_core_stacktrace_get_thread_count
(
struct
sr_core_stacktrace
*stacktrace);
109
110
struct
sr_core_thread
*
111
sr_core_stacktrace_find_crash_thread(
struct
sr_core_stacktrace
*stacktrace);
112
118
struct
sr_core_stacktrace
*
119
sr_core_stacktrace_from_json
(json_object *root,
120
char
**error_message);
121
122
struct
sr_core_stacktrace
*
123
sr_core_stacktrace_from_json_text(
const
char
*text,
124
char
**error_message);
125
129
char
*
130
sr_core_stacktrace_get_reason
(
struct
sr_core_stacktrace
*stacktrace);
131
139
char
*
140
sr_core_stacktrace_to_json
(
struct
sr_core_stacktrace
*stacktrace);
141
142
struct
sr_core_stacktrace
*
143
sr_core_stacktrace_create(
const
char
*gdb_stacktrace_text,
144
const
char
*unstrip_text,
145
const
char
*executable_path);
146
147
#ifdef __cplusplus
148
}
149
#endif
150
151
#endif
sr_core_stacktrace_get_reason
char * sr_core_stacktrace_get_reason(struct sr_core_stacktrace *stacktrace)
sr_core_stacktrace_dup
struct sr_core_stacktrace * sr_core_stacktrace_dup(struct sr_core_stacktrace *stacktrace)
sr_core_stacktrace_get_thread_count
int sr_core_stacktrace_get_thread_count(struct sr_core_stacktrace *stacktrace)
sr_core_stacktrace_init
void sr_core_stacktrace_init(struct sr_core_stacktrace *stacktrace)
sr_core_stacktrace_to_json
char * sr_core_stacktrace_to_json(struct sr_core_stacktrace *stacktrace)
sr_core_stacktrace_new
struct sr_core_stacktrace * sr_core_stacktrace_new(void)
sr_core_stacktrace_free
void sr_core_stacktrace_free(struct sr_core_stacktrace *stacktrace)
sr_core_stacktrace_from_json
struct sr_core_stacktrace * sr_core_stacktrace_from_json(json_object *root, char **error_message)
report_type.h
Report type.
sr_core_stacktrace
A stack trace of a core dump.
Definition
core/stacktrace.h:44
sr_core_stacktrace::signal
uint16_t signal
Definition
core/stacktrace.h:48
sr_core_stacktrace::crash_thread
struct sr_core_thread * crash_thread
Thread responsible for the crash.
Definition
core/stacktrace.h:57
sr_core_stacktrace::only_crash_thread
bool only_crash_thread
Definition
core/stacktrace.h:62
sr_core_thread
A thread of execution on call stack of a core dump.
Definition
core/thread.h:44
sr_location
A location of a parser in the input stream.
Definition
location.h:43
Generated by
1.17.0