satyr  0.31
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 #include <json.h>
36 
37 struct sr_core_frame;
38 struct sr_strbuf;
39 struct sr_location;
40 
45 {
46  enum sr_report_type type;
47 
49  int64_t id;
50 
55 
61 };
62 
69 struct sr_core_thread *
71 
78 void
80 
87 void
89 
100 struct sr_core_thread *
102  bool siblings);
103 
112 int
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 *
142 sr_core_thread_from_json(json_object *root,
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
sr_core_thread_from_json
struct sr_core_thread * sr_core_thread_from_json(json_object *root, char **error_message)
sr_core_thread::next
struct sr_core_thread * next
Definition: core/thread.h:60
sr_core_frame
A function call on call stack of a core dump.
Definition: core/frame.h:44
sr_core_thread_append
struct sr_core_thread * sr_core_thread_append(struct sr_core_thread *dest, struct sr_core_thread *item)
sr_core_thread_cmp
int sr_core_thread_cmp(struct sr_core_thread *thread1, struct sr_core_thread *thread2)
sr_core_thread_dup
struct sr_core_thread * sr_core_thread_dup(struct sr_core_thread *thread, bool siblings)
sr_core_thread::id
int64_t id
Definition: core/thread.h:49
sr_core_thread
A thread of execution on call stack of a core dump.
Definition: core/thread.h:45
sr_core_thread_new
struct sr_core_thread * sr_core_thread_new(void)
sr_core_thread::frames
struct sr_core_frame * frames
Definition: core/thread.h:54
sr_core_thread_init
void sr_core_thread_init(struct sr_core_thread *thread)
sr_location
A location of a parser in the input stream.
Definition: location.h:43
sr_strbuf
A resizable string buffer.
Definition: strbuf.h:39
sr_core_thread_free
void sr_core_thread_free(struct sr_core_thread *thread)