|
Last change
on this file since cd1e3fc0 was d7f7a4a, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 3 years ago |
|
Replace some license headers with SPDX identifier
Headers are replaced using tools/transorm-copyright.sh only
when it can be matched verbatim with the license header used
throughout most of the codebase.
|
-
Property mode
set to
100644
|
|
File size:
1.1 KB
|
| Line | |
|---|
| 1 | /*
|
|---|
| 2 | * SPDX-FileCopyrightText: 2009 Jakub Jermar
|
|---|
| 3 | * SPDX-FileCopyrightText: 2010 Jiri Svoboda
|
|---|
| 4 | *
|
|---|
| 5 | * SPDX-License-Identifier: BSD-3-Clause
|
|---|
| 6 | */
|
|---|
| 7 |
|
|---|
| 8 | /** @addtogroup libc
|
|---|
| 9 | * @{
|
|---|
| 10 | */
|
|---|
| 11 | /** @file
|
|---|
| 12 | */
|
|---|
| 13 |
|
|---|
| 14 | #ifndef _LIBC_STACKTRACE_H_
|
|---|
| 15 | #define _LIBC_STACKTRACE_H_
|
|---|
| 16 |
|
|---|
| 17 | #include <errno.h>
|
|---|
| 18 | #include <stdint.h>
|
|---|
| 19 | #include <stdbool.h>
|
|---|
| 20 |
|
|---|
| 21 | typedef struct {
|
|---|
| 22 | errno_t (*read_uintptr)(void *, uintptr_t, uintptr_t *);
|
|---|
| 23 | int (*printf)(const char *, ...);
|
|---|
| 24 | } stacktrace_ops_t;
|
|---|
| 25 |
|
|---|
| 26 | typedef struct {
|
|---|
| 27 | void *op_arg;
|
|---|
| 28 | stacktrace_ops_t *ops;
|
|---|
| 29 | } stacktrace_t;
|
|---|
| 30 |
|
|---|
| 31 | extern void stacktrace_print(void);
|
|---|
| 32 | extern void stacktrace_kio_print(void);
|
|---|
| 33 | extern void stacktrace_print_fp_pc(uintptr_t, uintptr_t);
|
|---|
| 34 | extern void stacktrace_print_generic(stacktrace_ops_t *, void *, uintptr_t,
|
|---|
| 35 | uintptr_t);
|
|---|
| 36 |
|
|---|
| 37 | /*
|
|---|
| 38 | * The following interface is to be implemented by each architecture.
|
|---|
| 39 | */
|
|---|
| 40 | extern bool stacktrace_fp_valid(stacktrace_t *, uintptr_t);
|
|---|
| 41 | extern errno_t stacktrace_fp_prev(stacktrace_t *, uintptr_t, uintptr_t *);
|
|---|
| 42 | extern errno_t stacktrace_ra_get(stacktrace_t *, uintptr_t, uintptr_t *);
|
|---|
| 43 |
|
|---|
| 44 | extern void stacktrace_prepare(void);
|
|---|
| 45 | extern uintptr_t stacktrace_fp_get(void);
|
|---|
| 46 | extern uintptr_t stacktrace_pc_get(void);
|
|---|
| 47 |
|
|---|
| 48 | #endif
|
|---|
| 49 |
|
|---|
| 50 | /** @}
|
|---|
| 51 | */
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.