source: mainline/uspace/lib/c/include/stacktrace.h@ cb7be8f

Last change on this file since cb7be8f 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
RevLine 
[2c34be8]1/*
[d7f7a4a]2 * SPDX-FileCopyrightText: 2009 Jakub Jermar
3 * SPDX-FileCopyrightText: 2010 Jiri Svoboda
[2c34be8]4 *
[d7f7a4a]5 * SPDX-License-Identifier: BSD-3-Clause
[2c34be8]6 */
7
8/** @addtogroup libc
9 * @{
10 */
11/** @file
12 */
13
[4805495]14#ifndef _LIBC_STACKTRACE_H_
15#define _LIBC_STACKTRACE_H_
[2c34be8]16
[36f0738]17#include <errno.h>
[8d2dd7f2]18#include <stdint.h>
[3e6a98c5]19#include <stdbool.h>
[2c34be8]20
[e515b21a]21typedef struct {
[b7fd2a0]22 errno_t (*read_uintptr)(void *, uintptr_t, uintptr_t *);
[8751cf3]23 int (*printf)(const char *, ...);
[c1b979a]24} stacktrace_ops_t;
25
26typedef struct {
27 void *op_arg;
28 stacktrace_ops_t *ops;
[e515b21a]29} stacktrace_t;
30
31extern void stacktrace_print(void);
[8751cf3]32extern void stacktrace_kio_print(void);
[e515b21a]33extern void stacktrace_print_fp_pc(uintptr_t, uintptr_t);
[c1b979a]34extern void stacktrace_print_generic(stacktrace_ops_t *, void *, uintptr_t,
35 uintptr_t);
[2c34be8]36
37/*
38 * The following interface is to be implemented by each architecture.
39 */
[e515b21a]40extern bool stacktrace_fp_valid(stacktrace_t *, uintptr_t);
[b7fd2a0]41extern errno_t stacktrace_fp_prev(stacktrace_t *, uintptr_t, uintptr_t *);
42extern errno_t stacktrace_ra_get(stacktrace_t *, uintptr_t, uintptr_t *);
[e515b21a]43
44extern void stacktrace_prepare(void);
45extern uintptr_t stacktrace_fp_get(void);
[fb52db8]46extern uintptr_t stacktrace_pc_get(void);
[2c34be8]47
48#endif
49
50/** @}
51 */
Note: See TracBrowser for help on using the repository browser.