satyr
0.28
|
Stack trace. More...
#include "report_type.h"
Go to the source code of this file.
Data Structures | |
struct | sr_stacktrace |
Enumerations | |
enum | sr_bthash_flags { SR_BTHASH_NORMAL = 1 << 0, SR_BTHASH_NOHASH = 1 << 1 } |
Functions | |
struct sr_stacktrace * | sr_stacktrace_parse (enum sr_report_type type, const char *input, char **error_message) |
char * | sr_stacktrace_to_short_text (struct sr_stacktrace *stacktrace, int max_frames) |
struct sr_thread * | sr_stacktrace_find_crash_thread (struct sr_stacktrace *stacktrace) |
struct sr_thread * | sr_stacktrace_threads (struct sr_stacktrace *stacktrace) |
void | sr_stacktrace_set_threads (struct sr_stacktrace *stacktrace, struct sr_thread *threads) |
char * | sr_stacktrace_to_json (struct sr_stacktrace *stacktrace) |
struct sr_stacktrace * | sr_stacktrace_from_json (enum sr_report_type, struct sr_json_value *root, char **error_message) |
struct sr_stacktrace * | sr_stacktrace_from_json_text (enum sr_report_type, const char *input, char **error_message) |
char * | sr_stacktrace_get_reason (struct sr_stacktrace *stacktrace) |
char * | sr_stacktrace_get_bthash (struct sr_stacktrace *stacktrace, enum sr_bthash_flags flags) |
void | sr_stacktrace_free (struct sr_stacktrace *stacktrace) |
Stack trace.
Definition in file stacktrace.h.
struct sr_thread* sr_stacktrace_find_crash_thread | ( | struct sr_stacktrace * | stacktrace | ) |
Returns the thread structure that (probably) caused the crash.
void sr_stacktrace_free | ( | struct sr_stacktrace * | stacktrace | ) |
Releases all the memory associated with the stacktrace pointer.
struct sr_stacktrace* sr_stacktrace_from_json | ( | enum | sr_report_type, |
struct sr_json_value * | root, | ||
char ** | error_message | ||
) |
Deserialize stacktrace from its json representation.
struct sr_stacktrace* sr_stacktrace_from_json_text | ( | enum | sr_report_type, |
const char * | input, | ||
char ** | error_message | ||
) |
Deserialize stacktrace from its json representation.
char* sr_stacktrace_get_bthash | ( | struct sr_stacktrace * | stacktrace, |
enum sr_bthash_flags | flags | ||
) |
Returns hash of a backtrace. This is a hash in the usual sense that the same stacktraces always have the same hash while two distinct stacktraces have negligible probability of having the same hash. The string is allocated by malloc().
char* sr_stacktrace_get_reason | ( | struct sr_stacktrace * | stacktrace | ) |
Returns brief, human-readable explanation of the stacktrace.
struct sr_stacktrace* sr_stacktrace_parse | ( | enum sr_report_type | type, |
const char * | input, | ||
char ** | error_message | ||
) |
Parses the stacktrace pointed to by input. You need to provide the correct stacktrace type in the first parameter.
void sr_stacktrace_set_threads | ( | struct sr_stacktrace * | stacktrace, |
struct sr_thread * | threads | ||
) |
Set the threads linked list pointer.
struct sr_thread* sr_stacktrace_threads | ( | struct sr_stacktrace * | stacktrace | ) |
Returns pointer to the first thread.
char* sr_stacktrace_to_json | ( | struct sr_stacktrace * | stacktrace | ) |
Convert stacktrace to json and return it as text.
char* sr_stacktrace_to_short_text | ( | struct sr_stacktrace * | stacktrace, |
int | max_frames | ||
) |
Returns short textual representation of given stacktrace. At most max_frames are printed. Caller needs to free the result using free() afterwards.