A stack trace of a core dump.
More...
#include "../report_type.h"
#include <inttypes.h>
#include <json.h>
#include <stdbool.h>
Go to the source code of this file.
A stack trace of a core dump.
Definition in file core/stacktrace.h.
◆ sr_core_stacktrace_dup()
Creates a duplicate of the stacktrace.
- Parameters
-
stacktrace | The stacktrace to be copied. It's not modified by this function. |
- Returns
- This function never returns NULL. The returned duplicate must be released by calling the function sr_core_stacktrace_free().
◆ sr_core_stacktrace_free()
Releases the memory held by the stacktrace, its threads and frames.
- Parameters
-
stacktrace | If the stacktrace is NULL, no operation is performed. |
◆ sr_core_stacktrace_from_json()
struct sr_core_stacktrace * sr_core_stacktrace_from_json |
( |
json_object * |
root, |
|
|
char ** |
error_message |
|
) |
| |
◆ sr_core_stacktrace_get_reason()
Returns brief, human-readable explanation of the stacktrace.
◆ sr_core_stacktrace_get_thread_count()
Returns a number of threads in the stacktrace.
- Parameters
-
stacktrace | It's not modified by calling this function. |
◆ sr_core_stacktrace_init()
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.
◆ sr_core_stacktrace_new()
Creates and initializes a new stacktrace structure.
- Returns
- It never returns NULL. The returned pointer must be released by calling the function sr_core_stacktrace_free().
◆ sr_core_stacktrace_to_json()
Serializes stacktrace to string.
- Returns
- Newly allocated memory containing the textual representation of the provided stacktrace. Caller should free the memory when it's no longer needed.