From 5a50dba2c0832c58593e6aa88dd2144f64f0c544 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 13 Apr 2019 00:46:50 +0200 Subject: Enable prefetching backtace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- liberror.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'liberror.h') diff --git a/liberror.h b/liberror.h index 508dbac..7b5176a 100644 --- a/liberror.h +++ b/liberror.h @@ -179,6 +179,24 @@ void liberror_reset_error(void); */ void liberror_print_backtrace(struct liberror_error *, FILE *, const char *); +/** + * Get backtrace and save backtrace + * + * This function will never change `errno` + * + * Note: this library does not actually save + * a backtrace, `-lerror-backtrace` is needed + * for that functionallity (it will replace + * some things in this library, so no other + * action is required) + * + * @param error The error the backtrace shall be stored in, + * if `NULL`, the backtrafe is saved for the + * next error in the thread + * @return 0 on success, -1 on failure + */ +int liberror_save_backtrace(struct liberror_error *); + /** * Set the current error for the thread * -- cgit v1.2.3-70-g09d2