satyr
0.43
Toggle main menu visibility
Loading...
Searching...
No Matches
include
gdb
gdb/stacktrace.h
Go to the documentation of this file.
1
/*
2
gdb_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_GDB_STACKTRACE_H
22
#define SATYR_GDB_STACKTRACE_H
23
28
29
#ifdef __cplusplus
30
extern
"C"
{
31
#endif
32
33
#include "
../report_type.h
"
34
#include <stdbool.h>
35
#include <stdint.h>
36
37
struct
sr_gdb_thread
;
38
struct
sr_gdb_frame
;
39
struct
sr_location
;
40
50
struct
sr_gdb_stacktrace
51
{
52
enum
sr_report_type type;
53
54
struct
sr_gdb_thread
*threads;
55
62
struct
sr_gdb_frame
*
crash
;
63
67
struct
sr_gdb_sharedlib
*
libs
;
68
79
uint32_t
crash_tid
;
80
};
81
88
struct
sr_gdb_stacktrace
*
89
sr_gdb_stacktrace_new
(
void
);
90
97
void
98
sr_gdb_stacktrace_init
(
struct
sr_gdb_stacktrace
*stacktrace);
99
106
void
107
sr_gdb_stacktrace_free
(
struct
sr_gdb_stacktrace
*stacktrace);
108
117
struct
sr_gdb_stacktrace
*
118
sr_gdb_stacktrace_dup
(
struct
sr_gdb_stacktrace
*stacktrace);
119
125
int
126
sr_gdb_stacktrace_get_thread_count
(
struct
sr_gdb_stacktrace
*stacktrace);
127
136
void
137
sr_gdb_stacktrace_remove_threads_except_one
(
struct
sr_gdb_stacktrace
*stacktrace,
138
struct
sr_gdb_thread
*thread);
139
147
struct
sr_gdb_thread
*
148
sr_gdb_stacktrace_find_crash_thread
(
struct
sr_gdb_stacktrace
*stacktrace);
149
156
void
157
sr_gdb_stacktrace_limit_frame_depth
(
struct
sr_gdb_stacktrace
*stacktrace,
158
int
depth);
159
172
float
173
sr_gdb_stacktrace_quality_simple
(
struct
sr_gdb_stacktrace
*stacktrace);
174
189
float
190
sr_gdb_stacktrace_quality_complex
(
struct
sr_gdb_stacktrace
*stacktrace);
191
201
char
*
202
sr_gdb_stacktrace_to_text
(
struct
sr_gdb_stacktrace
*stacktrace,
203
bool
verbose);
204
216
struct
sr_gdb_frame
*
217
sr_gdb_stacktrace_get_crash_frame
(
struct
sr_gdb_stacktrace
*stacktrace);
218
226
void
227
sr_gdb_stacktrace_set_crash_tid
(
struct
sr_gdb_stacktrace
*stacktrace,
228
uint32_t tid);
229
270
struct
sr_gdb_stacktrace
*
271
sr_gdb_stacktrace_parse
(
const
char
**input,
272
struct
sr_location
*location);
273
296
bool
297
sr_gdb_stacktrace_parse_header
(
const
char
**input,
298
struct
sr_gdb_frame
**frame,
299
struct
sr_location
*location);
300
305
void
306
sr_gdb_stacktrace_set_libnames
(
struct
sr_gdb_stacktrace
*stacktrace);
307
322
char
*
323
sr_gdb_stacktrace_to_short_text
(
struct
sr_gdb_stacktrace
*stacktrace,
324
int
max_frames);
325
326
#ifdef __cplusplus
327
}
328
#endif
329
330
#endif
sr_gdb_stacktrace_to_short_text
char * sr_gdb_stacktrace_to_short_text(struct sr_gdb_stacktrace *stacktrace, int max_frames)
sr_gdb_stacktrace_parse
struct sr_gdb_stacktrace * sr_gdb_stacktrace_parse(const char **input, struct sr_location *location)
sr_gdb_stacktrace_new
struct sr_gdb_stacktrace * sr_gdb_stacktrace_new(void)
sr_gdb_stacktrace_remove_threads_except_one
void sr_gdb_stacktrace_remove_threads_except_one(struct sr_gdb_stacktrace *stacktrace, struct sr_gdb_thread *thread)
sr_gdb_stacktrace_set_libnames
void sr_gdb_stacktrace_set_libnames(struct sr_gdb_stacktrace *stacktrace)
sr_gdb_stacktrace_set_crash_tid
void sr_gdb_stacktrace_set_crash_tid(struct sr_gdb_stacktrace *stacktrace, uint32_t tid)
sr_gdb_stacktrace_quality_simple
float sr_gdb_stacktrace_quality_simple(struct sr_gdb_stacktrace *stacktrace)
sr_gdb_stacktrace_quality_complex
float sr_gdb_stacktrace_quality_complex(struct sr_gdb_stacktrace *stacktrace)
sr_gdb_stacktrace_parse_header
bool sr_gdb_stacktrace_parse_header(const char **input, struct sr_gdb_frame **frame, struct sr_location *location)
sr_gdb_stacktrace_init
void sr_gdb_stacktrace_init(struct sr_gdb_stacktrace *stacktrace)
sr_gdb_stacktrace_limit_frame_depth
void sr_gdb_stacktrace_limit_frame_depth(struct sr_gdb_stacktrace *stacktrace, int depth)
sr_gdb_stacktrace_find_crash_thread
struct sr_gdb_thread * sr_gdb_stacktrace_find_crash_thread(struct sr_gdb_stacktrace *stacktrace)
sr_gdb_stacktrace_get_crash_frame
struct sr_gdb_frame * sr_gdb_stacktrace_get_crash_frame(struct sr_gdb_stacktrace *stacktrace)
sr_gdb_stacktrace_to_text
char * sr_gdb_stacktrace_to_text(struct sr_gdb_stacktrace *stacktrace, bool verbose)
sr_gdb_stacktrace_free
void sr_gdb_stacktrace_free(struct sr_gdb_stacktrace *stacktrace)
sr_gdb_stacktrace_get_thread_count
int sr_gdb_stacktrace_get_thread_count(struct sr_gdb_stacktrace *stacktrace)
sr_gdb_stacktrace_dup
struct sr_gdb_stacktrace * sr_gdb_stacktrace_dup(struct sr_gdb_stacktrace *stacktrace)
report_type.h
Report type.
sr_gdb_frame
A function call of a GDB-produced stack trace.
Definition
gdb/frame.h:48
sr_gdb_sharedlib
A shared library memory location as reported by GDB.
Definition
sharedlib.h:46
sr_gdb_stacktrace
A stack trace produced by GDB.
Definition
gdb/stacktrace.h:51
sr_gdb_stacktrace::crash_tid
uint32_t crash_tid
Definition
gdb/stacktrace.h:79
sr_gdb_stacktrace::libs
struct sr_gdb_sharedlib * libs
Definition
gdb/stacktrace.h:67
sr_gdb_stacktrace::crash
struct sr_gdb_frame * crash
Definition
gdb/stacktrace.h:62
sr_gdb_thread
A thread of execution of a GDB-produced stack trace.
Definition
gdb/thread.h:47
sr_location
A location of a parser in the input stream.
Definition
location.h:43
Generated by
1.17.0