satyr  0.26
core/thread.h
Go to the documentation of this file.
1 /*
2  core_thread.h
3 
4  Copyright (C) 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_THREAD_H
21 #define SATYR_CORE_THREAD_H
22 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 #include "../report_type.h"
33 #include <stdbool.h>
34 #include <inttypes.h>
35 
36 struct sr_core_frame;
37 struct sr_strbuf;
38 struct sr_location;
39 struct sr_json_value;
40 
45 {
46  enum sr_report_type type;
47 
49  int64_t id;
50 
55 
61 };
62 
69 struct sr_core_thread *
70 sr_core_thread_new(void);
71 
78 void
79 sr_core_thread_init(struct sr_core_thread *thread);
80 
87 void
88 sr_core_thread_free(struct sr_core_thread *thread);
89 
100 struct sr_core_thread *
101 sr_core_thread_dup(struct sr_core_thread *thread,
102  bool siblings);
103 
112 int
113 sr_core_thread_cmp(struct sr_core_thread *thread1,
114  struct sr_core_thread *thread2);
115 
122 struct sr_core_thread *
124  struct sr_core_thread *item);
125 
126 bool
127 sr_core_thread_is_exit_frame(struct sr_core_frame *frame);
128 
129 struct sr_core_frame *
130 sr_core_thread_find_exit_frame(struct sr_core_thread *thread);
131 
141 struct sr_core_thread *
143  char **error_message);
144 
145 char *
146 sr_core_thread_to_json(struct sr_core_thread *thread,
147  bool is_crash_thread);
148 
149 #ifdef __cplusplus
150 }
151 #endif
152 
153 #endif
A function call on call stack of a core dump.
Definition: core/frame.h:43
struct sr_core_thread * sr_core_thread_append(struct sr_core_thread *dest, struct sr_core_thread *item)
struct sr_core_thread * sr_core_thread_dup(struct sr_core_thread *thread, bool siblings)
A resizable string buffer.
Definition: strbuf.h:38
void sr_core_thread_init(struct sr_core_thread *thread)
void sr_core_thread_free(struct sr_core_thread *thread)
struct sr_core_frame * frames
Definition: core/thread.h:54
int sr_core_thread_cmp(struct sr_core_thread *thread1, struct sr_core_thread *thread2)
struct sr_core_thread * sr_core_thread_new(void)
A thread of execution on call stack of a core dump.
Definition: core/thread.h:44
struct sr_core_thread * sr_core_thread_from_json(struct sr_json_value *root, char **error_message)
A location of a parser in the input stream.
Definition: location.h:42
struct sr_core_thread * next
Definition: core/thread.h:60