satyr
0.43
Toggle main menu visibility
Loading...
Searching...
No Matches
include
koops
koops/frame.h
Go to the documentation of this file.
1
/*
2
koops_frame.h
3
4
Copyright (C) 2012 ABRT Team
5
Copyright (C) 2012 Red Hat, Inc.
6
7
This program is free software; you can redistribute it and/or modify
8
it under the terms of the GNU General Public License as published by
9
the Free Software Foundation; either version 2 of the License, or
10
(at your option) any later version.
11
12
This program is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU General Public License for more details.
16
17
You should have received a copy of the GNU General Public License along
18
with this program; if not, write to the Free Software Foundation, Inc.,
19
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20
*/
21
#ifndef SATYR_KOOPS_FRAME_H
22
#define SATYR_KOOPS_FRAME_H
23
28
29
#ifdef __cplusplus
30
extern
"C"
{
31
#endif
32
33
#include "
../report_type.h
"
34
#include <json.h>
35
#include <stdbool.h>
36
#include <stdint.h>
37
#include <glib.h>
38
39
43
struct
sr_koops_frame
44
{
45
enum
sr_report_type type;
46
52
uint64_t
address
;
53
58
bool
reliable
;
59
63
char
*
function_name
;
64
65
uint64_t function_offset;
66
67
uint64_t function_length;
68
72
char
*
module_name
;
73
77
uint64_t
from_address
;
78
82
char
*
from_function_name
;
83
84
uint64_t from_function_offset;
85
86
uint64_t from_function_length;
87
91
char
*
from_module_name
;
92
100
/* XXX: we should probably have each stack as a separate thread ... in
101
* uReport3 ? */
102
char
*
special_stack
;
103
104
struct
sr_koops_frame
*next;
105
};
106
113
struct
sr_koops_frame
*
114
sr_koops_frame_new
(
void
);
115
122
void
123
sr_koops_frame_init
(
struct
sr_koops_frame
*frame);
124
131
void
132
sr_koops_frame_free
(
struct
sr_koops_frame
*frame);
133
147
struct
sr_koops_frame
*
148
sr_koops_frame_dup
(
struct
sr_koops_frame
*frame,
149
bool
siblings);
150
164
int
165
sr_koops_frame_cmp
(
struct
sr_koops_frame
*frame1,
166
struct
sr_koops_frame
*frame2);
167
181
int
182
sr_koops_frame_cmp_distance
(
struct
sr_koops_frame
*frame1,
183
struct
sr_koops_frame
*frame2);
184
191
struct
sr_koops_frame
*
192
sr_koops_frame_append
(
struct
sr_koops_frame
*dest,
193
struct
sr_koops_frame
*item);
194
195
struct
sr_koops_frame
*
196
sr_koops_frame_prepend(
struct
sr_koops_frame
*dest,
197
struct
sr_koops_frame
*item);
198
199
struct
sr_koops_frame
*
200
sr_koops_frame_parse(
const
char
**input);
201
208
bool
209
sr_koops_skip_timestamp(
const
char
**input);
210
211
bool
212
sr_koops_parse_address(
const
char
**input, uint64_t *
address
);
213
214
bool
215
sr_koops_parse_module_name(
const
char
**input,
216
char
**
module_name
);
217
218
bool
219
sr_koops_parse_function(
const
char
**input,
220
char
**
function_name
,
221
uint64_t *function_offset,
222
uint64_t *function_length,
223
char
**
module_name
);
224
231
char
*
232
sr_koops_frame_to_json
(
struct
sr_koops_frame
*frame);
233
243
struct
sr_koops_frame
*
244
sr_koops_frame_from_json
(json_object *root,
char
**error_message);
245
249
void
250
sr_koops_frame_append_to_str
(
struct
sr_koops_frame
*frame,
251
GString *dest);
252
253
#ifdef __cplusplus
254
}
255
#endif
256
257
#endif
sr_koops_frame_append
struct sr_koops_frame * sr_koops_frame_append(struct sr_koops_frame *dest, struct sr_koops_frame *item)
sr_koops_frame_append_to_str
void sr_koops_frame_append_to_str(struct sr_koops_frame *frame, GString *dest)
sr_koops_frame_dup
struct sr_koops_frame * sr_koops_frame_dup(struct sr_koops_frame *frame, bool siblings)
sr_koops_frame_to_json
char * sr_koops_frame_to_json(struct sr_koops_frame *frame)
sr_koops_frame_cmp_distance
int sr_koops_frame_cmp_distance(struct sr_koops_frame *frame1, struct sr_koops_frame *frame2)
sr_koops_frame_from_json
struct sr_koops_frame * sr_koops_frame_from_json(json_object *root, char **error_message)
sr_koops_frame_init
void sr_koops_frame_init(struct sr_koops_frame *frame)
sr_koops_frame_new
struct sr_koops_frame * sr_koops_frame_new(void)
sr_koops_frame_free
void sr_koops_frame_free(struct sr_koops_frame *frame)
sr_koops_frame_cmp
int sr_koops_frame_cmp(struct sr_koops_frame *frame1, struct sr_koops_frame *frame2)
report_type.h
Report type.
sr_koops_frame
Kernel oops stack frame.
Definition
koops/frame.h:44
sr_koops_frame::special_stack
char * special_stack
Definition
koops/frame.h:102
sr_koops_frame::from_address
uint64_t from_address
Definition
koops/frame.h:77
sr_koops_frame::address
uint64_t address
Definition
koops/frame.h:52
sr_koops_frame::module_name
char * module_name
Definition
koops/frame.h:72
sr_koops_frame::function_name
char * function_name
Definition
koops/frame.h:63
sr_koops_frame::from_module_name
char * from_module_name
Definition
koops/frame.h:91
sr_koops_frame::reliable
bool reliable
Definition
koops/frame.h:58
sr_koops_frame::from_function_name
char * from_function_name
Definition
koops/frame.h:82
Generated by
1.17.0