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