satyr 0.42
Loading...
Searching...
No Matches
ruby/frame.h
Go to the documentation of this file.
1/*
2 ruby_frame.h
3
4 Copyright (C) 2015 ABRT Team
5 Copyright (C) 2015 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_RUBY_FRAME_H
22#define SATYR_RUBY_FRAME_H
23
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
39struct sr_location;
40
42{
43 enum sr_report_type type;
44
45 char *file_name;
46
47 uint32_t file_line;
48
49 bool special_function;
50
51 char *function_name;
52
53 uint32_t block_level;
54
55 uint32_t rescue_level;
56
57 struct sr_ruby_frame *next;
58};
59
60struct sr_ruby_frame *
61sr_ruby_frame_new(void);
62
63void
64sr_ruby_frame_init(struct sr_ruby_frame *frame);
65
66void
67sr_ruby_frame_free(struct sr_ruby_frame *frame);
68
69struct sr_ruby_frame *
70sr_ruby_frame_dup(struct sr_ruby_frame *frame, bool siblings);
71
72int
73sr_ruby_frame_cmp(struct sr_ruby_frame *frame1, struct sr_ruby_frame *frame2);
74
75int
76sr_ruby_frame_cmp_distance(struct sr_ruby_frame *frame1,
77 struct sr_ruby_frame *frame2);
78
79struct sr_ruby_frame *
80sr_ruby_frame_append(struct sr_ruby_frame *dest,
81 struct sr_ruby_frame *item);
82
83struct sr_ruby_frame *
84sr_ruby_frame_parse(const char **input, struct sr_location *location);
85
86char *
87sr_ruby_frame_to_json(struct sr_ruby_frame *frame);
88
89struct sr_ruby_frame *
90sr_ruby_frame_from_json(json_object *root, char **error_message);
91
92void
93sr_ruby_frame_append_to_str(struct sr_ruby_frame *frame, GString *dest);
94
95#ifdef __cplusplus
96}
97#endif
98
99#endif
A location of a parser in the input stream.
Definition: location.h:43