satyr 0.43
Loading...
Searching...
No Matches
ruby/stacktrace.h
Go to the documentation of this file.
1/*
2 ruby_stacktrace.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_STACKTRACE_H
22#define SATYR_RUBY_STACKTRACE_H
23
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33#include "../report_type.h"
34#include <json.h>
35#include <stdint.h>
36
37struct sr_ruby_frame;
38struct sr_location;
39
41{
42 enum sr_report_type type;
43
44 char *exception_name;
45
46 struct sr_ruby_frame *frames;
47};
48
49struct sr_ruby_stacktrace *
50sr_ruby_stacktrace_new(void);
51
52void
53sr_ruby_stacktrace_init(struct sr_ruby_stacktrace *stacktrace);
54
55void
56sr_ruby_stacktrace_free(struct sr_ruby_stacktrace *stacktrace);
57
58struct sr_ruby_stacktrace *
59sr_ruby_stacktrace_dup(struct sr_ruby_stacktrace *stacktrace);
60
61struct sr_ruby_stacktrace *
62sr_ruby_stacktrace_parse(const char **input,
63 struct sr_location *location);
64
65char *
66sr_ruby_stacktrace_get_reason(struct sr_ruby_stacktrace *stacktrace);
67
68char *
69sr_ruby_stacktrace_to_json(struct sr_ruby_stacktrace *stacktrace);
70
71struct sr_ruby_stacktrace *
72sr_ruby_stacktrace_from_json(json_object *root, char **error_message);
73
74#ifdef __cplusplus
75}
76#endif
77
78#endif
Report type.
A location of a parser in the input stream.
Definition location.h:43