satyr
0.43
Toggle main menu visibility
Loading...
Searching...
No Matches
include
core
core/frame.h
Go to the documentation of this file.
1
/*
2
core_frame.h
3
4
Copyright (C) 2011, 2012 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_FRAME_H
21
#define SATYR_CORE_FRAME_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
#include <glib.h>
37
38
struct
sr_location
;
39
43
struct
sr_core_frame
44
{
45
enum
sr_report_type type;
46
59
uint64_t
address
;
60
64
char
*
build_id
;
65
// in ELF section
66
uint64_t build_id_offset;
67
// function name
68
char
*function_name;
69
// so or executable
70
char
*file_name;
72
char
*
fingerprint
;
73
75
bool
fingerprint_hashed
;
76
81
struct
sr_core_frame
*
next
;
82
};
83
90
struct
sr_core_frame
*
91
sr_core_frame_new
(
void
);
92
99
void
100
sr_core_frame_init
(
struct
sr_core_frame
*frame);
101
108
void
109
sr_core_frame_free
(
struct
sr_core_frame
*frame);
110
125
struct
sr_core_frame
*
126
sr_core_frame_dup
(
struct
sr_core_frame
*frame,
127
bool
siblings);
128
143
bool
144
sr_core_frame_calls_func
(
struct
sr_core_frame
*frame,
145
const
char
*function_name,
146
...);
147
161
int
162
sr_core_frame_cmp
(
struct
sr_core_frame
*frame1,
163
struct
sr_core_frame
*frame2);
164
178
int
179
sr_core_frame_cmp_distance
(
struct
sr_core_frame
*frame1,
180
struct
sr_core_frame
*frame2);
181
188
struct
sr_core_frame
*
189
sr_core_frame_append
(
struct
sr_core_frame
*dest,
190
struct
sr_core_frame
*item);
191
198
char
*
199
sr_core_frame_to_json
(
struct
sr_core_frame
*frame);
200
210
struct
sr_core_frame
*
211
sr_core_frame_from_json
(json_object *root,
212
char
**error_message);
213
217
void
218
sr_core_frame_append_to_str
(
struct
sr_core_frame
*frame,
219
GString *dest);
220
221
#ifdef __cplusplus
222
}
223
#endif
224
225
#endif
sr_core_frame_from_json
struct sr_core_frame * sr_core_frame_from_json(json_object *root, char **error_message)
sr_core_frame_dup
struct sr_core_frame * sr_core_frame_dup(struct sr_core_frame *frame, bool siblings)
sr_core_frame_cmp
int sr_core_frame_cmp(struct sr_core_frame *frame1, struct sr_core_frame *frame2)
sr_core_frame_append_to_str
void sr_core_frame_append_to_str(struct sr_core_frame *frame, GString *dest)
sr_core_frame_calls_func
bool sr_core_frame_calls_func(struct sr_core_frame *frame, const char *function_name,...)
sr_core_frame_to_json
char * sr_core_frame_to_json(struct sr_core_frame *frame)
sr_core_frame_init
void sr_core_frame_init(struct sr_core_frame *frame)
sr_core_frame_append
struct sr_core_frame * sr_core_frame_append(struct sr_core_frame *dest, struct sr_core_frame *item)
sr_core_frame_free
void sr_core_frame_free(struct sr_core_frame *frame)
sr_core_frame_new
struct sr_core_frame * sr_core_frame_new(void)
sr_core_frame_cmp_distance
int sr_core_frame_cmp_distance(struct sr_core_frame *frame1, struct sr_core_frame *frame2)
report_type.h
Report type.
sr_core_frame
A function call on call stack of a core dump.
Definition
core/frame.h:44
sr_core_frame::next
struct sr_core_frame * next
Definition
core/frame.h:81
sr_core_frame::fingerprint
char * fingerprint
Definition
core/frame.h:72
sr_core_frame::fingerprint_hashed
bool fingerprint_hashed
Definition
core/frame.h:75
sr_core_frame::build_id
char * build_id
Definition
core/frame.h:64
sr_core_frame::address
uint64_t address
Definition
core/frame.h:59
sr_location
A location of a parser in the input stream.
Definition
location.h:43
Generated by
1.17.0