From 49375e1e108a461025000a15fbb5c93e4ec2274a Mon Sep 17 00:00:00 2001 From: Kaspar Schleiser Date: Thu, 4 Jun 2020 14:37:01 +0200 Subject: [PATCH] cpu/native: rename trace -> backtrace --- cpu/native/Makefile | 4 ++-- cpu/native/{trace => backtrace}/Makefile | 0 .../{trace/trace.c => backtrace/backtrace.c} | 8 +++---- cpu/native/include/{trace.h => backtrace.h} | 22 +++++++++---------- 4 files changed, 17 insertions(+), 17 deletions(-) rename cpu/native/{trace => backtrace}/Makefile (100%) rename cpu/native/{trace/trace.c => backtrace/backtrace.c} (80%) rename cpu/native/include/{trace.h => backtrace.h} (51%) diff --git a/cpu/native/Makefile b/cpu/native/Makefile index b266cb783e..e21039bb76 100644 --- a/cpu/native/Makefile +++ b/cpu/native/Makefile @@ -26,8 +26,8 @@ endif ifneq (,$(filter can_linux,$(USEMODULE))) DIRS += can endif -ifneq (,$(filter trace,$(USEMODULE))) - DIRS += trace +ifneq (,$(filter backtrace,$(USEMODULE))) + DIRS += backtrace endif include $(RIOTBASE)/Makefile.base diff --git a/cpu/native/trace/Makefile b/cpu/native/backtrace/Makefile similarity index 100% rename from cpu/native/trace/Makefile rename to cpu/native/backtrace/Makefile diff --git a/cpu/native/trace/trace.c b/cpu/native/backtrace/backtrace.c similarity index 80% rename from cpu/native/trace/trace.c rename to cpu/native/backtrace/backtrace.c index 86a78c7c0b..bdfe3ede9c 100644 --- a/cpu/native/trace/trace.c +++ b/cpu/native/backtrace/backtrace.c @@ -17,14 +17,14 @@ #include #include -#include "trace.h" +#include "backtrace.h" -void trace_print(void) +void backtrace_print(void) { - void *array[TRACE_SIZE + 1]; + void *array[BACKTRACE_SIZE + 1]; size_t size; - size = backtrace(array, TRACE_SIZE + 1); + size = backtrace(array, BACKTRACE_SIZE + 1); /* skip above line's return address and start with 1 */ for (size_t i = 1; i < size; i++) { diff --git a/cpu/native/include/trace.h b/cpu/native/include/backtrace.h similarity index 51% rename from cpu/native/include/trace.h rename to cpu/native/include/backtrace.h index a926a3d7ef..db3bfbe1fd 100644 --- a/cpu/native/include/trace.h +++ b/cpu/native/include/backtrace.h @@ -7,12 +7,12 @@ */ /** - * @defgroup trace Stack traceback (only under native) + * @defgroup backtrace Stack backtrace (only under native) * @ingroup core_util - * @brief Address-trace back. + * @brief Backtrace functionalitry * - * If you call the @ref trace_print() function a stack traceback of all return - * addresses up to @ref TRACE_SIZE will be printed from the point of execution. + * If you call the @ref backtrace_print() function a stack backtrace of all return + * addresses up to @ref BACKTRACE_SIZE will be printed from the point of execution. * * @{ * @@ -21,8 +21,8 @@ * * @author Martine Lenders */ -#ifndef TRACE_H -#define TRACE_H +#ifndef BACKTRACE_H +#define BACKTRACE_H #ifdef __cplusplus extern "C" { @@ -31,19 +31,19 @@ extern "C" { /** * @brief Maximum number of return addresses to print */ -#ifndef TRACE_SIZE -#define TRACE_SIZE (4U) +#ifndef BACKTRACE_SIZE +#define BACKTRACE_SIZE (4U) #endif /** - * @brief Print the last @ref TRACE_SIZE return addresses from call of this + * @brief Print the last @ref BACKTRACE_SIZE return addresses from call of this * function */ -void trace_print(void); +void backtrace_print(void); #ifdef __cplusplus } #endif -#endif /* TRACE_H */ +#endif /* BACKTRACE_H */ /** @} */