satyr 0.42
Loading...
Searching...
No Matches
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
28#ifdef __cplusplus
29extern "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
38struct sr_location;
39
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;
73
76
82};
83
90struct sr_core_frame *
92
99void
101
108void
110
125struct sr_core_frame *
127 bool siblings);
128
143bool
145 const char *function_name,
146 ...);
147
161int
163 struct sr_core_frame *frame2);
164
178int
180 struct sr_core_frame *frame2);
181
188struct sr_core_frame *
190 struct sr_core_frame *item);
191
198char *
200
210struct sr_core_frame *
211sr_core_frame_from_json(json_object *root,
212 char **error_message);
213
217void
219 GString *dest);
220
221#ifdef __cplusplus
222}
223#endif
224
225#endif
struct sr_core_frame * sr_core_frame_from_json(json_object *root, char **error_message)
struct sr_core_frame * sr_core_frame_dup(struct sr_core_frame *frame, bool siblings)
int sr_core_frame_cmp(struct sr_core_frame *frame1, struct sr_core_frame *frame2)
void sr_core_frame_append_to_str(struct sr_core_frame *frame, GString *dest)
bool sr_core_frame_calls_func(struct sr_core_frame *frame, const char *function_name,...)
char * sr_core_frame_to_json(struct sr_core_frame *frame)
void sr_core_frame_init(struct sr_core_frame *frame)
struct sr_core_frame * sr_core_frame_append(struct sr_core_frame *dest, struct sr_core_frame *item)
void sr_core_frame_free(struct sr_core_frame *frame)
struct sr_core_frame * sr_core_frame_new(void)
int sr_core_frame_cmp_distance(struct sr_core_frame *frame1, struct sr_core_frame *frame2)
A function call on call stack of a core dump.
Definition: core/frame.h:44
struct sr_core_frame * next
Definition: core/frame.h:81
char * fingerprint
Definition: core/frame.h:72
bool fingerprint_hashed
Definition: core/frame.h:75
char * build_id
Definition: core/frame.h:64
uint64_t address
Definition: core/frame.h:59
A location of a parser in the input stream.
Definition: location.h:43