satyr  0.38
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_location;
39 
44 {
45  enum sr_report_type type;
46 
48  int64_t id;
49 
54 
60 };
61 
68 struct sr_core_thread *
70 
77 void
79 
86 void
88 
99 struct sr_core_thread *
101  bool siblings);
102 
111 int
113  struct sr_core_thread *thread2);
114 
121 struct sr_core_thread *
123  struct sr_core_thread *item);
124 
125 bool
126 sr_core_thread_is_exit_frame(struct sr_core_frame *frame);
127 
128 struct sr_core_frame *
129 sr_core_thread_find_exit_frame(struct sr_core_thread *thread);
130 
140 struct sr_core_thread *
141 sr_core_thread_from_json(json_object *root,
142  char **error_message);
143 
144 char *
145 sr_core_thread_to_json(struct sr_core_thread *thread,
146  bool is_crash_thread);
147 
148 #ifdef __cplusplus
149 }
150 #endif
151 
152 #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:59
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:48
sr_core_thread
A thread of execution on call stack of a core dump.
Definition: core/thread.h:44
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:53
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_core_thread_free
void sr_core_thread_free(struct sr_core_thread *thread)