mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 06:12:43 +01:00
cpu/native: rename trace -> backtrace
This commit is contained in:
parent
6a4e61f8c4
commit
49375e1e10
@ -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
|
||||
|
@ -17,14 +17,14 @@
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#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++) {
|
@ -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 <m.lenders@fu-berlin.de>
|
||||
*/
|
||||
#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 */
|
||||
/** @} */
|
Loading…
Reference in New Issue
Block a user