From bc1b1577a5335b9c8a18c8425db21e1081aab1c8 Mon Sep 17 00:00:00 2001 From: Nikolai Nosov Date: Thu, 16 Apr 2020 20:18:37 +0400 Subject: [PATCH] cleanup of external interface info --- include/libpst.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/include/libpst.h b/include/libpst.h index 6588682..b3fcd87 100644 --- a/include/libpst.h +++ b/include/libpst.h @@ -84,11 +84,21 @@ const pst_parameter_info* pst_get_parameter_info(pst_parameter* parameter); // // Advanced unwind routines. -// Additionally to pst_unwind_simple(...) provides types of parameters and variables in functions and their values if possible +// Additionally to pst_unwind_simple() provides types of parameters and variables in functions and their values if possible // -// save stack trace information to provided buffer in RAM -int pst_unwind_pretty(pst_handler* h); -const char* pst_print_pretty(pst_handler* h); +/** + * @brief Unwinds current stack trace using DWARF information about program if .debug_info section is present in executable + * @param handler The handler obtained by pst_lib_init() + * @return 1 on success, 0 on failure + */ +int pst_unwind_pretty(pst_handler* handler); + +/** + * @brief Print unwound Advanced stack trace(using DWARF information) to internal buffer + * @param handler The handler obtained by pst_lib_init() + * @return pointer to zero terminated C string, NULL on failure + */ +const char* pst_print_pretty(pst_handler* handler); #endif /* __LIBPST_EXTERNAL_H_ */