satyr  0.28
koops/stacktrace.h
Go to the documentation of this file.
1 /*
2  koops_stacktrace.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_STACKTRACE_H
22 #define SATYR_KOOPS_STACKTRACE_H
23 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 #include "../report_type.h"
34 #include <stdbool.h>
35 #include <inttypes.h>
36 #include <stddef.h>
37 
38 struct sr_location;
39 struct sr_json_value;
40 
42 {
43  enum sr_report_type type;
44 
48  char *version;
49 
55  bool taint_module_out_of_tree;
56  bool taint_forced_module;
57  bool taint_forced_removal;
58  bool taint_smp_unsafe;
60  bool taint_mce;
63  bool taint_userspace;
64  bool taint_died_recently;
65  bool taint_acpi_overridden;
66  bool taint_warning;
67  bool taint_staging_driver;
68  bool taint_firmware_workaround;
69  bool taint_unsigned_module;
70  bool taint_soft_lockup;
71  bool taint_live_patched;
72 
79  char **modules;
80 
84  char *raw_oops;
85 
90 
94  char *reason;
95 };
96 
103 struct sr_koops_stacktrace *
105 
112 void
114 
120 void
122 
131 struct sr_koops_stacktrace *
132 sr_koops_stacktrace_dup(struct sr_koops_stacktrace *stacktrace);
133 
140 bool
142  struct sr_koops_frame *frame);
143 
153 struct sr_koops_stacktrace *
154 sr_koops_stacktrace_parse(const char **input,
155  struct sr_location *location);
156 
157 char **
158 sr_koops_stacktrace_parse_modules(const char **input);
159 
163 char *
165 
173 char *
175 
185 struct sr_koops_stacktrace *
186 sr_koops_stacktrace_from_json(struct sr_json_value *root, char **error_message);
187 
188 void
189 sr_normalize_koops_stacktrace(struct sr_koops_stacktrace *stacktrace);
190 
191 
192 #ifdef __cplusplus
193 }
194 #endif
195 
196 #endif
void sr_koops_stacktrace_free(struct sr_koops_stacktrace *stacktrace)
struct sr_koops_stacktrace * sr_koops_stacktrace_dup(struct sr_koops_stacktrace *stacktrace)
char * version
Version of the kernel.
bool sr_koops_stacktrace_remove_frame(struct sr_koops_stacktrace *stacktrace, struct sr_koops_frame *frame)
char * sr_koops_stacktrace_get_reason(struct sr_koops_stacktrace *stacktrace)
struct sr_koops_stacktrace * sr_koops_stacktrace_parse(const char **input, struct sr_location *location)
char ** modules
List of loaded modules.
struct sr_koops_frame * frames
Call trace. It might be NULL as it is not mandatory.
struct sr_koops_stacktrace * sr_koops_stacktrace_new(void)
char * sr_koops_stacktrace_to_json(struct sr_koops_stacktrace *stacktrace)
void sr_koops_stacktrace_init(struct sr_koops_stacktrace *stacktrace)
Kernel oops stack frame.
Definition: koops/frame.h:43
struct sr_koops_stacktrace * sr_koops_stacktrace_from_json(struct sr_json_value *root, char **error_message)
A location of a parser in the input stream.
Definition: location.h:42
char * reason
Reason message extracted by ABRT.
char * raw_oops
Raw kerneloops text.