satyr 0.43
Loading...
Searching...
No Matches
core/stacktrace.h
Go to the documentation of this file.
1/*
2 core_stacktrace.h
3
4 Copyright (C) 2010 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_STACKTRACE_H
21#define SATYR_CORE_STACKTRACE_H
22
27
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
37struct sr_core_thread;
38struct sr_location;
39
44{
45 enum sr_report_type type;
46
48 uint16_t signal;
49
50 char *executable;
51
58
59 struct sr_core_thread *threads;
60
63};
64
71struct sr_core_stacktrace *
73
80void
82
88void
90
99struct sr_core_stacktrace *
101
107int
109
110struct sr_core_thread *
111sr_core_stacktrace_find_crash_thread(struct sr_core_stacktrace *stacktrace);
112
118struct sr_core_stacktrace *
120 char **error_message);
121
122struct sr_core_stacktrace *
123sr_core_stacktrace_from_json_text(const char *text,
124 char **error_message);
125
129char *
131
139char *
141
142struct sr_core_stacktrace *
143sr_core_stacktrace_create(const char *gdb_stacktrace_text,
144 const char *unstrip_text,
145 const char *executable_path);
146
147#ifdef __cplusplus
148}
149#endif
150
151#endif
char * sr_core_stacktrace_get_reason(struct sr_core_stacktrace *stacktrace)
struct sr_core_stacktrace * sr_core_stacktrace_dup(struct sr_core_stacktrace *stacktrace)
int sr_core_stacktrace_get_thread_count(struct sr_core_stacktrace *stacktrace)
void sr_core_stacktrace_init(struct sr_core_stacktrace *stacktrace)
char * sr_core_stacktrace_to_json(struct sr_core_stacktrace *stacktrace)
struct sr_core_stacktrace * sr_core_stacktrace_new(void)
void sr_core_stacktrace_free(struct sr_core_stacktrace *stacktrace)
struct sr_core_stacktrace * sr_core_stacktrace_from_json(json_object *root, char **error_message)
Report type.
A stack trace of a core dump.
struct sr_core_thread * crash_thread
Thread responsible for the crash.
A thread of execution on call stack of a core dump.
Definition core/thread.h:44
A location of a parser in the input stream.
Definition location.h:43