satyr 0.43
Loading...
Searching...
No Matches
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
30extern "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
44{
45 enum sr_report_type type;
46
52 uint64_t address;
53
59
64
65 uint64_t function_offset;
66
67 uint64_t function_length;
68
73
77 uint64_t from_address;
78
83
84 uint64_t from_function_offset;
85
86 uint64_t from_function_length;
87
92
100 /* XXX: we should probably have each stack as a separate thread ... in
101 * uReport3 ? */
103
104 struct sr_koops_frame *next;
105};
106
113struct sr_koops_frame *
115
122void
124
131void
133
147struct sr_koops_frame *
149 bool siblings);
150
164int
166 struct sr_koops_frame *frame2);
167
181int
183 struct sr_koops_frame *frame2);
184
191struct sr_koops_frame *
193 struct sr_koops_frame *item);
194
195struct sr_koops_frame *
196sr_koops_frame_prepend(struct sr_koops_frame *dest,
197 struct sr_koops_frame *item);
198
199struct sr_koops_frame *
200sr_koops_frame_parse(const char **input);
201
208bool
209sr_koops_skip_timestamp(const char **input);
210
211bool
212sr_koops_parse_address(const char **input, uint64_t *address);
213
214bool
215sr_koops_parse_module_name(const char **input,
216 char **module_name);
217
218bool
219sr_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
231char *
233
243struct sr_koops_frame *
244sr_koops_frame_from_json(json_object *root, char **error_message);
245
249void
251 GString *dest);
252
253#ifdef __cplusplus
254}
255#endif
256
257#endif
struct sr_koops_frame * sr_koops_frame_append(struct sr_koops_frame *dest, struct sr_koops_frame *item)
void sr_koops_frame_append_to_str(struct sr_koops_frame *frame, GString *dest)
struct sr_koops_frame * sr_koops_frame_dup(struct sr_koops_frame *frame, bool siblings)
char * sr_koops_frame_to_json(struct sr_koops_frame *frame)
int sr_koops_frame_cmp_distance(struct sr_koops_frame *frame1, struct sr_koops_frame *frame2)
struct sr_koops_frame * sr_koops_frame_from_json(json_object *root, char **error_message)
void sr_koops_frame_init(struct sr_koops_frame *frame)
struct sr_koops_frame * sr_koops_frame_new(void)
void sr_koops_frame_free(struct sr_koops_frame *frame)
int sr_koops_frame_cmp(struct sr_koops_frame *frame1, struct sr_koops_frame *frame2)
Report type.
Kernel oops stack frame.
Definition koops/frame.h:44
char * special_stack
uint64_t from_address
Definition koops/frame.h:77
uint64_t address
Definition koops/frame.h:52
char * module_name
Definition koops/frame.h:72
char * function_name
Definition koops/frame.h:63
char * from_module_name
Definition koops/frame.h:91
char * from_function_name
Definition koops/frame.h:82