|
satyr 0.43
|
java stack trace structure and related algorithms. More...
Go to the source code of this file.
Data Structures | |
| struct | sr_java_stacktrace |
Functions | |
| struct sr_java_stacktrace * | sr_java_stacktrace_new (void) |
| void | sr_java_stacktrace_init (struct sr_java_stacktrace *stacktrace) |
| void | sr_java_stacktrace_free (struct sr_java_stacktrace *stacktrace) |
| struct sr_java_stacktrace * | sr_java_stacktrace_dup (struct sr_java_stacktrace *stacktrace) |
| int | sr_java_stacktrace_cmp (struct sr_java_stacktrace *stacktrace1, struct sr_java_stacktrace *stacktrace2) |
| struct sr_java_stacktrace * | sr_java_stacktrace_parse (const char **input, struct sr_location *location) |
| char * | sr_java_stacktrace_get_reason (struct sr_java_stacktrace *stacktrace) |
| char * | sr_java_stacktrace_to_json (struct sr_java_stacktrace *stacktrace) |
| struct sr_java_stacktrace * | sr_java_stacktrace_from_json (json_object *root, char **error_message) |
| struct sr_java_thread * | sr_java_find_crash_thread (struct sr_java_stacktrace *stacktrace) |
java stack trace structure and related algorithms.
Definition in file java/stacktrace.h.
| int sr_java_stacktrace_cmp | ( | struct sr_java_stacktrace * | stacktrace1, |
| struct sr_java_stacktrace * | stacktrace2 ) |
Compares two stacktraces.
| struct sr_java_stacktrace * sr_java_stacktrace_dup | ( | struct sr_java_stacktrace * | stacktrace | ) |
Creates a duplicate of the stacktrace.
| stacktrace | The stacktrace to be copied. It's not modified by this function. |
| void sr_java_stacktrace_free | ( | struct sr_java_stacktrace * | stacktrace | ) |
Releases the memory held by the stacktrace and its frames.
| stacktrace | If the stacktrace is NULL, no operation is performed. |
| struct sr_java_stacktrace * sr_java_stacktrace_from_json | ( | json_object * | root, |
| char ** | error_message ) |
Deserializes stacktrace from JSON representation.
| root | JSON value to be deserialized. |
| error_message | On error, *error_message will contain the description of the error. |
| char * sr_java_stacktrace_get_reason | ( | struct sr_java_stacktrace * | stacktrace | ) |
Returns brief, human-readable explanation of the stacktrace.
| void sr_java_stacktrace_init | ( | struct sr_java_stacktrace * | stacktrace | ) |
Initializes all members of the stacktrace structure to their default values. No memory is released, members are simply overwritten. This is useful for initializing a stacktrace structure placed on the stack.
| struct sr_java_stacktrace * sr_java_stacktrace_new | ( | void | ) |
Creates and initializes a new stacktrace structure.
| struct sr_java_stacktrace * sr_java_stacktrace_parse | ( | const char ** | input, |
| struct sr_location * | location ) |
Parses a textual stack trace and puts it into a structure. If parsing fails, the input parameter is not changed and NULL is returned.
| input | Pointer to the string with the stacktrace. If this function returns a non-NULL value, this pointer is modified to point after the stacktrace that was just parsed. |
| location | The caller must provide a pointer to an instance of sr_location here. The line and column members of the location are gradually increased as the parser handles the input, so the location should be initialized by sr_location_init() before calling this function to get reasonable values. When this function returns false (an error occurred), the structure will contain the error line, column, and message. |
| char * sr_java_stacktrace_to_json | ( | struct sr_java_stacktrace * | stacktrace | ) |
Serializes stacktrace to string. @returnes Newly allocated memory containing the textual representation of the provided stacktrace. Caller should free the memory when it's no longer needed.